mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-24 20:01:53 +00:00
Always check for Boost::System, and do that before the Boost::Filesystem check
This commit is contained in:
parent
ce11e3bc1c
commit
9b09198871
@ -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.hpp>
|
||||
],[
|
||||
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"
|
||||
])
|
||||
])
|
16
ac/boost.m4
16
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()
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user