Make it possible again to use AC_GNU_SOURCE together with gnulib.
authorBruno Haible <bruno@clisp.org>
Sun, 25 Jan 2009 12:17:21 +0000 (13:17 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 25 Jan 2009 12:17:21 +0000 (13:17 +0100)
ChangeLog
m4/extensions.m4

index cd4ef9a..3b762f9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-01-25  Bruno Haible  <bruno@clisp.org>
+
+       Make it possible again to use AC_GNU_SOURCE together with gnulib.
+       * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_GNU_SOURCE
+       before requiring AC_USE_SYSTEM_EXTENSIONS.
+
 2009-01-25  Jim Meyering  <meyering@redhat.com>
 
        c-strtod: avoid warnings
index 611fcfd..b7ee9ef 100644 (file)
@@ -1,7 +1,7 @@
-# serial 6  -*- Autoconf -*-
+# serial 7  -*- Autoconf -*-
 # Enable extensions on systems that normally disable them.
 
-# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2009 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -91,4 +91,14 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
 # Enable extensions on systems that normally disable them,
 # typically due to standards-conformance issues.
 AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS],
-  [AC_REQUIRE([AC_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.
+  AC_REQUIRE([AC_GNU_SOURCE])
+
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+])