Re: Templates - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Templates
Date
Msg-id 5240.963269262@sss.pgh.pa.us
Whole thread Raw
In response to Re: Templates  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Templates  (Peter Eisentraut <peter_e@gmx.net>)
Re: Templates  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Tom Lane writes:
>> The problem is to select an appropriate template if none of the
>> patterns in template/.similar match your platform name.  We have had
>> many cases before where the platform vendor comes out with some random
>> new variant on their uname output that causes the .similar match to
>> fail (Alpha's "evNN" being the latest example).

> That is the very reason why config.guess and config.sub were invented, and
> that's why we should use them exclusively, IMHO. All the possible outputs
> of config.guess are known to us now, so there should be no surprises when
> somebody changes their uname.

Say what?  The variants we've been having trouble with *are*
config.guess outputs.  Moreover there are new versions of config.guess
all the time.  You're making no sense at all here.

> So the compiler information must disappear from the template files.

Not exactly.  We do need to be able to decide whether we are using
gcc or vendor cc in order to pick the right switches.  One possible
way of doing that is to merge the "cc" and "gcc" templates and have
if-tests in the templates instead.  For example the hpux template
might look like

AROPT=crs
ALL=
SRCH_INC=
SRCH_LIB=
DLSUFFIX=.sl

if test $ac_cv_prog_gcc = yes; thenCFLAGS=-O2SHARED_LIB=-fPICDL_LIB=/usr/lib/libdld.sl
elseCFLAGS="-Wl,-E -Ae"SHARED_LIB=+z# Make aCC be first C++ compiler name tried...CCC=aCC
fi

That last line brings up an issue that you'll have to deal with before
you can convince me that vanilla autoconf is the only solution we need:
how do you force the thing to use compatible C++ and C compilers?  Right
now it will try to pick g++ (if available) regardless of what you told
it about CC.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pg_backup symlink?
Next
From: The Hermit Hacker
Date:
Subject: Re: pg_backup symlink?