diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-12-27 16:18:55 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-12-27 16:18:55 +0200 |
commit | 1741b8e80e92135d80eaa2e22cf90b027034b58d (patch) | |
tree | eea0744ff53a2d140e7a3495e001f101077679ba /configure.ac | |
parent | 30482c4da156d4ce6249b9cebdc8cb63ec1b60c3 (diff) |
Add support for using external boost in autotools build system
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 5691eb1..9b71e7f 100644 --- a/configure.ac +++ b/configure.ac @@ -24,6 +24,38 @@ AC_LANG(C++) # LT_OUTPUT +# Check if we need to use external Boost. +# +AC_MSG_CHECKING([if we should use external boost]) + +AC_ARG_WITH( + [external-boost], + [AC_HELP_STRING([--with-external-boost],[use external boost instead of the internal subset])], + [external_boost=${withval}], + [external_boost=no]) + +if test x"$external_boost" != xno; then + AC_MSG_RESULT([yes]) + + # Check if we have Boost. + # + boost_found=yes + LIBBOOST([],[boost_found=no]) + LIBBOOST_REGEX([],[boost_found=no]) + LIBBOOST_SYSTEM + + if test x"$boost_found" == xno; then + AC_MSG_ERROR([boost regex is not found; consider using CPPFLAGS/LDFLAGS or --with-boost=DIR to specify its location]) + fi + + AC_DEFINE([LIBCUTL_EXTERNAL_BOOST], [1], [Use external boost.]) +else + AC_MSG_RESULT([no]) +fi + +AM_CONDITIONAL([LIBCUTL_EXTERNAL_BOOST], [test x"$external_boost" != xno]) + + # Define LIBODB_STATIC_LIB if we are build static library on certain platforms. # STATIC_LIB([LIBCUTL_STATIC_LIB], [Static library interface.]) |