From 9b091988719d9b295412ad7ae869bd19da465bf3 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 10 Feb 2010 13:30:54 +0100 Subject: [PATCH] Always check for Boost::System, and do that before the Boost::Filesystem check --- ac/ax_boost_filesystem_dependencies.m4 | 32 -------------------------- ac/boost.m4 | 16 ++++--------- configure.in | 1 - 3 files changed, 5 insertions(+), 44 deletions(-) delete mode 100644 ac/ax_boost_filesystem_dependencies.m4 diff --git a/ac/ax_boost_filesystem_dependencies.m4 b/ac/ax_boost_filesystem_dependencies.m4 deleted file mode 100644 index ac4f0422f..000000000 --- a/ac/ax_boost_filesystem_dependencies.m4 +++ /dev/null @@ -1,32 +0,0 @@ -AC_DEFUN([AX_BOOST_FILESYSTEM_DEPENDENCIES],[ - AC_CACHE_CHECK([if Boost::Filesystem requires Boost::System], - [ax_cv_boost_dependencies_system],[ - CPPFLAGS_SAVED="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - - LDFLAGS_SAVED="$LDFLAGS" - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - LIBS_SAVED="$LIBS" - LIBS="$LIBS $BOOST_FILESYSTEM_LIB" - export LIBS - - AC_LANG_PUSH(C++) - AC_LINK_IFELSE([ - AC_LANG_PROGRAM([ - #include - ],[ - boost::filesystem::path p1("/etc/hosts"); - int i = boost::filesystem::basename(p1).length(); - ])], - [ax_cv_boost_dependencies_system=no], - [ax_cv_boost_dependencies_system=yes]) - AC_LANG_POP() - - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" - LIBS="$LIBS_SAVED" - ]) -]) diff --git a/ac/boost.m4 b/ac/boost.m4 index 56efcb942..c9f8f0c95 100644 --- a/ac/boost.m4 +++ b/ac/boost.m4 @@ -1,6 +1,11 @@ # boost's headers must be present. AX_BOOST_BASE([1.34.0]) +# boost::system can be absend for older versions. However, the test +# for boost::filesystem might fail if boost::system is not available +# with newer versions. +AX_BOOST_SYSTEM() + # boost::filesystem must be present. AX_BOOST_FILESYSTEM() @@ -8,17 +13,6 @@ if test x"$ax_cv_boost_filesystem" != "xyes"; then AC_MSG_ERROR(The Boost Filesystem library was not found.) fi -# boost::system must be present if boost::filesystem needs it. -AX_BOOST_FILESYSTEM_DEPENDENCIES() - -if test x"$ax_cv_boost_dependencies_system" = "xyes"; then - AX_BOOST_SYSTEM() - - if test x"$ax_cv_boost_system" != "xyes"; then - AC_MSG_ERROR(The Boost System library was not found.) - fi -fi - # boost::regex must be present. AX_BOOST_REGEX() diff --git a/configure.in b/configure.in index 51e2b4d06..38a16d18d 100644 --- a/configure.in +++ b/configure.in @@ -38,7 +38,6 @@ m4_include(ac/qt4.m4) m4_include(ac/magic.m4) m4_include(ac/ax_boost_base.m4) m4_include(ac/ax_boost_filesystem.m4) -m4_include(ac/ax_boost_filesystem_dependencies.m4) m4_include(ac/ax_boost_foreach.m4) m4_include(ac/ax_boost_regex.m4) m4_include(ac/ax_boost_system.m4)