From 4804526d012b01ba47e9e193d51a0ce98c082253 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Thu, 25 Jan 2001 15:50:35 +0000 Subject: [PATCH] * m4/depend.m4 (AM_DEPENDENCIES): Don't leave `AC_PROG_CC' etc. in clear. * m4/init.m4: Likewise. * m4/sanity.m4: s/conftestfile/conftest.file/. --- ChangeLog | 7 +++ Makefile.in | 4 -- aclocal.m4 | 157 ++++++++++++++++++++++++++++++------------------- configure | 45 +++++++------- m4/Makefile.in | 2 - m4/depend.m4 | 37 ++++++++---- m4/init.m4 | 21 ++++--- m4/sanity.m4 | 16 ++--- 8 files changed, 169 insertions(+), 120 deletions(-) diff --git a/ChangeLog b/ChangeLog index a7ea532a..a92281e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2001-01-24 Akim Demaille + + * m4/depend.m4 (AM_DEPENDENCIES): Don't leave `AC_PROG_CC' etc. in + clear. + * m4/init.m4: Likewise. + * m4/sanity.m4: s/conftestfile/conftest.file/. + 2001-01-24 Tom Tromey * automake.in (handle_libraries): Use $configure_ac; typo fix. diff --git a/Makefile.in b/Makefile.in index 3658b52a..a4cf295d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -61,10 +61,6 @@ POST_UNINSTALL = : AMDEP = @AMDEP@ AMTAR = @AMTAR@ AWK = @AWK@ -CC = @CC@ -CPP = @CPP@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ DEPDIR = @DEPDIR@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ diff --git a/aclocal.m4 b/aclocal.m4 index 48e36cfc..ee128bac 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -15,8 +15,16 @@ # some checks are only needed if your package does certain things. # But this isn't really a big deal. -# serial 3 +# serial 6 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it see a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + +# We require 2.13 because we rely on SHELL being computed by configure. AC_PREREQ([2.13]) # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) @@ -36,8 +44,7 @@ ifdef([AC_PROVIDE_IFELSE], # AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE]) # ---------------------------------------------- AC_DEFUN([AM_INIT_AUTOMAKE], -[dnl We require 2.13 because we rely on SHELL being computed by configure. -AC_REQUIRE([AC_PROG_INSTALL])dnl +[AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then @@ -69,38 +76,42 @@ AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_DEP_TRACK])dnl AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_PROVIDE_IFELSE([AC_PROG_CC], +AC_PROVIDE_IFELSE([AC_PROG_][CC], [AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], + [define([AC_PROG_][CC], + defn([AC_PROG_][CC])[AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_][CXX], [AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[AM_DEPENDENCIES(CXX)])])dnl + [define([AC_PROG_][CXX], + defn([AC_PROG_][CXX])[AM_DEPENDENCIES(CXX)])])dnl ]) # # Check to make sure that the build environment is sane. # +# serial 3 + +# AM_SANITY_CHECK +# --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 -echo timestamp > conftestfile +echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` - if test "[$]*" = "X"; then + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then # -L didn't work. - set X `ls -t $srcdir/configure conftestfile` + set X `ls -t $srcdir/configure conftest.file` fi - if test "[$]*" != "X $srcdir/configure conftestfile" \ - && test "[$]*" != "X conftestfile $srcdir/configure"; then + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a @@ -110,7 +121,7 @@ if ( alias in your environment]) fi - test "[$]2" = conftestfile + test "$[2]" = conftest.file ) then # Ok. @@ -122,31 +133,42 @@ fi rm -f conftest* AC_MSG_RESULT(yes)]) + +# serial 2 + # AM_MISSING_PROG(NAME, PROGRAM) -AC_DEFUN([AM_MISSING_PROG], [ -AC_REQUIRE([AM_MISSING_HAS_RUN]) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) + +# AM_MISSING_INSTALL_SH +# --------------------- # Like AM_MISSING_PROG, but only looks for install-sh. -# AM_MISSING_INSTALL_SH() -AC_DEFUN([AM_MISSING_INSTALL_SH], [ -AC_REQUIRE([AM_MISSING_HAS_RUN]) +AC_DEFUN([AM_MISSING_INSTALL_SH], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) if test -z "$install_sh"; then - install_sh="$ac_aux_dir/install-sh" - test -f "$install_sh" || install_sh="$ac_aux_dir/install.sh" - test -f "$install_sh" || install_sh="${am_missing_run}${ac_auxdir}/install-sh" - dnl FIXME: an evil hack: we remove the SHELL invocation from - dnl install_sh because automake adds it back in. Sigh. - install_sh="`echo $install_sh | sed -e 's/\${SHELL}//'`" + for install_sh in "$ac_aux_dir/install-sh" \ + "$ac_aux_dir/install.sh" \ + "${am_missing_run}${ac_auxdir}/install-sh"; + do + test -f "$install_sh" && break + done + # FIXME: an evil hack: we remove the SHELL invocation from + # install_sh because automake adds it back in. Sigh. + install_sh=`echo $install_sh | sed -e 's/\${SHELL}//'` fi AC_SUBST(install_sh)]) -# AM_MISSING_HAS_RUN. + +# AM_MISSING_HAS_RUN +# ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], [ -test x"${MISSING+set}" = xset || \ +AC_DEFUN([AM_MISSING_HAS_RUN], +[test x"${MISSING+set}" = xset || MISSING="\${SHELL} `CDPATH=:; cd $ac_aux_dir && pwd`/missing" # Use eval to expand $SHELL if eval "$MISSING --run :"; then @@ -158,37 +180,44 @@ else fi ]) -# See how the compiler implements dependency checking. -# Usage: +# serial 3 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it see a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + # AM_DEPENDENCIES(NAME) +# --------------------- +# See how the compiler implements dependency checking. # NAME is "CC", "CXX" or "OBJC". - # We try a few techniques and use that to set a single cache variable. - -AC_DEFUN([AM_DEPENDENCIES],[ -AC_REQUIRE([AM_SET_DEPDIR]) -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS]) -ifelse([$1],CC,[ -AC_REQUIRE([AC_PROG_CC]) -AC_REQUIRE([AC_PROG_CPP]) +AC_DEFUN([AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +ifelse([$1], CC, + [AC_REQUIRE([AC_PROG_][CC])dnl +AC_REQUIRE([AC_PROG_][CPP]) depcc="$CC" -depcpp="$CPP"],[$1],CXX,[ -AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([AC_PROG_CXXCPP]) +depcpp="$CPP"], + [$1], CXX, [AC_REQUIRE([AC_PROG_][CXX])dnl +AC_REQUIRE([AC_PROG_][CXXCPP]) depcc="$CXX" -depcpp="$CXXCPP"],[$1],OBJC,[ -am_cv_OBJC_dependencies_compiler_type=gcc],[ -AC_REQUIRE([AC_PROG_][$1]) -depcc="$[$1]" +depcpp="$CXXCPP"], + [$1], OBJC, [am_cv_OBJC_dependencies_compiler_type=gcc], + [AC_REQUIRE([AC_PROG_][$1])dnl +depcc="$$1" depcpp=""]) -AC_MSG_CHECKING([dependency style of $depcc]) -AC_CACHE_VAL(am_cv_[$1]_dependencies_compiler_type,[ -if test -z "$AMDEP"; then + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP"; then echo '#include "conftest.h"' > conftest.c echo 'int i;' > conftest.h - am_cv_[$1]_dependencies_compiler_type=none - for depmode in `sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < "$am_depcomp"`; do + am_cv_$1_dependencies_compiler_type=none + for depmode in `sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < "$am_depcomp"`; do case "$depmode" in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll @@ -209,26 +238,27 @@ if test -z "$AMDEP"; then depfile=conftest.Po tmpdepfile=conftest.TPo \ $SHELL $am_depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 && grep conftest.h conftest.Po > /dev/null 2>&1; then - am_cv_[$1]_dependencies_compiler_type="$depmode" + am_cv_$1_dependencies_compiler_type="$depmode" break fi done rm -f conftest.* else - am_cv_[$1]_dependencies_compiler_type=none + am_cv_$1_dependencies_compiler_type=none fi ]) -AC_MSG_RESULT($am_cv_[$1]_dependencies_compiler_type) -[$1]DEPMODE="depmode=$am_cv_[$1]_dependencies_compiler_type" -AC_SUBST([$1]DEPMODE) +$1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type" +AC_SUBST([$1DEPMODE]) ]) + +# AM_SET_DEPDIR +# ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in AM_DEPENDENCIES - -AC_DEFUN([AM_SET_DEPDIR],[ -if test -d .deps || mkdir .deps 2> /dev/null || test -d .deps; then +AC_DEFUN([AM_SET_DEPDIR], +[if test -d .deps || mkdir .deps 2> /dev/null || test -d .deps; then DEPDIR=.deps # We redirect because .deps might already exist and be populated. # In this situation we don't want to see an error. @@ -239,8 +269,11 @@ fi AC_SUBST(DEPDIR) ]) -AC_DEFUN([AM_DEP_TRACK],[ -AC_ARG_ENABLE(dependency-tracking, + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking Speeds up one-time builds --enable-dependency-tracking Do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" = xno; then diff --git a/configure b/configure index aa09f12d..e81792fb 100755 --- a/configure +++ b/configure @@ -612,20 +612,20 @@ echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 echo "configure:613: checking whether build environment is sane" >&5 # Just in case sleep 1 -echo timestamp > conftestfile +echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. - set X `ls -t $srcdir/configure conftestfile` + set X `ls -t $srcdir/configure conftest.file` fi - if test "$*" != "X $srcdir/configure conftestfile" \ - && test "$*" != "X conftestfile $srcdir/configure"; then + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a @@ -635,7 +635,7 @@ if ( alias in your environment" 1>&2; exit 1; } fi - test "$2" = conftestfile + test "$2" = conftest.file ) then # Ok. @@ -665,8 +665,7 @@ test "$program_suffix" != NONE && # sed with no file args requires a program. test "$program_transform_name" = "" && program_transform_name="s,x,x," - -test x"${MISSING+set}" = xset || \ +test x"${MISSING+set}" = xset || MISSING="\${SHELL} `CDPATH=:; cd $ac_aux_dir && pwd`/missing" # Use eval to expand $SHELL if eval "$MISSING --run :"; then @@ -677,12 +676,12 @@ else echo "configure: warning: ${am_backtick}missing' script is too old or missing" 1>&2 fi -for ac_prog in gawk mawk nawk awk +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:686: checking for $ac_word" >&5 +echo "configure:685: 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 @@ -712,7 +711,7 @@ test -n "$AWK" && break done echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:716: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:715: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -738,7 +737,6 @@ else SET_MAKE="MAKE=${MAKE-make}" fi - # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval="$enable_dependency_tracking" @@ -765,7 +763,6 @@ fi - if test -d .deps || mkdir .deps 2> /dev/null || test -d .deps; then DEPDIR=.deps # We redirect because .deps might already exist and be populated. @@ -796,36 +793,34 @@ EOF # Some tools Automake needs. - ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal"} - AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake"} - AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - AMTAR=${AMTAR-"${am_missing_run}tar"} - if test -z "$install_sh"; then - install_sh="$ac_aux_dir/install-sh" - test -f "$install_sh" || install_sh="$ac_aux_dir/install.sh" - test -f "$install_sh" || install_sh="${am_missing_run}${ac_auxdir}/install-sh" - install_sh="`echo $install_sh | sed -e 's/\${SHELL}//'`" + for install_sh in "$ac_aux_dir/install-sh" \ + "$ac_aux_dir/install.sh" \ + "${am_missing_run}${ac_auxdir}/install-sh"; + do + test -f "$install_sh" && break + done + # FIXME: an evil hack: we remove the SHELL invocation from + # install_sh because automake adds it back in. Sigh. + install_sh=`echo $install_sh | sed -e 's/\${SHELL}//'` fi # We need awk for the "check" target. The system "awk" is bad on @@ -838,7 +833,7 @@ AUTOMAKE="`pwd`/automake --amdir=." # 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:842: checking for $ac_word" >&5 +echo "configure:837: 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 diff --git a/m4/Makefile.in b/m4/Makefile.in index 560b04db..62166358 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -62,9 +62,7 @@ AMDEP = @AMDEP@ AMTAR = @AMTAR@ AWK = @AWK@ CC = @CC@ -CPP = @CPP@ CXX = @CXX@ -CXXCPP = @CXXCPP@ DEPDIR = @DEPDIR@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ diff --git a/m4/depend.m4 b/m4/depend.m4 index d24555f3..b07836d8 100644 --- a/m4/depend.m4 +++ b/m4/depend.m4 @@ -1,4 +1,10 @@ -# serial 2 +# serial 3 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... # AM_DEPENDENCIES(NAME) # --------------------- @@ -6,19 +12,19 @@ # NAME is "CC", "CXX" or "OBJC". # We try a few techniques and use that to set a single cache variable. AC_DEFUN([AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR]) -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS]) +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl ifelse([$1], CC, - [AC_REQUIRE([AC_PROG_CC]) -AC_REQUIRE([AC_PROG_CPP]) + [AC_REQUIRE([AC_PROG_][CC])dnl +AC_REQUIRE([AC_PROG_][CPP]) depcc="$CC" depcpp="$CPP"], - [$1], CXX, [AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([AC_PROG_CXXCPP]) + [$1], CXX, [AC_REQUIRE([AC_PROG_][CXX])dnl +AC_REQUIRE([AC_PROG_][CXXCPP]) depcc="$CXX" depcpp="$CXXCPP"], [$1], OBJC, [am_cv_OBJC_dependencies_compiler_type=gcc], - [AC_REQUIRE([AC_PROG_$1]) + [AC_REQUIRE([AC_PROG_][$1])dnl depcc="$$1" depcpp=""]) @@ -64,11 +70,13 @@ $1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type" AC_SUBST([$1DEPMODE]) ]) + +# AM_SET_DEPDIR +# ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in AM_DEPENDENCIES - -AC_DEFUN([AM_SET_DEPDIR],[ -if test -d .deps || mkdir .deps 2> /dev/null || test -d .deps; then +AC_DEFUN([AM_SET_DEPDIR], +[if test -d .deps || mkdir .deps 2> /dev/null || test -d .deps; then DEPDIR=.deps # We redirect because .deps might already exist and be populated. # In this situation we don't want to see an error. @@ -79,8 +87,11 @@ fi AC_SUBST(DEPDIR) ]) -AC_DEFUN([AM_DEP_TRACK],[ -AC_ARG_ENABLE(dependency-tracking, + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking Speeds up one-time builds --enable-dependency-tracking Do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" = xno; then diff --git a/m4/init.m4 b/m4/init.m4 index 479f9ffc..42d54d59 100644 --- a/m4/init.m4 +++ b/m4/init.m4 @@ -2,7 +2,14 @@ # some checks are only needed if your package does certain things. # But this isn't really a big deal. -# serial 4 +# serial 5 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + # We require 2.13 because we rely on SHELL being computed by configure. AC_PREREQ([2.13]) @@ -56,12 +63,12 @@ AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_DEP_TRACK])dnl AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_PROVIDE_IFELSE([AC_PROG_CC], +AC_PROVIDE_IFELSE([AC_PROG_][CC], [AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], + [define([AC_PROG_][CC], + defn([AC_PROG_][CC])[AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_][CXX], [AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[AM_DEPENDENCIES(CXX)])])dnl + [define([AC_PROG_][CXX], + defn([AC_PROG_][CXX])[AM_DEPENDENCIES(CXX)])])dnl ]) diff --git a/m4/sanity.m4 b/m4/sanity.m4 index 81b6019d..b38b1102 100644 --- a/m4/sanity.m4 +++ b/m4/sanity.m4 @@ -2,26 +2,28 @@ # Check to make sure that the build environment is sane. # -# serial 2 +# serial 3 +# AM_SANITY_CHECK +# --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 -echo timestamp > conftestfile +echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. - set X `ls -t $srcdir/configure conftestfile` + set X `ls -t $srcdir/configure conftest.file` fi - if test "$[*]" != "X $srcdir/configure conftestfile" \ - && test "$[*]" != "X conftestfile $srcdir/configure"; then + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a @@ -31,7 +33,7 @@ if ( alias in your environment]) fi - test "$[2]" = conftestfile + test "$[2]" = conftest.file ) then # Ok. -- 2.43.5