From 4c196cb4978b7f595f64a52c976e5b9e860b1992 Mon Sep 17 00:00:00 2001 From: Guido Kanschat Date: Thu, 23 Mar 2006 21:42:30 +0000 Subject: [PATCH] move boost detection to aclocal.m4 git-svn-id: https://svn.dealii.org/trunk@12668 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/aclocal.m4 | 21 +++++++++++++++++++++ deal.II/configure | 41 +++++++++++++++++++++-------------------- deal.II/configure.in | 20 +++----------------- 3 files changed, 45 insertions(+), 37 deletions(-) diff --git a/deal.II/aclocal.m4 b/deal.II/aclocal.m4 index ba88876f3f..b605f7256b 100644 --- a/deal.II/aclocal.m4 +++ b/deal.II/aclocal.m4 @@ -3727,6 +3727,27 @@ AC_DEFUN(DEAL_II_CHECK_WSYNTH_AND_STD_COMPLEX, dnl ]) +dnl ------------------------------------------------------------- +dnl Check for boost option and find pre-installed boost +dnl ------------------------------------------------------------- + +AC_DEFUN(DEAL_II_CHECK_BOOST, dnl +[ AC_ARG_WITH(boost, + [ --with-boost=/path/to/boost use an installed boost library instead of the + contributed one. The optional argument points to the directory containing + the boost subdirectory for header files.], + DEAL_II_WITH_BOOST($withval)) + + AC_MSG_NOTICE("Checking for boost include files in $BOOST_INCLUDE_DIR") + CPPFLAGS="$BOOST_INCLUDE_DIR $CPPFLAGS" + AC_CHECK_HEADER(boost/shared_ptr.hpp,, + [AC_MSG_ERROR([Your boost installation is incomplete!])]) + AC_CHECK_HEADER(boost/type_traits.hpp,, + [AC_MSG_ERROR([Your boost installation is incomplete!])]) + AC_CHECK_HEADER(boost/tuple/tuple.hpp,, + [AC_MSG_ERROR([Your boost installation is incomplete!])]) + DEAL_II_CHECK_BOOST_SHARED_PTR_ASSIGNMENT +]) dnl ------------------------------------------------------------- dnl The boost::shared_ptr class has a templated assignment operator diff --git a/deal.II/configure b/deal.II/configure index b70290930c..a4f49ef478 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.225 . +# From configure.in Revision: 1.226 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for deal.II 5.3.pre. # @@ -8845,22 +8845,6 @@ fi BOOST_INCLUDE_DIR="-I$DEAL_II_PATH/contrib/boost/include" - -# Check whether --with-boost or --without-boost was given. -if test "${with_boost+set}" = set; then - withval="$with_boost" - - if test "x$withval" != "xyes" ; then - BOOST_INCLUDE_DIR="-I$withval" - else - BOOST_INCLUDE_DIR='' - fi - -fi; - -{ echo "$as_me:$LINENO: \"Checking for boost include files in $BOOST_INCLUDE_DIR\"" >&5 -echo "$as_me: \"Checking for boost include files in $BOOST_INCLUDE_DIR\"" >&6;} -CPPFLAGS="$BOOST_INCLUDE_DIR $CPPFLAGS" ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -9345,7 +9329,23 @@ fi done -if test "${ac_cv_header_boost_shared_ptr_hpp+set}" = set; then + +# Check whether --with-boost or --without-boost was given. +if test "${with_boost+set}" = set; then + withval="$with_boost" + + if test "x$withval" != "xyes" ; then + BOOST_INCLUDE_DIR="-I$withval" + else + BOOST_INCLUDE_DIR='' + fi + +fi; + + { echo "$as_me:$LINENO: \"Checking for boost include files in $BOOST_INCLUDE_DIR\"" >&5 +echo "$as_me: \"Checking for boost include files in $BOOST_INCLUDE_DIR\"" >&6;} + CPPFLAGS="$BOOST_INCLUDE_DIR $CPPFLAGS" + if test "${ac_cv_header_boost_shared_ptr_hpp+set}" = set; then echo "$as_me:$LINENO: checking for boost/shared_ptr.hpp" >&5 echo $ECHO_N "checking for boost/shared_ptr.hpp... $ECHO_C" >&6 if test "${ac_cv_header_boost_shared_ptr_hpp+set}" = set; then @@ -9491,7 +9491,7 @@ echo "$as_me: error: Your boost installation is incomplete!" >&2;} fi -if test "${ac_cv_header_boost_type_traits_hpp+set}" = set; then + if test "${ac_cv_header_boost_type_traits_hpp+set}" = set; then echo "$as_me:$LINENO: checking for boost/type_traits.hpp" >&5 echo $ECHO_N "checking for boost/type_traits.hpp... $ECHO_C" >&6 if test "${ac_cv_header_boost_type_traits_hpp+set}" = set; then @@ -9637,7 +9637,7 @@ echo "$as_me: error: Your boost installation is incomplete!" >&2;} fi -if test "${ac_cv_header_boost_tuple_tuple_hpp+set}" = set; then + if test "${ac_cv_header_boost_tuple_tuple_hpp+set}" = set; then echo "$as_me:$LINENO: checking for boost/tuple/tuple.hpp" >&5 echo $ECHO_N "checking for boost/tuple/tuple.hpp... $ECHO_C" >&6 if test "${ac_cv_header_boost_tuple_tuple_hpp+set}" = set; then @@ -9858,6 +9858,7 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + echo "$as_me:$LINENO: result: " >&5 echo "${ECHO_T}" >&6 echo "$as_me:$LINENO: result: ----------------- configuring F77 compilers -----------------" >&5 diff --git a/deal.II/configure.in b/deal.II/configure.in index 436424ac44..b854e45d5e 100644 --- a/deal.II/configure.in +++ b/deal.II/configure.in @@ -8,8 +8,8 @@ dnl In doc/Makefile some information on the kind of documentation dnl is stored. dnl dnl -dnl authors: Wolfgang Bangerth, Guido Kanschat, Ralf Hartmann and others -dnl 1999, 2000, 2001, 2002, 2003, 2004, 2005 +dnl Copyright: The deal.II authors +dnl 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 dnl @@ -213,21 +213,7 @@ DEAL_II_CHECK_BROKEN_SOCKETS dnl Check for boost option and make sure we get all files BOOST_INCLUDE_DIR="-I$DEAL_II_PATH/contrib/boost/include" -AC_ARG_WITH(boost, - [ --with-boost=/path/to/boost use an installed boost library instead of the - contributed one. The optional argument points to the directory containing - the boost subdirectory for header files.], - DEAL_II_WITH_BOOST($withval)) - -AC_MSG_NOTICE("Checking for boost include files in $BOOST_INCLUDE_DIR") -CPPFLAGS="$BOOST_INCLUDE_DIR $CPPFLAGS" -AC_CHECK_HEADER(boost/shared_ptr.hpp,, - [AC_MSG_ERROR([Your boost installation is incomplete!])]) -AC_CHECK_HEADER(boost/type_traits.hpp,, - [AC_MSG_ERROR([Your boost installation is incomplete!])]) -AC_CHECK_HEADER(boost/tuple/tuple.hpp,, - [AC_MSG_ERROR([Your boost installation is incomplete!])]) -DEAL_II_CHECK_BOOST_SHARED_PTR_ASSIGNMENT +DEAL_II_CHECK_BOOST AC_SUBST(BOOST_INCLUDE_DIR) -- 2.39.5