Re: Templates

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Templates
Date: 2000-07-10 22:47:42
Message-ID: 5240.963269262@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)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; then
CFLAGS=-O2
SHARED_LIB=-fPIC
DL_LIB=/usr/lib/libdld.sl
else
CFLAGS="-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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 2000-07-10 22:52:58 Re: pg_backup symlink?
Previous Message Ed Loehr 2000-07-10 22:44:02 Re: Slashdot discussion