Untitled
# Check whether --with-boost-system was given. if test ${with_boost_system+y} then : withval=$with_boost_system; if test "$withval" = "no"; then want_boost="no" elif test "$withval" = "yes"; then want_boost="yes" ax_boost_user_system_lib="" else want_boost="yes" ax_boost_user_system_lib="$withval" fi else $as_nop want_boost="yes" fi if test "x$want_boost" = "xyes"; then CPPFLAGS_SAVED="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" export CPPFLAGS LDFLAGS_SAVED="$LDFLAGS" LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" export LDFLAGS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the Boost::System library is available" >&5 printf %s "checking whether the Boost::System library is available... " >&6; } if test ${ax_cv_boost_system+y} then : printf %s "(cached) " >&6 else $as_nop ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu CXXFLAGS_SAVE=$CXXFLAGS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <boost/system/error_code.hpp> int main (void) { boost::system::system_category ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : ax_cv_boost_system=yes else $as_nop ax_cv_boost_system=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CXXFLAGS=$CXXFLAGS_SAVE ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_boost_system" >&5 printf "%s\n" "$ax_cv_boost_system" >&6; } if test "x$ax_cv_boost_system" = "xyes"; then printf "%s\n" "#define HAVE_BOOST_SYSTEM /**/" >>confdefs.h BOOSTLIBDIR=echo $BOOST_LDFLAGS | sed -e 's/[^\/]*//' LDFLAGS_SAVE=$LDFLAGS if test "x$ax_boost_user_system_lib" = "x"; then for libextension in ls $BOOSTLIBDIR/libboost_system*.{so,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_system.*\)\.so.*$;\1;' -e 's;^lib\(boost_system.*\)\.a*$;\1;' ; do ax_lib=${libextension} as_ac_Lib=printf "%s\n" "ac_cv_lib_$ax_lib""_exit" | $as_tr_sh { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5 printf %s "checking for exit in -l$ax_lib... " >&6; } if eval test \${$as_ac_Lib+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-l$ax_lib $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ namespace conftest { extern "C" int exit (); } int main (void) { return conftest::exit (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO" then : eval "$as_ac_Lib=yes" else $as_nop eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes" then : BOOST_SYSTEM_LIB="-l$ax_lib"; link_system="yes"; break else $as_nop link_system="no" fi done if test "x$link_system" != "xyes"; then for libextension in ls $BOOSTLIBDIR/boost_system*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_system.*\)\.dll.*$;\1;' -e 's;^\(boost_system.*\)\.a*$;\1;' ; do ax_lib=${libextension} as_ac_Lib=printf "%s\n" "ac_cv_lib_$ax_lib""_exit" | $as_tr_sh { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5 printf %s "checking for exit in -l$ax_lib... " >&6; } if eval test \${$as_ac_Lib+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-l$ax_lib $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ namespace conftest { extern "C" int exit (); } int main (void) { return conftest::exit (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO" then : eval "$as_ac_Lib=yes" else $as_nop eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes" then : BOOST_SYSTEM_LIB="-l$ax_lib"; link_system="yes"; break else $as_nop link_system="no" fi done fi else for ax_lib in $ax_boost_user_system_lib boost_system-$ax_boost_user_system_lib; do as_ac_Lib=printf "%s\n" "ac_cv_lib_$ax_lib""_exit" | $as_tr_sh { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5 printf %s "checking for exit in -l$ax_lib... " >&6; } if eval test \${$as_ac_Lib+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-l$ax_lib $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ namespace conftest { extern "C" int exit (); } int main (void) { return conftest::exit (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO" then : eval "$as_ac_Lib=yes" else $as_nop eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes" then : BOOST_SYSTEM_LIB="-l$ax_lib"; link_system="yes"; break else $as_nop link_system="no" fi done fi if test "x$link_system" = "xno"; then as_fn_error $? "Could not link against $ax_lib !" "$LINENO" 5 fi fi CPPFLAGS="$CPPFLAGS_SAVED" LDFLAGS="$LDFLAGS_SAVED" fi if test -z "$BOOST_SYSTEM_LIB" then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: boost_filesystem library not found. This may be problem if boost 1.35 or later is used. Install it or use --with-boost-system switch" >&5 printf "%s\n" "$as_me: boost_filesystem library not found. This may be problem if boost 1.35 or later is used. Install it or use --with-boost-system switch" >&6;} fi
Leave a Comment