lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [6511] Always use AC_INCLUDES_DEFAULT() with AC_CHECK_HEAD


From: Vadim Zeitlin
Subject: [lmi-commits] [6511] Always use AC_INCLUDES_DEFAULT() with AC_CHECK_HEADER()
Date: Sat, 27 Feb 2016 21:06:11 +0000

Revision: 6511
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=6511
Author:   zeitlin
Date:     2016-02-27 21:04:47 +0000 (Sat, 27 Feb 2016)
Log Message:
-----------
Always use AC_INCLUDES_DEFAULT() with AC_CHECK_HEADER()

This skips the test for the header using the preprocessor and only uses the
compiler test which is faster and also less error-prone as the preprocessor
could fail to parse the file if it doesn't use C++11.

Modified Paths:
--------------
    lmi/trunk/configure.ac

Modified: lmi/trunk/configure.ac
===================================================================
--- lmi/trunk/configure.ac      2016-02-27 20:59:47 UTC (rev 6510)
+++ lmi/trunk/configure.ac      2016-02-27 21:04:47 UTC (rev 6511)
@@ -315,7 +315,9 @@
 dnl --- wxPdfDocument ---
 AC_CHECK_HEADER([wx/pdfdc.h],
     [],
-    [AC_MSG_ERROR([wxPdfDocument header not found.])])
+    [AC_MSG_ERROR([wxPdfDocument header not found.])],
+    [AC_INCLUDES_DEFAULT()]
+)
 
 dnl Defer to the same macro used by wxPdfDocument itself for constructing its
 dnl library name.
@@ -341,7 +343,8 @@
 
 AC_CHECK_HEADER([boost/type_traits.hpp],
     [],
-    [AC_MSG_ERROR([Boost headers not found, $errmsg])]
+    [AC_MSG_ERROR([Boost headers not found, $errmsg])],
+    [AC_INCLUDES_DEFAULT()]
 )
 
 dnl The default boost library name should be used unless otherwise specified
@@ -448,14 +451,16 @@
 dnl --- CGICC (optional) ----------------
 if test "x$lmi_cgicc_option" != "xno"; then
     lmi_found_cgicc=yes
-    AC_CHECK_HEADER("cgicc/CgiDefs.h", [], [lmi_found_cgicc=no])
+    AC_CHECK_HEADER("cgicc/CgiDefs.h", [], [lmi_found_cgicc=no], 
[AC_INCLUDES_DEFAULT()])
     AC_CHECK_FILE("libcgicc.la", [], [lmi_found_cgicc=no])
     if test "x$lmi_found_cgicc" == "xno"; then
         for m_lmi_cgicc_guess in /usr/include /usr/local/include
         do
             echo "checking with m_lmi_cgicc_guess=$m_lmi_cgicc_guess"
             AC_CHECK_HEADER([$m_lmi_cgicc_guess/cgicc/CgiDefs.h],
-                [ok_lmi_cgicc_include=$m_lmi_cgicc_guess], [])
+                [ok_lmi_cgicc_include=$m_lmi_cgicc_guess], [],
+                [AC_INCLUDES_DEFAULT()]
+            )
             if test "x$ok_lmi_cgicc_include" != "x"; then break; fi
         done
         for m_lmi_cgicc_lib_guess in /usr/lib /usr/local/lib




reply via email to

[Prev in Thread] Current Thread [Next in Thread]