summaryrefslogtreecommitdiff
path: root/tools/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'tools/configure.ac')
-rw-r--r--tools/configure.ac72
1 files changed, 40 insertions, 32 deletions
diff --git a/tools/configure.ac b/tools/configure.ac
index 7762b5ba..e3149a18 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -65,6 +65,16 @@ AC_ARG_ENABLE(doxygen,
AM_CONDITIONAL(USE_DOXYGEN, test x$doxygen = xtrue)
+AC_ARG_ENABLE(cache,
+ [ --enable-cache Enable use of the --cache option],
+ [case "${enableval}" in
+ yes) cache=true ;;
+ no) cache=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-cache) ;;
+ esac],[cache=false])
+
+AM_CONDITIONAL(USE_CACHE_OPTION, test x$cache = xtrue)
+
AC_ARG_ENABLE(python,
[ --enable-python Turn on Python support (experimental)],
[case "${enableval}" in
@@ -315,38 +325,36 @@ else
fi
# check for boost_serialization
-# AC_CACHE_CHECK(
-# [if boost_serialization is available],
-# [boost_serialization_cpplib_avail_cv_],
-# [boost_serialization_save_libs=$LIBS
-# LIBS="-lboost_serialization$BOOST_SUFFIX -lboost_system$BOOST_SUFFIX $LIBS"
-# AC_LANG_PUSH(C++)
-# AC_LINK_IFELSE(
-# [AC_LANG_PROGRAM(
-# [[#include <boost/archive/binary_oarchive.hpp>
-# #include <iostream>
-# struct foo {
-# int a;
-# template<class Archive>
-# void serialize(Archive & ar, const unsigned int) {
-# ar & a;
-# }
-# };]],
-# [[boost::archive::binary_oarchive oa(std::cout);
-# foo x;
-# oa << x;]])],
-# [boost_serialization_cpplib_avail_cv_=true],
-# [boost_serialization_cpplib_avail_cv_=false])
-# AC_LANG_POP
-# LIBS=$boost_serialization_save_libs])
-#
-# if [test x$boost_serialization_cpplib_avail_cv_ = xtrue ]; then
-# AC_DEFINE([HAVE_BOOST_SERIALIZATION], [1], [Whether Boost.Serialization is available])
-# LIBS="-lboost_serialization$BOOST_SUFFIX $LIBS"
-# fi
-# AM_CONDITIONAL(HAVE_BOOST_SERIALIZATION, test x$boost_serialization_cpplib_avail_cv_ = xtrue)
-
-AM_CONDITIONAL(HAVE_BOOST_SERIALIZATION, false)
+AC_CACHE_CHECK(
+ [if boost_serialization is available],
+ [boost_serialization_cpplib_avail_cv_],
+ [boost_serialization_save_libs=$LIBS
+ LIBS="-lboost_serialization$BOOST_SUFFIX -lboost_system$BOOST_SUFFIX $LIBS"
+ AC_LANG_PUSH(C++)
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <boost/archive/binary_oarchive.hpp>
+ #include <iostream>
+ struct foo {
+ int a;
+ template<class Archive>
+ void serialize(Archive & ar, const unsigned int) {
+ ar & a;
+ }
+ };]],
+ [[boost::archive::binary_oarchive oa(std::cout);
+ foo x;
+ oa << x;]])],
+ [boost_serialization_cpplib_avail_cv_=true],
+ [boost_serialization_cpplib_avail_cv_=false])
+ AC_LANG_POP
+ LIBS=$boost_serialization_save_libs])
+
+if [test x$boost_serialization_cpplib_avail_cv_ = xtrue -a x$cache = xtrue]; then
+ AC_DEFINE([HAVE_BOOST_SERIALIZATION], [1], [Whether Boost.Serialization is available])
+ LIBS="-lboost_serialization$BOOST_SUFFIX $LIBS"
+fi
+AM_CONDITIONAL(HAVE_BOOST_SERIALIZATION, test x$boost_serialization_cpplib_avail_cv_ = xtrue -a x$cache = xtrue)
# check for Python
if [ test x$python = xtrue ]; then