include_next: silence autoconf 2.68 warning
authorEric Blake <eblake@redhat.com>
Thu, 26 Aug 2010 22:12:06 +0000 (16:12 -0600)
committerEric Blake <eblake@redhat.com>
Thu, 26 Aug 2010 22:16:46 +0000 (16:16 -0600)
Next warning spotted by Autoconf; this time it is spurious (when
checking for a working include_next, we could care less what other
defines have already been provided by AC_DEFINE).  Which makes this
the first real-world use case outside of autoconf guts that can
reasonably use the new autoconf macro.

* m4/include_next.m4 (gl_INCLUDE_NEXT): Mark this use of
AC_COMPILE_IFELSE as special.
(AC_LANG_DEFINES_PROVIDED): Provide dummy implementation for
autoconf < 2.68.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
m4/include_next.m4

index 5ae6823..146e522 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2010-08-26  Eric Blake  <eblake@redhat.com>
 
+       include_next: silence autoconf 2.68 warning
+       * m4/include_next.m4 (gl_INCLUDE_NEXT): Mark this use of
+       AC_COMPILE_IFELSE as special.
+       (AC_LANG_DEFINES_PROVIDED): Provide dummy implementation for
+       autoconf < 2.68.
+
        acl: fix compilation test
        * m4/acl.m4 (gl_FUNC_ALL): Use correct format for
        AC_COMPILE_IFELSE.
index c7e0672..51a719b 100644 (file)
@@ -1,4 +1,4 @@
-# include_next.m4 serial 14
+# include_next.m4 serial 15
 dnl Copyright (C) 2006-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -68,10 +68,11 @@ EOF
 EOF
      gl_save_CPPFLAGS="$CPPFLAGS"
      CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
-     AC_COMPILE_IFELSE([#include <conftest.h>],
+dnl We intentionally avoid using AC_LANG_SOURCE here.
+     AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include <conftest.h>]],
        [gl_cv_have_include_next=yes],
        [CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
-        AC_COMPILE_IFELSE([#include <conftest.h>],
+        AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include <conftest.h>]],
           [gl_cv_have_include_next=buggy],
           [gl_cv_have_include_next=no])
        ])
@@ -185,3 +186,7 @@ AC_DEFUN([gl_CHECK_NEXT_HEADERS],
        [$gl_next_as_first_directive])
      AS_VAR_POPDEF([gl_next_header])])
 ])
+
+# Autoconf 2.68 added warnings for our use of AC_COMPILE_IFELSE;
+# this fallback is safe for all earlier autoconf versions.
+m4_define_default([AC_LANG_DEFINES_PROVIDED])