Re: Disable the present-but-cannot-be-compiled header warning?

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Paolo Bonzini on 10/29/2008 2:28 PM:
> You should use four-arguments AC_CHECK_HEADERS.  Pass
> AC_INCLUDES_DEFAULT as the fourth argument if you want to filter out
> headers that cannot be compiled; pass [-] if you don't want that.
> 
> This is undocumented, I admit.

Not anymore ;)

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@xxxxxxx
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkKhEkACgkQ84KuGfSFAYB6rgCeNwg6X6ichx1SNlsinYTF3KMK
uagAn1MuNPoupeNbvq0Ep3Q74AL7ApJr
=m0h3
-----END PGP SIGNATURE-----
>From cd9fbb8453739ef795a6a64192610265d49577d2 Mon Sep 17 00:00:00 2001
From: Eric Blake <ebb9@xxxxxxx>
Date: Thu, 30 Oct 2008 22:05:55 -0600
Subject: [PATCH] Better documentation of AC_CHECK_HEADER's fourth argument.

* doc/autoconf.texi (Generic Headers) <AC_CHECK_HEADER>: Mention
how to suppress compiler or preprocessor header check.
Reported by Jeff Squyres.

Signed-off-by: Eric Blake <ebb9@xxxxxxx>
---
 ChangeLog         |    7 +++++++
 doc/autoconf.texi |   27 +++++++++++++++++++--------
 2 files changed, 26 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 457d711..d1c89f9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2008-10-30  Eric Blake  <ebb9@xxxxxxx>
 
+	Better documentation of AC_CHECK_HEADER's fourth argument.
+	* doc/autoconf.texi (Generic Headers) <AC_CHECK_HEADER>: Mention
+	how to suppress compiler or preprocessor header check.
+	Reported by Jeff Squyres.
+
+2008-10-30  Eric Blake  <ebb9@xxxxxxx>
+
 	Fix LINENO testsuite failure.
 	* tests/m4sh.at (AT_DATA_LINENO): Use AS_LINENO_PREPARE, not
 	undocumented _AS_PREPARE, and move unset earlier in script.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index f10eeae..35c9bfa 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -5795,7 +5795,7 @@ Generic Headers
 
 @anchor{AC_CHECK_HEADER}
 @defmac AC_CHECK_HEADER (@var{header-file}, @ovar{action-if-found}, @
-  @ovar{action-if-not-found}, @dvar{includes, AC_INCLUDES_DEFAULT})
+  @ovar{action-if-not-found}, @ovar{includes})
 @acindex{CHECK_HEADER}
 If the system header file @var{header-file} is compilable, execute shell
 commands @var{action-if-found}, otherwise execute
@@ -5803,9 +5803,20 @@ Generic Headers
 header file is available, consider using @code{AC_CHECK_HEADERS}
 instead.
 
-@var{includes} is a series of include directives, defaulting to
-@code{AC_INCLUDES_DEFAULT} (@pxref{Default Includes}), which are used
-prior to the header under test.
+@var{includes} is decoded to determine the appropriate include
+directives.  If omitted, @file{configure} will check for both header
+existence (with the preprocessor) and usability (with the compiler),
+using @code{AC_INCLUDES_DEFAULT} for the compile test.  Currently, if
+there is a discrepancy between the results, a warning is issued to the
+user, and the preprocessor results are favored (@pxref{Present But
+Cannot Be Compiled}); but a future release may switch to favoring the
+compiler results.  If @var{includes} is exactly @samp{-}, then only a
+preprocessor check is performed, without regard to prerequisite headers.
+For anything else, only a compiler check is performed, using
+@var{includes} as the set of preprocessor directives to use prior to
+including the header under test, in which case, it is common to manually
+list @code{AC_INCLUDES_DEFAULT} (@pxref{Default Includes}) along with
+any other prerequisite headers.
 
 For compatibility issues with older versions of Autoconf, please read
 below.
@@ -5814,7 +5825,7 @@ Generic Headers
 @anchor{AC_CHECK_HEADERS}
 @defmac AC_CHECK_HEADERS (@var{header-file}@dots{}, @
   @ovar{action-if-found}, @ovar{action-if-not-found}, @
-  @dvar{includes, AC_INCLUDES_DEFAULT})
+  @ovar{includes})
 @acindex{CHECK_HEADERS}
 @cvindex HAVE_@var{header}
 For each given system header file @var{header-file} in the
@@ -5825,9 +5836,9 @@ Generic Headers
 the loop on the first match.  If @var{action-if-not-found} is given, it
 is executed when one of the header files is not found.
 
-@var{includes} is a series of include directives, defaulting to
-@code{AC_INCLUDES_DEFAULT} (@pxref{Default Includes}), which are used
-prior to the headers under test.
+@var{includes} is interpreted as in @code{AC_CHECK_HEADER}, in order to
+choose the set of preprocessor directives supplied before the header
+under test.
 
 For compatibility issues with older versions of Autoconf, please read
 below.
-- 
1.6.0.2

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

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

  Powered by Linux