]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[4009] Added --with-boost-lib-dir
authorFrancis Dupont <fdupont@isc.org>
Wed, 23 Sep 2015 20:30:55 +0000 (22:30 +0200)
committerFrancis Dupont <fdupont@isc.org>
Wed, 23 Sep 2015 20:30:55 +0000 (22:30 +0200)
doc/guide/install.xml
m4macros/ax_boost_for_kea.m4

index 4364bd54cb1caa834283fea0530ab1b4f0ea366d..d98d5252496a3b40850b885102eb3f545b6db98f 100644 (file)
           At least Boost version 1.35 is required.
   <!-- TODO: we don't check for this version -->
   <!-- NOTE: jreed has tested with 1.34, 1.38, and 1.41. -->
+          When header-only Boost error code is not available or wanted, the
+          Boost system library is required too.
         </para>
         </listitem>
 
@@ -265,6 +267,15 @@ Debian and Ubuntu:
             </listitem>
           </varlistentry>
 
+          <varlistentry>
+            <term>--with-boost-lib-dir</term>
+            <listitem>
+              <simpara>Specify the path to Boost libraries to link with
+                (same comment than for <option>--with-boost-libs</option>).
+              </simpara>
+            </listitem>
+          </varlistentry>
+
           <varlistentry>
             <term>--with-botan-config</term>
             <listitem>
@@ -339,6 +350,15 @@ Debian and Ubuntu:
       --prefix=/opt/kea</userinput></screen>
         </para>
 
+        <para>
+          If you have some problems with the header-only Boost error code
+          or you'd like to use the Boost system library in /usr/pkg/lib:
+
+          <screen>$ <userinput>./configure \
+      --with-boost-libs=-lboost_system \
+      --with-boost-lib-dir=/usr/pkg/lib</userinput></screen>
+        </para>
+
         <para>
           If the configure fails, it may be due to missing or old
           dependencies.
index 29a56e7a50ac6257e2b32a126c1ca46f63c4321f..2e51022696a74dbb16acad805e9fb8fd4d1f1197 100644 (file)
@@ -42,6 +42,7 @@ DISTCHECK_BOOST_CONFIGURE_FLAG=
 
 # No library by default (and as goal)
 BOOST_LIBS=
+BOOST_LIB_DIR=
 boost_lib_path=
 
 #
@@ -59,7 +60,7 @@ if test -z "$with_boost_include"; then
        do
                if test -f $d/include/boost/shared_ptr.hpp; then
                        boost_include_path=$d/include
-                       boost_lib_path="-L$d/lib"
+                       boost_lib_path=$d/lib
                        break
                fi
        done
@@ -149,6 +150,13 @@ AC_ARG_WITH([boost-libs],
     [BOOST_LIBS="$withval"
      DISTCHECK_BOOST_CONFIGURE_FLAG="$DISTCHECK_BOOST_CONFIGURE_FLAG --with-boost-libs=$withval"])
 
+# Get lib dir when explicitly configured
+AC_ARG_WITH([boost-lib-dir],
+  AC_HELP_STRING([--with-boost-lib-dir=PATH],
+    [specify directory where to find Boost libraries]),
+    [BOOST_LIB_DIR="$withval"
+     DISTCHECK_BOOST_CONFIGURE_FLAG="$DISTCHECK_BOOST_CONFIGURE_FLAG --with-boot-lib-dir=$withval"])
+
 # 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
@@ -163,13 +171,19 @@ if test "x${BOOST_LIBS}" = "x"; then
    [AC_MSG_RESULT(yes)],
    [AC_MSG_RESULT(no)
     AC_MSG_WARN([The Boost system library is required.])
-    BOOST_LIBS="$boost_lib_path -lboost_system"])
+    BOOST_LIBS="-lboost_system"
+    if test "x${BOOST_LIB_DIR}" = "x"; then
+       BOOST_LIB_DIR="$boost_lib_path"
+    fi])
 
    CPPFLAGS="$CXXFLAGS_SAVED2"
 fi
 
 # A Boost library is used.
 if test "x${BOOST_LIBS}" != "x"; then
+   if test "x${BOOST_LIB_DIR}" != "x"; then
+      BOOST_LIBS="-L$BOOST_LIB_DIR $BOOST_LIBS"
+   fi
    LIBS_SAVED="$LIBS"
    LIBS="$BOOST_LIBS $LIBS"