Commit 42548148 authored by Thomas Markwalder's avatar Thomas Markwalder
Browse files

[master] Configure now supports static boost_system lib with static linking

    Merges branch 'trac5337'
parents 494cd627 deb49fc9
......@@ -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_link != "no"; then
CXX_SAVED=$CXX
CXX="$CXX -static"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([#include <math.h>],[(void)sqrt(-1.0);])],
[AC_MSG_RESULT([checking for static glib libraries... yes])],
[AC_MSG_RESULT([checking for static glib libraries... no])
AC_MSG_ERROR([Building with --enable-static-link does not work. You appear to be missing glib static libraries. Check config.log for details.])])
CXX=$CXX_SAVED
fi
AC_SUBST(KEA_CXXFLAGS)
......
......@@ -196,14 +196,18 @@ if test "x${BOOST_LIBS}" != "x"; then
LIBS_SAVED="$LIBS"
LIBS="$BOOST_LIBS $LIBS"
if test $enable_static_link = yes; then
LIBS="-static $LIBS"
fi
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([#include <boost/system/error_code.hpp>],
[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])])
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.])])
LIBS="$LIBS_SAVED"
LIBS="$LIBS_SAVED"
fi
CXXFLAGS="$CXXFLAGS_SAVED"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment