]> git.mxchange.org Git - flightgear.git/blobdiff - configure.ac
Add autoconf macro and better variable handling for Boost.
[flightgear.git] / configure.ac
index 377725771a735e2f222e77d953c5c3b322e8bb02..d0e9ac3f18fca756a22255895f2673fccff8b21a 100644 (file)
@@ -20,6 +20,11 @@ AC_PROG_CXX
 AC_PROG_RANLIB
 AC_PROG_INSTALL
 AC_PROG_LN_S
+AX_BOOST_BASE([1.34.0])
+
+if test "x$BOOST_CPPFLAGS" != "x-I/usr/include" ; then
+   CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+fi
 
 # specify the simgear location
 AC_ARG_WITH(simgear, [  --with-simgear=PREFIX   Specify the prefix path to SimGear])
@@ -46,14 +51,6 @@ if test "x$with_osg" != "x" ; then
     EXTRA_DIRS="${EXTRA_DIRS} $with_osg"
 fi
 
-# specify Boost location
-AC_ARG_WITH(osg, [  --with-boost=PREFIX       Specify the prefix path to Boost])
-
-if test "x$with_boost" != "x" ; then
-    echo "Boost prefix is $with_boost"
-    EXTRA_DIRS="${EXTRA_DIRS} $with_boost"
-fi
-
 dnl Determine an extra directories to add to include/lib search paths
 case "${host}" in
 *-apple-darwin* | *-*-mingw32*)
@@ -513,15 +510,6 @@ if test "x$ac_cv_header_osg_Version" != "xyes"; then
     exit
 fi
 
-AC_CHECK_HEADER(boost/foreach.hpp)
-if test "x$ac_cv_header_boost_foreach_hpp" != "xyes"; then
-   echo
-   echo "You *must* have the Boost libraries installed."
-   echo
-   echo "configure aborted."
-   exit
-fi
-
 # Find the OSG libraries.  Note special handling for OS X frameworks
 case "${host}" in
 *-apple-darwin*)