changeset 13581:70435ca9024e

include_next: silence autoconf 2.68 warning 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>
author Eric Blake <eblake@redhat.com>
date Thu, 26 Aug 2010 16:12:06 -0600
parents c7df4303c8da
children 9816edcb2151
files ChangeLog m4/include_next.m4
diffstat 2 files changed, 14 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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.
--- a/m4/include_next.m4
+++ b/m4/include_next.m4
@@ -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
      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 @@
        [$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])