Re: autoconf-2.69c released [beta]

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

 



I asked:
> Hi Paul,
> 
> > (I did reproduce the bug).
> 
> Have you reproduced the warning
>   "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS"
> with autoconf 2.63 but not 2.64 ?

This is indeed the case. With this simple configure.ac
==========================================================
dnl This file is in the public domain.
dnl
dnl Configuration file - processed by autoconf.

AC_INIT([hello-c], [0])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_SRCDIR([hello.c])
AM_INIT_AUTOMAKE

AC_PROG_CC
gl_USE_SYSTEM_EXTENSIONS
AC_CHECK_HEADERS([unistd.h])

AC_GNU_SOURCE

AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([m4/Makefile])
AC_OUTPUT
==========================================================

and the previous definition of gl_USE_SYSTEM_EXTENSIONS, I observe (with
Automake 1.12.6):

* with autoconf 2.62 .. 2.63:

  configure.ac:14: warning: AC_USE_SYSTEM_EXTENSIONS invoked multiple times
  ../../lib/autoconf/specific.m4:331: AC_GNU_SOURCE is expanded from...
  configure.ac:14: the top level
  configure.ac:14: warning: AC_USE_SYSTEM_EXTENSIONS invoked multiple times
  ../../lib/autoconf/specific.m4:331: AC_GNU_SOURCE is expanded from...
  configure.ac:14: the top level

* with autoconf 2.64 .. 2.69b: no warnings

* with autoconf 2.69c:

  configure.ac:11: warning: The macro `AC_GNU_SOURCE' is obsolete.
  configure.ac:11: You should run autoupdate.
  ./lib/autoconf/specific.m4:312: AC_GNU_SOURCE is expanded from...
  m4/extensions.m4:178: gl_USE_SYSTEM_EXTENSIONS is expanded from...
  configure.ac:11: the top level
  configure.ac:14: warning: The macro `AC_GNU_SOURCE' is obsolete.
  configure.ac:14: You should run autoupdate.
  ./lib/autoconf/specific.m4:312: AC_GNU_SOURCE is expanded from...
  configure.ac:14: the top level
  configure.ac:11: warning: The macro `AC_GNU_SOURCE' is obsolete.
  configure.ac:11: You should run autoupdate.
  ./lib/autoconf/specific.m4:312: AC_GNU_SOURCE is expanded from...
  m4/extensions.m4:178: gl_USE_SYSTEM_EXTENSIONS is expanded from...
  configure.ac:11: the top level
  configure.ac:14: warning: The macro `AC_GNU_SOURCE' is obsolete.
  configure.ac:14: You should run autoupdate.
  ./lib/autoconf/specific.m4:312: AC_GNU_SOURCE is expanded from...
  configure.ac:14: the top level

Since in Gnulib we assume autoconf >= 2.64 (see NEWS entry from 2020-08-16)
we can remove this workaround.


2020-09-27  Bruno Haible  <bruno@xxxxxxxxx>

	extensions: Simplify last commit.
	* m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't require
	AC_GNU_SOURCE ever.

diff --git a/m4/extensions.m4 b/m4/extensions.m4
index 22fdb03..3179080 100644
--- a/m4/extensions.m4
+++ b/m4/extensions.m4
@@ -1,4 +1,4 @@
-# serial 19  -*- Autoconf -*-
+# serial 20  -*- Autoconf -*-
 # Enable extensions on systems that normally disable them.
 
 # Copyright (C) 2003, 2006-2020 Free Software Foundation, Inc.
@@ -177,13 +177,5 @@ dnl configure.ac when using autoheader 2.62.
 # typically due to standards-conformance issues.
 AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS],
 [
-  dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS.
-  dnl gnulib does not need it. But if it gets required by third-party macros
-  dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a
-  dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
-  dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE,
-  dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck.
-  m4_version_prereq([2.64], [], [AC_REQUIRE([AC_GNU_SOURCE])])
-
   AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
 ])





[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux