# We use aclocal.
AT_CHECK([aclocal --version || exit 77], [], [ignore], [ignore])
+# Prevent aclocal from reading third-party macros, in case they are buggy.
+mkdir empty
+ACLOCAL="aclocal --system-acdir=`cd empty && pwd`"
+export ACLOCAL
+
mkdir m4 aclocal
AT_DATA([configure.ac],
[[AC_INIT(x,0)
AC_DEFUN([AC_UNCHANGED_MACRO], [echo one])
]])
cp m4/stuff.m4 aclocal/stuff.m4
-AT_CHECK([aclocal -I aclocal], [0], [ignore], [ignore])
+AT_CHECK([$ACLOCAL -I aclocal], [0], [ignore], [ignore])
# Checking `autoupdate'.
AT_CHECK_AUTOUPDATE
-AT_CHECK([aclocal -I m4], [0], [ignore], [ignore])
+AT_CHECK([$ACLOCAL -I m4], [0], [ignore], [ignore])
AT_CHECK_AUTOUPDATE
AT_CLEANUP
AT_CHECK([[grep '[1-9]\.[0-9]' stdout || exit 77]], [], [ignore])
AT_CHECK([test ! -f $HOME/.autom4te.cfg || exit 77], [], [ignore], [ignore])
+# Prevent aclocal from reading third-party macros, in case they are buggy.
+# (AM_INIT_AUTOMAKE will still be available via the default --automake-acdir.)
+mkdir empty
+ACLOCAL="aclocal --system-acdir=`cd empty && pwd`"
+export ACLOCAL
+
AT_DATA([configure.ac],
[[AC_INIT(GNU foo, 1.0)
AM_INIT_AUTOMAKE
$sleep # `aclocal.m4' should be strictly younger than its inputs
# If Autoconf is too old, or the user has turned caching off, skip:
-AT_CHECK([aclocal || { ret=$?; test $ret -eq 63 && ret=77; exit $ret; }],
+AT_CHECK([$ACLOCAL || { ret=$?; test $ret -eq 63 && ret=77; exit $ret; }],
[], [], [ignore])
AT_CHECK([test -d autom4te.cache || exit 77])
AT_CHECK([autoconf])
echo newer >newer
$sleep # if `configure' is regenerated, we want it to be strictly newer,
# to catch the error consistently.
-AT_CHECK([aclocal], [], [], [ignore])
+AT_CHECK([$ACLOCAL], [],[], [ignore])
AT_CHECK([automake --no-force --add-missing], [], [], [ignore])
AT_CHECK([autoconf])
AT_CHECK([test "`find configure -newer newer`" = "" ||
AT_SETUP([autotools and whitespace in file names])
-# We use aclocal.
-AT_CHECK([aclocal --version || exit 77], [], [ignore], [ignore])
+# Prevent autoreconf from running aclocal, which might not exist,
+# or could barf over warnings in third-party macro files.
+ACLOCAL=true
+export ACLOCAL
x=
export x
AT_CHECK_AUTOCONF([--include="$dir" -o "$file" "$file.ac"])
AT_CHECK([autoscan -B "$dir"], [], [], [ignore])
AT_CHECK([autoscan --force -I "$dir"], [], [], [ignore])
- # autoreconf requires a sane input file name. Also, disable aclocal.
+ # autoreconf requires a sane input file name.
mv -f "$file.ac" configure.ac
+ # Since aclocal is disabled, provide a stub aclocal.m4.
AT_DATA([aclocal.m4])
AT_CHECK([autoreconf -B "$dir"])
AT_CHECK([autoreconf --force -I "$dir"])
# We use aclocal.
AT_CHECK([aclocal --version || exit 77], [], [ignore], [ignore])
+# Prevent aclocal from reading third-party macros, in case they are buggy.
+mkdir empty
+ACLOCAL="aclocal --system-acdir=`cd empty && pwd`"
+export ACLOCAL
+
mkdir _tmp
TMPDIR=_tmp
export TMPDIR
[AC_DEFINE([HAVE_MACROS], 1, [Define if you have macros.])])
]])
-AT_CHECK([aclocal -I m4])
+AT_CHECK([$ACLOCAL -I m4])
AT_CHECK_AUTOHEADER([], [HAVE_MACROS])
AT_CHECK_AUTOCONF
AT_CHECK_CONFIGURE
CONFIG_SITE=no-such-file
export CONFIG_SITE
+# Prevent aclocal from reading third-party macros, in case they are buggy.
+mkdir empty
+ACLOCAL="aclocal --system-acdir=`cd empty && pwd`"
+export ACLOCAL
+
# The contents of `inner/', and `inner/innermost/'.
AS_MKDIR_P([inner/innermost])
AC_OUTPUT
]])
-# If there are improperly quoted AC_DEFUN installed in share/aclocal,
-# they trigger warnings from aclocal 1.8, so ignore stderr.
-AT_CHECK([autoreconf], [], [], [ignore])
+AT_CHECK([autoreconf])
AT_CHECK([test -f inner/configure])
# Running the outer configure recursively should provide the innermost
# We use aclocal (via autoreconf).
AT_CHECK([aclocal --version || exit 77], [], [ignore], [ignore])
+# Prevent aclocal from reading third-party macros, in case they are buggy.
+mkdir empty
+ACLOCAL="aclocal --system-acdir=`cd empty && pwd`"
+export ACLOCAL
+
# The contents of `.'
AT_DATA([install-sh], [])
AT_DATA([configure.ac],
AC_OUTPUT
]])
-AT_CHECK([autoreconf -Wall -v], [0], [ignore], [stderr])
-# We should not warn about nonliteral argument to AC_CONFIG_SUBDIRS here.
-AT_CHECK([grep 'AC_CONFIG_SUBDIRS:.*literals' stderr], [1])
+AT_CHECK([autoreconf -Wall], [0], [ignore])
AT_CHECK([test -f inner/configure])
AT_CHECK([test -f inner/innermost/configure])
AT_CHECK([test -f inner/innermost/config.hin])
# We use aclocal (via autoreconf).
AT_CHECK([aclocal --version || exit 77], [], [ignore], [ignore])
+# Prevent aclocal from reading third-party macros, in case they are buggy.
+mkdir empty
+ACLOCAL="aclocal --system-acdir=`cd empty && pwd`"
+export ACLOCAL
+
AT_DATA([install-sh], [])
AT_DATA([configure.ac],
[[AC_INIT(GNU Outer, 1.0)
]])
chmod +x inner/configure
-AT_CHECK([autoreconf -Wall -v], 0, [ignore], [ignore])
+AT_CHECK([autoreconf -Wall], 0, [ignore])
# Running the outer configure recursively should provide the innermost
# help strings.
-AT_CHECK([./configure $configure_options --help=recursive | grep "folks"], 0, [ignore])
+AT_CHECK([./configure $configure_options --help=recursive | grep "folks"],
+ [0], [ignore])
# Running the outer configure should trigger the inner.
AT_CHECK([./configure $configure_options], 0, [ignore])
AC_OUTPUT
]])
-# Hand-written aclocal.m4, so we don't invoke `aclocal -Werror' which
-# could barf over warnings in third-party macro files, or fail over
-# warnings with older aclocal which didn't yet understand -W*.
+# Prevent autoreconf from running aclocal, which might not exist,
+# or could barf over warnings in third-party macro files.
AT_DATA([aclocal.m4])
+ACLOCAL=true
+export ACLOCAL
AS_MKDIR_P([foo])
AC_OUTPUT
]])
+# Prevent autoreconf from running aclocal, which might not exist,
+# or could barf over warnings in third-party macro files.
+AT_DATA([aclocal.m4])
+ACLOCAL=true
+export ACLOCAL
+
# autoreconf should have no complaints, and the generated configure
# script should run fine with or without --no-recursion.
AT_CHECK([autoreconf -Werror], [0], [ignore])
AT_SETUP([Empty directory])
AT_KEYWORDS([autoreconf])
-# We use aclocal (via autoreconf).
-AT_CHECK([aclocal --version || exit 77], [], [ignore], [ignore])
+# Prevent autoreconf from running aclocal, which might not exist,
+# or could barf over warnings in third-party macro files.
+ACLOCAL=true
+export ACLOCAL
# The test group directory is not necessarily _empty_, but it does not contain
# files meaningful to `autoreconf'.
AT_CHECK([automake --version || exit 77], [], [stdout], [ignore])
AT_CHECK([[grep '[1-9]\.[0-9]' stdout || exit 77]], [], [ignore])
+# Prevent aclocal from reading third-party macros, in case they are buggy.
+# (AM_INIT_AUTOMAKE will still be available via the default --automake-acdir.)
+mkdir empty
+ACLOCAL="aclocal --system-acdir=`cd empty && pwd`"
+export ACLOCAL
+
AT_DATA([configure.ac],
[[AC_INIT(GNU foo, 1.0)
AM_INIT_AUTOMAKE
# We use aclocal and automake via autoreconf.
AT_CHECK([automake --version || exit 77], [], [ignore], [ignore])
+# Prevent aclocal from reading third-party macros, in case they are buggy.
+# (AM_INIT_AUTOMAKE will still be available via the default --automake-acdir.)
+mkdir empty
+ACLOCAL="aclocal --system-acdir=`cd empty && pwd`"
+export ACLOCAL
+
AT_DATA([configure.ac],
[[AC_INIT(GNU foo, 1.0)
AM_INIT_AUTOMAKE
AT_SETUP([Missing auxiliary files])
AT_KEYWORDS([autoreconf])
+# Prevent autoreconf from running aclocal, which might not exist,
+# or could barf over warnings in third-party macro files.
+AT_DATA([aclocal.m4])
+ACLOCAL=true
+export ACLOCAL
+
AT_DATA([configure.ac],
[[AC_INIT([GNU foo], [1.0])
AC_CONFIG_AUX_DIR([build-aux])