lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master afebc70 10/28: Use boost_regex.hpp wrapper in


From: Greg Chicares
Subject: [lmi-commits] [lmi] master afebc70 10/28: Use boost_regex.hpp wrapper in configure test too
Date: Wed, 12 May 2021 18:14:43 -0400 (EDT)

branch: master
commit afebc70364a2d3ccf368c1d20da868c903df10c7
Author: Vadim Zeitlin <vadim@tt-solutions.com>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Use boost_regex.hpp wrapper in configure test too
    
    Instead of manually disabling some of the warnings disabled in this
    header when testing, just include it to disable all of them.
    
    This allows configure to detect Boost.Regex in the CI build as the test
    failed due -Wparentheses-equality being given by clang-11 without it.
---
 configure.ac | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index 4febcda..cf2844d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -392,10 +392,6 @@ else
 if it is installed in non default location"
 fi
 
-dnl Prevent warnings due to the use of "register" in Boost.Regex headers that
-dnl are actually fatal errors with clang in C++17 mode.
-CPPFLAGS="$save_CPPFLAGS -Dregister="
-
 dnl latest versions of boost extract some common functionality in
 dnl libboost_system which we must link when using any other Boost library, so
 dnl check for it first
@@ -403,10 +399,12 @@ 
AC_CHECK_LIB($boost_libsystem,main,BOOST_LIBS="-l$boost_libsystem")
 
 dnl usually when we want to check for a library we use AC_CHECK_LIB and main()
 dnl but since under mingw with -pedantic and -std= options test does not pass
-dnl we are forced to use a bit more sophisticated construct
+dnl we are forced to use a bit more sophisticated construct and include our own
+dnl wrapper header which disables various warnings that occur in Boost headers
 
+CPPFLAGS="$save_CPPFLAGS -I$srcdir"
 LIBS="$save_LIBS -l$boost_libregex"
-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <boost/regex.hpp>]],
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "boost_regex.hpp"]],
     [[boost::regex *r]])],
     [],
     [AC_MSG_FAILURE([Boost regex library $boost_libregex not found, $errmsg])]



reply via email to

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