[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[automake-commit] branch master updated: Fix some build and test failure

From: Karl Berry
Subject: [automake-commit] branch master updated: Fix some build and test failures with Autoconf 2.70.
Date: Tue, 15 Dec 2020 18:33:13 -0500

This is an automated email from the git hooks/post-receive script.

karl pushed a commit to branch master
in repository automake.

View the commit online:;a=commitdiff;h=ccb57553e3433df3e52e534e6f87915db23ff9a5

The following commit(s) were added to refs/heads/master by this push:
     new ccb5755  Fix some build and test failures with Autoconf 2.70.
ccb5755 is described below

commit ccb57553e3433df3e52e534e6f87915db23ff9a5
Author: Zack Weinberg <>
AuthorDate: Mon Dec 14 14:50:47 2020 -0500

    Fix some build and test failures with Autoconf 2.70.
    Autoconf 2.70 (released last week) makes a few changes that broke Automake’s
    expectations, mostly in the test suite.  This patch addresses two of the
     - autoconf now issues a warning if fed a configure script that doesn’t 
       both AC_INIT and AC_OUTPUT; this, plus a problem with system-provided
       tools (still under investigation) broke the *build* on macOS; it also
       causes a couple of spurious testsuite failures.
     - AC_PACKAGE_NAME and AC_PACKAGE_VERSION are now defined unconditionally.
       AM_INIT_AUTOMAKE needs to use m4_ifset instead of m4_ifdef to diagnose
       the obsolete use of AC_INIT with fewer than two arguments.  (This change
       is compatible with autoconf 2.69; m4_ifset is much older, and it means
       ‘defined with a non-empty value’.)
    * Use both AC_INIT and AC_OUTPUT in test configure scripts.
    * t/, t/ Likewise.
    * m4/init.m4 (AM_INIT_AUTOMAKE): Use m4_ifset, not m4_ifdef, to detect
      AC_PACKAGE_NAME and/or AC_PACKAGE_VERSION not having a value.
---           | 9 +++++++--
 m4/init.m4             | 2 +-
 t/ | 1 +
 t/              | 1 +
 4 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/ b/
index 45507b6..0653174 100644
--- a/
+++ b/
@@ -123,7 +123,9 @@ fi
 AC_CACHE_CHECK([whether autoconf works], [am_cv_autoconf_works],
 [mkdir conftest
-echo 'AC''_INIT' > conftest/
+printf '%s\n' > conftest/ \
+  'AC''_INIT([smoke-test], [1])' \
+  'AC''_OUTPUT'
 if AM_RUN_LOG([cd conftest && $am_AUTOCONF -o /dev/null]);
@@ -139,7 +141,10 @@ fi
 AC_CACHE_CHECK([whether autoconf is recent enough], [am_cv_autoconf_version],
 [mkdir conftest
 dnl Creative quoting required to avoid spurious expansion of AC_PREREQ macro
-echo 'AC'"_PREREQ([[$required_autoconf_version]])" > conftest/
+printf '%s\n' > conftest/ \
+  'AC'"_PREREQ([[$required_autoconf_version]])" \
+  'AC''_INIT([smoke-test], [1])' \
+  'AC''_OUTPUT'
 if AM_RUN_LOG([cd conftest && $am_AUTOCONF -o /dev/null]);
diff --git a/m4/init.m4 b/m4/init.m4
index f82d756..cbe8fdd 100644
--- a/m4/init.m4
+++ b/m4/init.m4
@@ -64,7 +64,7 @@ m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
-  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+  m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
diff --git a/t/ b/t/
index 21614ba..f393d65 100644
--- a/t/
+++ b/t/
@@ -35,6 +35,7 @@ for ac_init in AC_INIT 'AC_INIT([])'; do
+        AC_OUTPUT
     cat # For debugging.
     $ACLOCAL 2>stderr && { cat stderr >&2; exit 1; }
diff --git a/t/ b/t/
index c6f6d64..df138a0 100644
--- a/t/
+++ b/t/
@@ -25,6 +25,7 @@ for ac_init_args in '' '([x])'; do
     unindent > <<END
+      AC_OUTPUT
     cat # For debugging.
     # The error message should mention AC_INIT, not AC_PACKAGE_VERSION.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]