Skip site navigation (1) Skip section navigation (2)

Generalizing configure's template-file support

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Generalizing configure's template-file support
Date: 1998-11-22 18:47:57
Message-ID: 11714.911760477@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
I noticed that configure.in is set up to pull a fixed set of symbols
out of the template files, by means of this rather grotty code:

AROPT=`grep '^AROPT:' template/$TEMPLATE | awk -F: '{print $2}'`
SHARED_LIB=`grep '^SHARED_LIB:' template/$TEMPLATE | awk -F: '{print $2}'`
CFLAGS=`grep '^CFLAGS:' template/$TEMPLATE | awk -F: '{print $2}'`
SRCH_INC=`grep '^SRCH_INC:' template/$TEMPLATE | awk -F: '{print $2}'`
SRCH_LIB=`grep '^SRCH_LIB:' template/$TEMPLATE | awk -F: '{print $2}'`
USE_LOCALE=`grep '^USE_LOCALE:' template/$TEMPLATE | awk -F: '{print $2}'`
DLSUFFIX=`grep '^DLSUFFIX:' template/$TEMPLATE | awk -F: '{print $2}'`
DL_LIB=`grep '^DL_LIB:' template/$TEMPLATE | awk -F: '{print $2}'`
YACC=`grep '^YACC:' template/$TEMPLATE | awk -F: '{print $2}'`
YFLAGS=`grep '^YFLAGS:' template/$TEMPLATE | awk -F: '{print $2}'`
CC=`grep '^CC:' template/$TEMPLATE | awk -F: '{print $2}'`
LIBS=`grep '^LIBS:' template/$TEMPLATE | awk -F: '{print $2}'`

It seems to me that configure ought to just read the selected template
file as a series of shell variable assignments and process whatever it
finds.  That way, a template file could assign to any shell variable
within the configure run, not just these twelve.

There is already one case where a template file tries to assign a
setting that configure isn't noticing: template/sco contains
	LEX:lex
which is quite nonfunctional at the moment.  Presumably, whoever
put that in did so with the expectation that configure would honor it.

Any objection to this change?

I also notice that most of the template files contain settings for
"ALL", which isn't being used by configure either.  (It won't be even
after my proposed change of the template-file-reading code, because ALL
isn't referenced anywhere in the configure script.)  Most of the
templates just set ALL to empty, but template/svr4 contains
	ALL:+W0
Anyone have the foggiest what this item is supposed to do?  It's
definitely dead code as things stand, but perhaps at one time it meant
something.

			regards, tom lane

pgsql-hackers by date

Next:From: Hannu KrosingDate: 1998-11-22 19:53:37
Subject: Re: [HACKERS] Bug in 6.4 release - thanks for for fixing it!
Previous:From: Tom LaneDate: 1998-11-22 18:26:36
Subject: Re: [HACKERS] Problems with CVS.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group