]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5215] Building with boost_system library is now the default
authorThomas Markwalder <tmark@isc.org>
Fri, 14 Jul 2017 18:04:21 +0000 (14:04 -0400)
committerThomas Markwalder <tmark@isc.org>
Fri, 14 Jul 2017 18:04:21 +0000 (14:04 -0400)
configure.ac
    Added WARNING message when building boost headers only.

m4macros/ax_boost_for_kea.m4
    Building with boost system library is the default.

    Added --enable-boost-headers-only, to explicitly build with boost
    headers only, rather than linking to boost's system library.

configure.ac
m4macros/ax_boost_for_kea.m4

index 2380729c94e982a8e1703b3501fc442cd9689598..279970643ffd4653e3261ff8d2caa9326e7ce1cd 100644 (file)
@@ -1346,7 +1346,7 @@ if test $enable_gtest != "no"; then
        [AC_MSG_ERROR([XXX_TRUE() Google Test macros won't compile; the most likely reason is that a later version of Google Test is required])])
     CPPFLAGS=$CPPFLAGS_SAVED
 fi
-           
+
 # Check for CreateUnifiedDiff from gtest >= 1.8.0
 if test $enable_gtest != "no"; then
    AC_MSG_CHECKING([for CreateUnifiedDiff in $GTEST_INCLUDES/gtest.h])
@@ -1370,7 +1370,7 @@ if test $enable_gtest != "no"; then
         [Define to 1 if gtest defines edit_distance::CreateUnifiedDiff])],
        [AC_MSG_RESULT(no)])
     CPPFLAGS=$CPPFLAGS_SAVED
-fi    
+fi
 
 #
 # ASIO: we extensively use it as the C++ event management module.
@@ -1811,6 +1811,18 @@ Boost:
   BOOST_INCLUDES:  ${BOOST_INCLUDES}
   BOOST_LIBS:      ${BOOST_LIBS}
 
+END
+if test x"$BOOST_LIBS" = "x"; then
+   cat >> config.report << END
+    WARNING: You will be building with boost headers only rather
+    than linking with boost_system library. This is NOT recommended as
+    it may result in non-optimized code on some platforms and
+    introduce runtime errors on others.
+
+END
+fi
+
+cat >> config.report << END
 ${CRYPTO_NAME}:
   CRYPTO_VERSION:  ${CRYPTO_VERSION}
   CRYPTO_CFLAGS:   ${CRYPTO_CFLAGS}
index a2111c10aefc644f0abcfe0ddaf802c5ac8ef32a..31ef5f45614afde0ddf4426b528030791a62f52d 100644 (file)
@@ -40,7 +40,7 @@ AC_LANG([C++])
 
 DISTCHECK_BOOST_CONFIGURE_FLAG=
 
-# No library by default (and as goal)
+# We'll attempt to Use Boost system library by default
 BOOST_LIBS=
 BOOST_LIB_DIR=
 boost_lib_path=
@@ -157,6 +157,15 @@ AC_ARG_WITH([boost-lib-dir],
     [BOOST_LIB_DIR="$withval"
      DISTCHECK_BOOST_CONFIGURE_FLAG="$DISTCHECK_BOOST_CONFIGURE_FLAG --with-boot-lib-dir=$withval"])
 
+AC_ARG_ENABLE([boost-headers-only],
+    [AS_HELP_STRING([--enable-boost-headers-only],
+        [Build with boost headers only rather than link
+         with boost_system library. This is NOT recommended
+         as it may result in non-optimized code on some
+         platforms or introduce runtime errors on others.])],
+    [enable_boost_header="yes"; BOOST_LIBS=""],
+    [BOOST_LIBS="${BOOST_LIBS} -lboost_system"])
+
 # BOOST_ERROR_CODE_HEADER_ONLY in versions below Boost 1.56.0 can fail
 # to find the error_code.cpp file.
 if test "x${BOOST_LIBS}" = "x"; then