diff options
| author | Tom Lane | 1998-12-13 20:03:07 +0000 |
|---|---|---|
| committer | Tom Lane | 1998-12-13 20:03:07 +0000 |
| commit | a10b38f255c477a7b84ed0e58d7ea80e46a928f8 (patch) | |
| tree | abe81f1b2cd2fc052278f7a4774d03abf3fba5dd /src/configure.in | |
| parent | 26a23e33db0f6b7a49f95fd4b422ec06fb776880 (diff) | |
Use standard AC_PROG_INSTALL macro to search for install program,
instead of our own halfway-there code. Add AC_STRUCT_TIMEZONE call
to check whether tm_zone exists in struct tm. Revise reading of template
file so that templates can define any variables they feel like (and,
indeed, can execute arbitrary shell code) rather than being constrained
to a fixed set of variable names.
Diffstat (limited to 'src/configure.in')
| -rw-r--r-- | src/configure.in | 51 |
1 files changed, 22 insertions, 29 deletions
diff --git a/src/configure.in b/src/configure.in index d57545f150e..c3c37ccc749 100644 --- a/src/configure.in +++ b/src/configure.in @@ -3,6 +3,10 @@ AC_INIT(backend/access/common/heaptuple.c) AC_PREFIX_DEFAULT(/usr/local/pgsql) AC_CONFIG_HEADER(include/config.h) +dnl Autoconf 2.12, at least, generates a useless relative path to install-sh +dnl unless we do this. +AC_CONFIG_AUX_DIR(`pwd`) + AC_CANONICAL_HOST tas_file=dummy.s @@ -132,18 +136,20 @@ if test ! -f "template/$TEMPLATE"; then exit fi -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}'` +dnl Read the selected template file. +dnl For reasons of backwards compatibility, lines of the form +dnl IDENTIFIER: something +dnl should be treated as variable assignments. However, we also want to +dnl allow other shell commands in the template file (in case the file +dnl needs to make conditional tests, etc). So, generate a temp file with +dnl the IDENTIFIER: lines translated, then source it. + +[ +rm -f conftest.sh +sed 's/^\([A-Za-z_]*\):\(.*\)$/\1="\2"/' "template/$TEMPLATE" >conftest.sh +. conftest.sh +rm -f conftest.sh +] AC_ARG_WITH(includes, @@ -416,12 +422,9 @@ AC_ARG_WITH(CXX, [ AC_PROG_CXX]) AC_SUBST(HAVECXX) -AC_PATH_PROGS(INSTALL, ginstall installbsd bsdinst scoinst install, NONE, /usr/ucb:$PATH ) -if test "$INSTALL" = "NONE" -then - # fall back on our own script - INSTALL=`pwd`/install-sh -fi +dnl Figure out how to invoke "install" and what install options to use. + +AC_PROG_INSTALL INSTLOPTS="-m 444" INSTL_EXE_OPTS="-m 555" @@ -434,17 +437,6 @@ case "$host_os" in INSTL_SHLIB_OPTS="-m 555" ;; esac -dnl These flavors of install need -c to install by copy rather than move. -dnl install by move is fatal because it removes stuff from the source tree! -case "`basename $INSTALL`" in - install|installbsd|scoinst|install-sh) - INSTLOPTS="-c $INSTLOPTS" - INSTL_EXE_OPTS="-c $INSTL_EXE_OPTS" - INSTL_LIB_OPTS="-c $INSTL_LIB_OPTS" - INSTL_SHLIB_OPTS="-c $INSTL_SHLIB_OPTS";; -esac - -echo "- Using $INSTALL" AC_SUBST(INSTALL) AC_SUBST(INSTLOPTS) AC_SUBST(INSTL_LIB_OPTS) @@ -569,6 +561,7 @@ AC_TYPE_OFF_T AC_TYPE_SIZE_T AC_HEADER_TIME AC_STRUCT_TM +AC_STRUCT_TIMEZONE AC_MSG_CHECKING(for type of last arg to accept) AC_TRY_COMPILE([#include <stdlib.h> |
