From c2442ee1a3095be9660f32ed9b4128d66cd6e457 Mon Sep 17 00:00:00 2001 From: Ben Elliston Date: Tue, 21 Sep 1999 05:54:34 +0000 Subject: [PATCH] 1999-09-21 Ben Elliston * configure.in: Check if an appropriate version of GNU m4 is installed at configure-time rather than at runtime. From Pavel Roskin . Fix for autoconf/2. --- ChangeLog | 7 +++++ configure | 80 +++++++++++++++++++++++++++------------------------- configure.in | 10 +++++++ 3 files changed, 58 insertions(+), 39 deletions(-) diff --git a/ChangeLog b/ChangeLog index c9decd45..e32f3c94 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +1999-09-21 Ben Elliston + + * configure.in: Check if an appropriate version of GNU m4 is + installed at configure-time rather than at runtime. From Pavel + Roskin . Fix for autoconf/2. + * configure: Regenerate. + 1999-09-20 Ben Elliston * autoheader.sh: Bourne shell compatibility fix. From Pavel Roskin diff --git a/configure b/configure index d7feed8c..524bb0f6 100755 --- a/configure +++ b/configure @@ -1,7 +1,7 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13.1 +# Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -333,7 +333,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13.1" + echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) @@ -493,7 +493,7 @@ done if test -r "$cache_file"; then echo "loading cache $cache_file" - test -f "$cache_file" && . $cache_file + . $cache_file else echo "creating cache $cache_file" > $cache_file @@ -533,10 +533,10 @@ EOF_SED rm -f conftestsed fi test "$program_prefix" != NONE && - program_transform_name="s,^,${program_prefix},;$program_transform_name" + program_transform_name="s,^,${program_prefix},; $program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && - program_transform_name="s,\$\$,${program_suffix},;$program_transform_name" + program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" # sed with no file args requires a program. test "$program_transform_name" = "" && program_transform_name="s,x,x," @@ -547,15 +547,15 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:__oline__: checking for $ac_word" >&5 -if eval "test \"\${ac_cv_path_M4+set}\" = set"; then +echo "configure:551: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_M4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$M4" in /*) ac_cv_path_M4="$M4" # Let the user override the test with a path. ;; - ?:/*) + ?:/*) ac_cv_path_M4="$M4" # Let the user override the test with a dos path. ;; *) @@ -583,13 +583,30 @@ test -n "$M4" && break done test -n "$M4" || M4="m4" +echo $ac_n "checking whether we are using GNU m4""... $ac_c" 1>&6 +echo "configure:588: checking whether we are using GNU m4" >&5 +if eval "test \"`echo '$''{'acac_cv_gnu_m4'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + acac_cv_gnu_m4=no +if test x"$M4" != x; then + case `$M4 --help < /dev/null 2>&1` in + *traditional*) acac_cv_gnu_m4=yes ;; + esac +fi +fi + +echo "$ac_t""$acac_cv_gnu_m4" 1>&6 +if test x"$acac_cv_gnu_m4" != xyes; then + { echo "configure: error: GNU m4 is required" 1>&2; exit 1; } +fi for ac_prog in mawk gawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:__oline__: checking for $ac_word" >&5 -if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then +echo "configure:609: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$AWK"; then @@ -621,15 +638,15 @@ done # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:__oline__: checking for $ac_word" >&5 -if eval "test \"\${ac_cv_path_PERL+set}\" = set"; then +echo "configure:642: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$PERL" in /*) ac_cv_path_PERL="$PERL" # Let the user override the test with a path. ;; - ?:/*) + ?:/*) ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path. ;; *) @@ -670,18 +687,14 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break - elif test -f $ac_dir/shtool; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break fi done if test -z "$ac_aux_dir"; then { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } fi -ac_config_guess="$SHELL $ac_aux_dir/config.guess" -ac_config_sub="$SHELL $ac_aux_dir/config.sub" -ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. +ac_config_guess=$ac_aux_dir/config.guess +ac_config_sub=$ac_aux_dir/config.sub +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -695,9 +708,9 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:__oline__: checking for a BSD compatible install" >&5 +echo "configure:712: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then -if eval "test \"\${ac_cv_path_install+set}\" = set"; then +if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" @@ -715,10 +728,6 @@ else grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : - elif test $ac_prog = install && - grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 @@ -747,7 +756,7 @@ echo "$ac_t""$INSTALL" 1>&6 # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' @@ -824,20 +833,13 @@ trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. cat > conftest.defs <<\EOF -s%#define \([^ ][^ ]*\) *\(.*\)%-D\1=\2%g +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g s%\[%\\&%g s%\]%\\&%g s%\$%$$%g EOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT="`echo; echo .`" -DEFS=`sed -f conftest.defs confdefs.h | tr "$ac_LF_and_DOT" ' .'` +DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` rm -f conftest.defs @@ -866,7 +868,7 @@ do echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13.1" + echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -1003,7 +1005,7 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." case "$ac_file" in - *[Mm]akefile*) ac_comsub="1i\\ + *Makefile*) ac_comsub="1i\\ # $configure_input" ;; *) ac_comsub= ;; esac @@ -1028,5 +1030,5 @@ exit 0 EOF chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1 +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 diff --git a/configure.in b/configure.in index f1a89865..afb57c6c 100644 --- a/configure.in +++ b/configure.in @@ -8,6 +8,16 @@ dnl their path, the installer can configure with a path that has GNU m4 dnl first and get that path embedded in the installed autoconf and dnl autoheader scripts. AC_PATH_PROGS(M4, gm4 gnum4 m4, m4) +AC_CACHE_CHECK(whether we are using GNU m4, acac_cv_gnu_m4, +[acac_cv_gnu_m4=no +if test x"$M4" != x; then + case `$M4 --help < /dev/null 2>&1` in + *traditional*) acac_cv_gnu_m4=yes ;; + esac +fi]) +if test x"$acac_cv_gnu_m4" != xyes; then + AC_ERROR([GNU m4 is required]) +fi AC_PROG_AWK dnl We use a path for perl so the #! line in autoscan will work.