summaryrefslogtreecommitdiff
path: root/t/aclocal-macrodir.tap
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2012-11-15 15:29:40 +0100
committerStefano Lattarini <stefano.lattarini@gmail.com>2012-11-15 15:41:40 +0100
commit26432142c64229f6c11c833aa8019e672593d2c1 (patch)
tree349a30c6c8a946825c737488bb3fcf292400a498 /t/aclocal-macrodir.tap
parentf0dd2dee9e4cebdc2ef1c5a9875728185bfd60eb (diff)
downloadautomake-26432142c64229f6c11c833aa8019e672593d2c1.tar.gz
tests: AC_CONFIG_MACRO_DIRS: ignore inevitable failures with old autoconf
When "older" version of autoconf are used (that is, those before commit v2.69-44-g1ed0548), we have no sane way to prevent the autom4te invocation issued from aclocal to possibly display warnings "MACRO m4_require'd but not m4_defun'd". That's not a big deal, because that just means that people using pre-2.70 autoconf with cutting-edge automake will see few spurious warnings, but the actual semantics will remain correct. However, this blemish was causing a couple of annoying testsuite failures. Solve this by simply skipping the affected tests when older (pre-2.70) autoconf versions are used. * t/aclocl-macrodir.tap ("AC_CONFIG_MACRO_DIR interaction with AC_REQUIRE"): Skip when older autoconf is in use. * t/aclocl-macrodirs.tap ("AC_CONFIG_MACRO_DIR interaction with AC_REQUIRE"): Likewise. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 't/aclocal-macrodir.tap')
-rwxr-xr-xt/aclocal-macrodir.tap46
1 files changed, 28 insertions, 18 deletions
diff --git a/t/aclocal-macrodir.tap b/t/aclocal-macrodir.tap
index 63ede71c8..2d3b0d60e 100755
--- a/t/aclocal-macrodir.tap
+++ b/t/aclocal-macrodir.tap
@@ -173,29 +173,39 @@ test_end
#---------------------------------------------------------------------------
-test_begin "AC_CONFIG_MACRO_DIR interaction with AC_REQUIRE"
+# Avoid spurious failures with pre-2.70 autoconf.
+# FIXME: remove this in automake 1.14, once we require Autoconf 2.70.
+if echo 'AC_INIT AC_CONFIG_MACRO_DIRS' | $AUTOCONF -o/dev/null -; then
-cat > configure.ac <<'END'
-AC_INIT([req], [1.0])
-AC_CONFIG_MACRO_DIR([macro-dir])
-AC_DEFUN([MY_FOO], [AC_REQUIRE([MY_BAR])])
-MY_FOO
+ test_begin "AC_CONFIG_MACRO_DIR interaction with AC_REQUIRE"
+
+ unindent > configure.ac <<'END'
+ AC_INIT([req], [1.0])
+ AC_CONFIG_MACRO_DIR([macro-dir])
+ AC_DEFUN([MY_FOO], [AC_REQUIRE([MY_BAR])])
+ MY_FOO
END
-mkdir macro-dir
-echo 'AC_DEFUN([MY_BAR], [//my//bar//])' > macro-dir/x.m4
+ mkdir macro-dir
+ echo 'AC_DEFUN([MY_BAR], [//my//bar//])' > macro-dir/x.m4
-st=0; $ACLOCAL 2>stderr || st=$?
-cat stderr >&2
+ st=0; $ACLOCAL 2>stderr || st=$?
+ cat stderr >&2
-test $st -eq 0 \
- && test ! -s stderr \
- && $FGREP 'm4_include([macro-dir/x.m4])' aclocal.m4 \
- && $AUTOCONF \
- && not $EGREP 'MY_(FOO|BAR)' configure \
- && $FGREP '//my//bar//' configure \
- || r='not ok'
+ test $st -eq 0 \
+ && test ! -s stderr \
+ && $FGREP 'm4_include([macro-dir/x.m4])' aclocal.m4 \
+ && $AUTOCONF \
+ && not $EGREP 'MY_(FOO|BAR)' configure \
+ && $FGREP '//my//bar//' configure \
+ || r='not ok'
-test_end
+ test_end
+
+else
+
+ skip_ -r "autoconf is too old (AC_CONFIG_MACRO_DIRS not defined)"
+
+fi
: