From: Thomas Markwalder Date: Tue, 25 Jul 2017 18:00:33 +0000 (-0400) Subject: [5337] Don't use libtool for boost lib test X-Git-Tag: trac5124a_base~28^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1e74d41398b49eb7a8b81b6178cdd79f9d53c8a;p=thirdparty%2Fkea.git [5337] Don't use libtool for boost lib test configure.ac Added logic block to look for glib static libs fi enable-static = yes m4macros/ax_boost_for_kea.m4 Changed to not use libtool for boost lib test. --- diff --git a/configure.ac b/configure.ac index 279970643f..6132d12368 100644 --- a/configure.ac +++ b/configure.ac @@ -440,7 +440,19 @@ if test $enable_shared != "no" -a "X$GXX" = "Xyes"; then KEA_CXXFLAGS="$KEA_CXXFLAGS -fPIC" fi +# Look for glib static libs if they're trying to do static builds +if test $enable_static = yes; then + CXX_SAVED=$CXX + CXX="$CXX -static" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([#include ],[sqrt(-1.0);])], + [AC_MSG_RESULT([checking for static glib libraries... yes])], + [AC_MSG_RESULT([checking for static glib libraries... no]) +/bin/bash: :1: command not found + + CXX=$CXX_SAVED +fi AC_SUBST(KEA_CXXFLAGS) diff --git a/m4macros/ax_boost_for_kea.m4 b/m4macros/ax_boost_for_kea.m4 index 5a8ad4c47b..e4f5698b76 100644 --- a/m4macros/ax_boost_for_kea.m4 +++ b/m4macros/ax_boost_for_kea.m4 @@ -200,23 +200,14 @@ if test "x${BOOST_LIBS}" != "x"; then LIBS="-static $LIBS" fi - # Wrap the compilation in libtool as we do in our Makefiles - # when linking. That way if we're static linking we should - # get the same result our Makefiles would. We don't provide - # a path to our libtool as it may not exist yet. - CXX_SAVED="$CXX" - CXX="libtool --tag=CXX --mode=link $CXX" - AC_LINK_IFELSE( [AC_LANG_PROGRAM([#include ], [boost::system::error_code ec;])], [AC_MSG_RESULT([checking for Boost system library... yes])], [AC_MSG_RESULT([checking for Boost system library... no]) - AC_MSG_ERROR([Linking with ${BOOST_LIBS} is not enough: please make sure libboost_system is installed; - Check config.log for details, you may be missing other libraries.])]) + AC_MSG_ERROR([Linking with ${BOOST_LIBS} is not enough: please make sure libboost_system is installed; Check config.log for details, you may be missing other libraries.])]) - CXX="$CXX_SAVED" - LIBS="$LIBS_SAVED" + LIBS="$LIBS_SAVED" fi CXXFLAGS="$CXXFLAGS_SAVED"