Discussion:
FYI: grep had to switch: AC_PROG_CC_STDC -> AC_PROG_CC
Jim Meyering
2012-10-24 09:01:47 UTC
Permalink
When attempting to bootstrap grep.git using
autoconf.git (v2.69-37-gb9dc6b6), I see this failure:

autoreconf: running: aclocal -I m4 -I m4
configure.ac:81: error: AC_PROG_CC cannot be called after AM_PROG_CC_C_O
../../lib/autoconf/c.m4:1459: AC_PROG_CC_STDC is expanded from...
m4/gnulib-common.m4:229: gl_PROG_CC_C99 is expanded from...
m4/gnulib-comp.m4:34: gl_EARLY is expanded from...
configure.ac:81: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal: error: /p/bin/autom4te failed with exit status: 1
autoreconf: aclocal failed with exit status: 1
./bootstrap: autoreconf failed

I worked around it by making this change.
From 703a9cf560db57abfc9ff3457fc5a696c1f563ac Mon Sep 17 00:00:00 2001
From: Jim Meyering <***@meyering.net>
Date: Wed, 24 Oct 2012 11:00:14 +0200
Subject: [PATCH] build: use AC_PROG_CC_STDC rather than AC_PROG_CC

* configure.ac: Use AC_PROG_CC_STDC rather than AC_PROG_CC,
to accommodate autoconf-2.69-37+.
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 1e51ffc..84c6049 100644
--- a/configure.ac
+++ b/configure.ac
@@ -77,7 +77,7 @@ dnl Checks for programs.
AC_CANONICAL_HOST
AC_PROG_AWK
AC_PROG_INSTALL
-AC_PROG_CC
+AC_PROG_CC_STDC
gl_EARLY
AC_PROG_RANLIB

--
1.8.0
Paul Eggert
2012-10-24 19:29:13 UTC
Permalink
Post by Jim Meyering
When attempting to bootstrap grep.git using
autoreconf: running: aclocal -I m4 -I m4
configure.ac:81: error: AC_PROG_CC cannot be called after AM_PROG_CC_C_O
Yeowch. Thanks for reporting this. The problem arises because
Automake's AM_PROG_CC_C_O redefines AC_PROG_CC.

We don't want to discourage people from using AC_PROG_CC,
Post by Jim Meyering
From 0cc5d3c97d4446dfb198e20f13b9850ee237ab3b Mon Sep 17 00:00:00 2001
From: Paul Eggert <***@cs.ucla.edu>
Date: Wed, 24 Oct 2012 12:25:34 -0700
Subject: [PATCH] AC_PROG_CC_C89, AC_PROG_CC_C99, AC_PROG_CC_STDC: Use
AU_DEFUN

This fixes a bug introduced by the most recent change to c.m4.
Problem reported by Jim Meyering in
<http://lists.gnu.org/archive/html/autoconf/2012-10/msg00048.html>.
* lib/autoconf/c.m4 (AC_PROG_CC_C89, AC_PROG_CC_C99, AC_PROG_CC_STDC):
Use AU_DEFUN and AC_REQUIRE, not AU_ALIAS, as the latter is not
compatible with how Automake redefines AC_PROG_CC.
---
lib/autoconf/c.m4 | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4
index 4a84489..0802f85 100644
--- a/lib/autoconf/c.m4
+++ b/lib/autoconf/c.m4
@@ -1448,15 +1448,27 @@ dnl preferably extc11.

# AC_PROG_CC_C89
# --------------
-AU_ALIAS([AC_PROG_CC_C89], [AC_PROG_CC])
+# Do not use AU_ALIAS here and in AC_PROG_CC_C99 and AC_PROG_CC_STDC,
+# as that'd be incompatible with how Automake redefines AC_PROG_CC. See
+# <http://lists.gnu.org/archive/html/autoconf/2012-10/msg00048.html>.
+AU_DEFUN([AC_PROG_CC_C89],
+ [AC_REQUIRE([AC_PROG_CC])],
+ [$0 is obsolete; use AC_PROG_CC]
+)

# AC_PROG_CC_C99
# --------------
-AU_ALIAS([AC_PROG_CC_C99], [AC_PROG_CC])
+AU_DEFUN([AC_PROG_CC_C99],
+ [AC_REQUIRE([AC_PROG_CC])],
+ [$0 is obsolete; use AC_PROG_CC]
+)

# AC_PROG_CC_STDC
# ---------------
-AU_ALIAS([AC_PROG_CC_STDC], [AC_PROG_CC])
+AU_DEFUN([AC_PROG_CC_STDC],
+ [AC_REQUIRE([AC_PROG_CC])],
+ [$0 is obsolete; use AC_PROG_CC]
+)


# AC_C_BACKSLASH_A
--
1.7.11.7
Adrian Bunk
2012-10-24 20:07:44 UTC
Permalink
Post by Paul Eggert
Post by Jim Meyering
When attempting to bootstrap grep.git using
autoreconf: running: aclocal -I m4 -I m4
configure.ac:81: error: AC_PROG_CC cannot be called after AM_PROG_CC_C_O
Yeowch. Thanks for reporting this. The problem arises because
Automake's AM_PROG_CC_C_O redefines AC_PROG_CC.
Ouch.
Post by Paul Eggert
We don't want to discourage people from using AC_PROG_CC,
...
You also have to exclude AC_PROG_CC_C89 and AC_PROG_CC_C99 (similar
to AC_PROG_CC_STDC) in au_exclude_list in tests/mktests.sh to fix the
"make check" errors this causes.

cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
Paul Eggert
2012-10-24 22:30:14 UTC
Permalink
Post by Adrian Bunk
You also have to exclude AC_PROG_CC_C89 and AC_PROG_CC_C99 (similar
to AC_PROG_CC_STDC) in au_exclude_list in tests/mktests.sh to fix the
"make check" errors this causes.
Thanks, I just now pushed a patch to do that.

Loading...