forked from premiere/premiere-libtorrent
Autotools: Check if std::chrono and std::random are available.
If yes, don't even try to find their Boost equivalents.
This commit is contained in:
parent
43d7f980d0
commit
d93869ff3b
32
configure.ac
32
configure.ac
|
@ -123,17 +123,27 @@ AX_BOOST_SYSTEM()
|
|||
AS_IF([test -z "$BOOST_SYSTEM_LIB"],
|
||||
[AC_MSG_ERROR(Boost.System library not found. Try using --with-boost-system=lib)])
|
||||
|
||||
AX_BOOST_CHRONO()
|
||||
AS_IF([test -z "$BOOST_CHRONO_LIB"],
|
||||
[AC_MSG_ERROR(Boost.Chrono library not found. Try using --with-boost-chrono=lib)])
|
||||
AC_LANG_PUSH([C++])
|
||||
AC_CHECK_HEADERS([chrono])
|
||||
AC_CHECK_HEADERS([random])
|
||||
AC_LANG_POP
|
||||
|
||||
AX_BOOST_RANDOM()
|
||||
AS_IF([test -z "$BOOST_RANDOM_LIB"],
|
||||
AS_IF([test "x$ac_cv_header_chrono" = "xno"],
|
||||
[AX_BOOST_CHRONO()
|
||||
AS_IF([test -z "$BOOST_CHRONO_LIB"],
|
||||
[AC_MSG_ERROR(Boost.Chrono library not found. Try using --with-boost-chrono=lib)])
|
||||
LIBS="$BOOST_CHRONO_LIB $LIBS"
|
||||
])
|
||||
|
||||
AS_IF([test "x$ac_cv_header_random" = "xno"],
|
||||
[AX_BOOST_RANDOM()
|
||||
AS_IF([test -z "$BOOST_RANDOM_LIB"],
|
||||
[AC_MSG_ERROR(Boost.Random library not found. Try using --with-boost-random=lib)])
|
||||
LIBS="$BOOST_RANDOM_LIB $LIBS"
|
||||
])
|
||||
|
||||
CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
|
||||
LDFLAGS="$BOOST_LDFLAGS $LDFLAGS"
|
||||
LIBS="$BOOST_CHRONO_LIB $BOOST_RANDOM_LIB $LIBS"
|
||||
|
||||
###############################################################################
|
||||
# Checking for functions and other stuffs
|
||||
|
@ -642,9 +652,19 @@ Boost libraries:
|
|||
CPPFlags: ${BOOST_CPPFLAGS}
|
||||
LDFlags: ${BOOST_LDFLAGS}
|
||||
boost.system: ${BOOST_SYSTEM_LIB}
|
||||
END
|
||||
|
||||
AS_IF([test "x$ac_cv_header_chrono" = "xno"], [
|
||||
cat >> config.report << END
|
||||
boost.chrono: ${BOOST_CHRONO_LIB}
|
||||
END
|
||||
])
|
||||
|
||||
AS_IF([test "x$ac_cv_header_random" = "xno"], [
|
||||
cat >> config.report << END
|
||||
boost.random: ${BOOST_RANDOM_LIB}
|
||||
END
|
||||
])
|
||||
|
||||
AS_IF([test "x$ARG_ENABLE_PYTHON_BINDING" = "xyes"], [
|
||||
cat >> config.report << END
|
||||
|
|
Loading…
Reference in New Issue