Boost logo

Boost :

From: Synge Todo (wistaria_at_[hidden])
Date: 2002-04-24 04:28:20


Hi All,

I'm posting a simple patch for 'libs/config/tools/configure.in', which
enables us to

1. run `configure' script from a different directory, like normal GNU
   configure scripts, and
2. specify the location of the boost main tree by --with-boost=DIR
   option.

I have confirmed that the `configure' script generated by Autoconf
2.53 works well.

Best regards,

Synge Todo
wistaria_at_[hidden]

Index: libs/config/tools/configure.in
===================================================================
RCS file: /cvsroot/boost/boost/libs/config/tools/configure.in,v
retrieving revision 1.5
diff -c -r1.5 configure.in
*** libs/config/tools/configure.in 17 Jan 2002 12:46:26 -0000 1.5
--- libs/config/tools/configure.in 24 Apr 2002 09:04:59 -0000
***************
*** 65,70 ****
--- 65,120 ----
  ]
  )
  
+ dnl Set the boost main directory.
+ AC_MSG_CHECKING(for boost main tree)
+ boost_base=
+ AC_ARG_WITH(boost,
+ AC_HELP_STRING([--with-boost=DIR],[path to the boost main tree]),
+ [
+ if test "x$withval" != "x"; then
+ if test "x$withval" != no; then
+ boost_base=`echo "$withval" | sed 's,//*,/,g' | sed 's,/$,,'`
+ if test -f "$d/boost/boost/config.hpp"; then
+ if test -f "$d/boost/libs/config/test/regression.cfg"; then :; else
+ boost_base=
+ fi
+ else
+ boost_base=
+ fi
+ fi
+ fi
+ ]
+ )
+ if test "x$boost_base" = "x"; then
+ boost_base=`expr "x$0" : 'x\(.*\)/[^/]*' \| '.'`
+ boost_base="$boost_base/../.."
+ if test -f "$d/boost/boost/config.hpp"; then
+ if test -f "$d/boost/libs/config/test/regression.cfg"; then :; else
+ boost_base=
+ fi
+ else
+ boost_base=
+ fi
+ fi
+ if test "x$boost_base" = "x"; then
+ for d in /usr/local /usr/local/lib /usr/local/src $HOME $HOME/lib $HOME/src
+ do
+ if test -f "$d/boost/boost/config.hpp"; then
+ if test -f "$d/boost/libs/config/test/regression.cfg"; then
+ boost_base="$d/boost"
+ break
+ fi
+ fi
+ done
+ fi
+ if test "x$boost_base" != "x"; then
+ AC_MSG_RESULT([$boost_base])
+ else
+ AC_MSG_RESULT([not found])
+ AC_MSG_ERROR([The boost main tree was not found.
+ Specify its location by the --with-boost option.])
+ fi
+
  
  # Save that, as it is being redefined several times
  use_ac_ext=$ac_ext
***************
*** 75,83 ****
  AC_LANG_CPLUSPLUS
  
  if test $enable_test = 'yes'; then
! CXXFLAGS="-I../../ -I./test $CXXFLAGS"
  else
! CXXFLAGS="-I../../ -I./test $CXXFLAGS -DBOOST_NO_CONFIG"
  fi
  
  dnl check for some standard libraries
--- 125,133 ----
  AC_LANG_CPLUSPLUS
  
  if test $enable_test = 'yes'; then
! CXXFLAGS="-I$boost_base -I$boost_base/libs/config/test $CXXFLAGS"
  else
! CXXFLAGS="-I$boost_base -I$boost_base/libs/config/test $CXXFLAGS -DBOOST_NO_CONFIG"
  fi
  
  dnl check for some standard libraries
***************
*** 90,96 ****
  #
  # enumerate test files and test each one:
  #
! for file in ./test/boost_no*.cxx; do
  
     basename=`echo $file | sed 's/.*boost_\(.*\)\.cxx/\1/'`
     macroname=`cat $file | grep '^//[[] []]*MACRO:' | sed 's/.*MACRO:[[] []]*\([[]_A-Z0-9[]]*\).*/\1/'`
--- 140,146 ----
  #
  # enumerate test files and test each one:
  #
! for file in $boost_base/libs/config/test/boost_no*.cxx; do
  
     basename=`echo $file | sed 's/.*boost_\(.*\)\.cxx/\1/'`
     macroname=`cat $file | grep '^//[[] []]*MACRO:' | sed 's/.*MACRO:[[] []]*\([[]_A-Z0-9[]]*\).*/\1/'`
***************
*** 174,180 ****
  #
  # enumerate optional test files and test each one:
  #
! for file in ./test/boost_has*.cxx; do
  
     basename=`echo $file | sed 's/.*boost_\(.*\)\.cxx/\1/'`
     macroname=`cat $file | grep '^//[[] []]*MACRO:' | sed 's/.*MACRO:[[] []]*\([[]_A-Z0-9[]]*\).*/\1/'`
--- 224,230 ----
  #
  # enumerate optional test files and test each one:
  #
! for file in $boost_base/libs/config/test/boost_has*.cxx; do
  
     basename=`echo $file | sed 's/.*boost_\(.*\)\.cxx/\1/'`
     macroname=`cat $file | grep '^//[[] []]*MACRO:' | sed 's/.*MACRO:[[] []]*\([[]_A-Z0-9[]]*\).*/\1/'`
***************
*** 377,391 ****
  )
  
  fi
-
-
-
-
-
-
-
-
-
-
-
-
--- 427,429 ----


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk