From 529cd106326400129b45d0e369c16dc0dc7ac823 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Wed, 24 Apr 2002 11:31:31 +0000 Subject: [PATCH] Added --with-boost=DIR option [SVN r13558] --- configure | 358 +++++++++++++++++++++++++++------------------ tools/configure.in | 65 +++++++- 2 files changed, 273 insertions(+), 150 deletions(-) diff --git a/configure b/configure index df2a190a..e5b99fd5 100644 --- a/configure +++ b/configure @@ -626,6 +626,11 @@ Optional Features: --enable-test tests current settings rather than defining new ones --enable-extension= +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-boost=DIR path to the boost main tree + Some influential environment variables: CXX C++ compiler command CXXFLAGS C++ compiler flags @@ -817,7 +822,7 @@ if test -z "$CONFIG_SITE"; then fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - { echo "$as_me:820: loading site script $ac_site_file" >&5 + { echo "$as_me:825: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} cat "$ac_site_file" >&5 . "$ac_site_file" @@ -835,21 +840,21 @@ for ac_var in `(set) 2>&1 | eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:838: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 + { echo "$as_me:843: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:842: error: \`$ac_var' was not set in the previous run" >&5 + { echo "$as_me:847: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:848: error: \`$ac_var' has changed since the previous run:" >&5 + { echo "$as_me:853: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:850: former value: $ac_old_val" >&5 + { echo "$as_me:855: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:852: current value: $ac_new_val" >&5 + { echo "$as_me:857: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; @@ -868,9 +873,9 @@ echo "$as_me: current value: $ac_new_val" >&2;} fi done if $ac_cache_corrupted; then - { echo "$as_me:871: error: changes in the environment can compromise the build" >&5 + { echo "$as_me:876: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:873: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 + { { echo "$as_me:878: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi @@ -890,10 +895,10 @@ esac echo "#! $SHELL" >conftest.sh echo "exit 0" >>conftest.sh chmod +x conftest.sh -if { (echo "$as_me:893: PATH=\".;.\"; conftest.sh") >&5 +if { (echo "$as_me:898: PATH=\".;.\"; conftest.sh") >&5 (PATH=".;."; conftest.sh) 2>&5 ac_status=$? - echo "$as_me:896: \$? = $ac_status" >&5 + echo "$as_me:901: \$? = $ac_status" >&5 (exit $ac_status); }; then ac_path_separator=';' else @@ -950,22 +955,83 @@ if test "${enable_extension+set}" = set; then enableval="$enable_extension" case "$enableval" in - no) echo "$as_me:953: result: Info :.cpp used as extension for tests" >&5 + no) echo "$as_me:958: result: Info :.cpp used as extension for tests" >&5 echo "${ECHO_T}Info :.cpp used as extension for tests" >&6 ac_ext=cpp ;; - *) echo "$as_me:957: result: Argument : .$enableval used as extension" >&5 + *) echo "$as_me:962: result: Argument : .$enableval used as extension" >&5 echo "${ECHO_T}Argument : .$enableval used as extension" >&6 ac_ext=$enableval esac else - echo "$as_me:963: result: Info : .cpp used as extension for tests" >&5 + echo "$as_me:968: result: Info : .cpp used as extension for tests" >&5 echo "${ECHO_T}Info : .cpp used as extension for tests" >&6 ac_ext=cpp fi; +echo "$as_me:974: checking for boost main tree" >&5 +echo $ECHO_N "checking for boost main tree... $ECHO_C" >&6 +boost_base= + +# Check whether --with-boost or --without-boost was given. +if test "${with_boost+set}" = set; then + withval="$with_boost" + + #echo "--with boost is set" + if test "x$withval" != "x"; then + if test "x$withval" != no; then + boost_base=`echo "$withval" | sed 's,//*,/,g' | sed 's,/$,,'` + #echo boost_base=$boost_base + if test -f "$boost_base/boost/config.hpp"; then + if test -f "$boost_base/libs/config/configure"; then :; else + boost_base= + #echo "$boost_base/libs/config/configure" not found + fi + else + #echo "$boost_base/boost/config.hpp" not found + boost_base= + fi + fi + fi + +fi; +if test "x$boost_base" = "x"; then + boost_base=`expr "x$0" : 'x\(.*\)/^/*' \| '.'` + boost_base="$boost_base/../.." + if test -f "$boost_base/boost/config.hpp"; then + if test -f "$boost_base/libs/config/configure"; 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/config.hpp"; then + if test -f "$d/libs/config/configure"; then + boost_base="$d" + break + fi + fi + done +fi +if test "x$boost_base" != "x"; then + echo "$as_me:1023: result: $boost_base" >&5 +echo "${ECHO_T}$boost_base" >&6 +else + echo "$as_me:1026: result: not found" >&5 +echo "${ECHO_T}not found" >&6 + { { echo "$as_me:1028: error: The boost main tree was not found. + Specify its location by the --with-boost option." >&5 +echo "$as_me: error: The boost main tree was not found. + Specify its location by the --with-boost option." >&2;} + { (exit 1); exit 1; }; } +fi + # Save that, as it is being redefined several times use_ac_ext=$ac_ext @@ -979,7 +1045,7 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:982: checking for $ac_word" >&5 +echo "$as_me:1048: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -994,7 +1060,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" -echo "$as_me:997: found $ac_dir/$ac_word" >&5 +echo "$as_me:1063: found $ac_dir/$ac_word" >&5 break done @@ -1002,10 +1068,10 @@ fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - echo "$as_me:1005: result: $CXX" >&5 + echo "$as_me:1071: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6 else - echo "$as_me:1008: result: no" >&5 + echo "$as_me:1074: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1018,7 +1084,7 @@ if test -z "$CXX"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:1021: checking for $ac_word" >&5 +echo "$as_me:1087: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1033,7 +1099,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CXX="$ac_prog" -echo "$as_me:1036: found $ac_dir/$ac_word" >&5 +echo "$as_me:1102: found $ac_dir/$ac_word" >&5 break done @@ -1041,10 +1107,10 @@ fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - echo "$as_me:1044: result: $ac_ct_CXX" >&5 + echo "$as_me:1110: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6 else - echo "$as_me:1047: result: no" >&5 + echo "$as_me:1113: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1056,27 +1122,27 @@ test -n "$ac_ct_CXX" || ac_ct_CXX="g++" fi # Provide some information about the compiler. -echo "$as_me:1059:" \ +echo "$as_me:1125:" \ "checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:1062: \"$ac_compiler --version &5\"") >&5 +{ (eval echo "$as_me:1128: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? - echo "$as_me:1065: \$? = $ac_status" >&5 + echo "$as_me:1131: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:1067: \"$ac_compiler -v &5\"") >&5 +{ (eval echo "$as_me:1133: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? - echo "$as_me:1070: \$? = $ac_status" >&5 + echo "$as_me:1136: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:1072: \"$ac_compiler -V &5\"") >&5 +{ (eval echo "$as_me:1138: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? - echo "$as_me:1075: \$? = $ac_status" >&5 + echo "$as_me:1141: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF -#line 1079 "configure" +#line 1145 "configure" #include "confdefs.h" int @@ -1092,13 +1158,13 @@ ac_clean_files="$ac_clean_files a.out a.exe" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:1095: checking for C++ compiler default output" >&5 +echo "$as_me:1161: checking for C++ compiler default output" >&5 echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:1098: \"$ac_link_default\"") >&5 +if { (eval echo "$as_me:1164: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? - echo "$as_me:1101: \$? = $ac_status" >&5 + echo "$as_me:1167: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last @@ -1121,34 +1187,34 @@ done else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -{ { echo "$as_me:1124: error: C++ compiler cannot create executables" >&5 +{ { echo "$as_me:1190: error: C++ compiler cannot create executables" >&5 echo "$as_me: error: C++ compiler cannot create executables" >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext -echo "$as_me:1130: result: $ac_file" >&5 +echo "$as_me:1196: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:1135: checking whether the C++ compiler works" >&5 +echo "$as_me:1201: checking whether the C++ compiler works" >&5 echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:1141: \"$ac_try\"") >&5 + { (eval echo "$as_me:1207: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1144: \$? = $ac_status" >&5 + echo "$as_me:1210: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:1151: error: cannot run C++ compiled programs. + { { echo "$as_me:1217: error: cannot run C++ compiled programs. If you meant to cross compile, use \`--host'." >&5 echo "$as_me: error: cannot run C++ compiled programs. If you meant to cross compile, use \`--host'." >&2;} @@ -1156,24 +1222,24 @@ If you meant to cross compile, use \`--host'." >&2;} fi fi fi -echo "$as_me:1159: result: yes" >&5 +echo "$as_me:1225: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:1166: checking whether we are cross compiling" >&5 +echo "$as_me:1232: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:1168: result: $cross_compiling" >&5 +echo "$as_me:1234: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 -echo "$as_me:1171: checking for executable suffix" >&5 +echo "$as_me:1237: checking for executable suffix" >&5 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 -if { (eval echo "$as_me:1173: \"$ac_link\"") >&5 +if { (eval echo "$as_me:1239: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:1176: \$? = $ac_status" >&5 + echo "$as_me:1242: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will @@ -1189,25 +1255,25 @@ for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do esac done else - { { echo "$as_me:1192: error: cannot compute EXEEXT: cannot compile and link" >&5 + { { echo "$as_me:1258: error: cannot compute EXEEXT: cannot compile and link" >&5 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext -echo "$as_me:1198: result: $ac_cv_exeext" >&5 +echo "$as_me:1264: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:1204: checking for object suffix" >&5 +echo "$as_me:1270: checking for object suffix" >&5 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1210 "configure" +#line 1276 "configure" #include "confdefs.h" int @@ -1219,10 +1285,10 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:1222: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1288: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1225: \$? = $ac_status" >&5 + echo "$as_me:1291: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in @@ -1234,24 +1300,24 @@ done else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -{ { echo "$as_me:1237: error: cannot compute OBJEXT: cannot compile" >&5 +{ { echo "$as_me:1303: error: cannot compute OBJEXT: cannot compile" >&5 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:1244: result: $ac_cv_objext" >&5 +echo "$as_me:1310: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:1248: checking whether we are using the GNU C++ compiler" >&5 +echo "$as_me:1314: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1254 "configure" +#line 1320 "configure" #include "confdefs.h" int @@ -1266,16 +1332,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1269: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1335: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1272: \$? = $ac_status" >&5 + echo "$as_me:1338: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1275: \"$ac_try\"") >&5 + { (eval echo "$as_me:1341: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1278: \$? = $ac_status" >&5 + echo "$as_me:1344: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else @@ -1287,19 +1353,19 @@ rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:1290: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "$as_me:1356: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS="-g" -echo "$as_me:1296: checking whether $CXX accepts -g" >&5 +echo "$as_me:1362: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1302 "configure" +#line 1368 "configure" #include "confdefs.h" int @@ -1311,16 +1377,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1314: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1380: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1317: \$? = $ac_status" >&5 + echo "$as_me:1383: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1320: \"$ac_try\"") >&5 + { (eval echo "$as_me:1386: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1323: \$? = $ac_status" >&5 + echo "$as_me:1389: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else @@ -1330,7 +1396,7 @@ ac_cv_prog_cxx_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:1333: result: $ac_cv_prog_cxx_g" >&5 +echo "$as_me:1399: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS @@ -1357,7 +1423,7 @@ for ac_declaration in \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF -#line 1360 "configure" +#line 1426 "configure" #include "confdefs.h" #include $ac_declaration @@ -1370,16 +1436,16 @@ exit (42); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1373: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1439: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1376: \$? = $ac_status" >&5 + echo "$as_me:1442: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1379: \"$ac_try\"") >&5 + { (eval echo "$as_me:1445: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1382: \$? = $ac_status" >&5 + echo "$as_me:1448: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -1389,7 +1455,7 @@ continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line 1392 "configure" +#line 1458 "configure" #include "confdefs.h" $ac_declaration int @@ -1401,16 +1467,16 @@ exit (42); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1404: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1470: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1407: \$? = $ac_status" >&5 + echo "$as_me:1473: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1410: \"$ac_try\"") >&5 + { (eval echo "$as_me:1476: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1413: \$? = $ac_status" >&5 + echo "$as_me:1479: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else @@ -1441,12 +1507,12 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test $enable_test = 'yes'; then -CXXFLAGS="-I../../ -I./test $CXXFLAGS" + CXXFLAGS="-I$boost_base -I$boost_base/libs/config/test $CXXFLAGS" else -CXXFLAGS="-I../../ -I./test $CXXFLAGS -DBOOST_NO_CONFIG" + CXXFLAGS="-I$boost_base -I$boost_base/libs/config/test $CXXFLAGS -DBOOST_NO_CONFIG" fi -echo "$as_me:1449: checking for main in -lpthread" >&5 +echo "$as_me:1515: checking for main in -lpthread" >&5 echo $ECHO_N "checking for main in -lpthread... $ECHO_C" >&6 if test "${ac_cv_lib_pthread_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1454,7 +1520,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 1457 "configure" +#line 1523 "configure" #include "confdefs.h" int @@ -1466,16 +1532,16 @@ main (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:1469: \"$ac_link\"") >&5 +if { (eval echo "$as_me:1535: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:1472: \$? = $ac_status" >&5 + echo "$as_me:1538: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:1475: \"$ac_try\"") >&5 + { (eval echo "$as_me:1541: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1478: \$? = $ac_status" >&5 + echo "$as_me:1544: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_pthread_main=yes else @@ -1486,7 +1552,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:1489: result: $ac_cv_lib_pthread_main" >&5 +echo "$as_me:1555: result: $ac_cv_lib_pthread_main" >&5 echo "${ECHO_T}$ac_cv_lib_pthread_main" >&6 if test $ac_cv_lib_pthread_main = yes; then cat >>confdefs.h <&5 +echo "$as_me:1567: checking for main in -lm" >&5 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6 if test "${ac_cv_lib_m_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1506,7 +1572,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 1509 "configure" +#line 1575 "configure" #include "confdefs.h" int @@ -1518,16 +1584,16 @@ main (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:1521: \"$ac_link\"") >&5 +if { (eval echo "$as_me:1587: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:1524: \$? = $ac_status" >&5 + echo "$as_me:1590: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:1527: \"$ac_try\"") >&5 + { (eval echo "$as_me:1593: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1530: \$? = $ac_status" >&5 + echo "$as_me:1596: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_m_main=yes else @@ -1538,7 +1604,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:1541: result: $ac_cv_lib_m_main" >&5 +echo "$as_me:1607: result: $ac_cv_lib_m_main" >&5 echo "${ECHO_T}$ac_cv_lib_m_main" >&6 if test $ac_cv_lib_m_main = yes; then cat >>confdefs.h <&5 +echo "$as_me:1619: checking for main in -lrt" >&5 echo $ECHO_N "checking for main in -lrt... $ECHO_C" >&6 if test "${ac_cv_lib_rt_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1558,7 +1624,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 1561 "configure" +#line 1627 "configure" #include "confdefs.h" int @@ -1570,16 +1636,16 @@ main (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:1573: \"$ac_link\"") >&5 +if { (eval echo "$as_me:1639: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:1576: \$? = $ac_status" >&5 + echo "$as_me:1642: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:1579: \"$ac_try\"") >&5 + { (eval echo "$as_me:1645: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1582: \$? = $ac_status" >&5 + echo "$as_me:1648: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_rt_main=yes else @@ -1590,7 +1656,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:1593: result: $ac_cv_lib_rt_main" >&5 +echo "$as_me:1659: result: $ac_cv_lib_rt_main" >&5 echo "${ECHO_T}$ac_cv_lib_rt_main" >&6 if test $ac_cv_lib_rt_main = yes; then cat >>confdefs.h <&5 + echo "$as_me:1689: checking $title (pass expected) " >&5 echo $ECHO_N "checking $title (pass expected) ... $ECHO_C" >&6 else - echo "$as_me:1626: checking $title " >&5 + echo "$as_me:1692: checking $title " >&5 echo $ECHO_N "checking $title ... $ECHO_C" >&6 fi cat >conftest.$ac_ext <<_ACEOF -#line 1630 "configure" +#line 1696 "configure" #include "confdefs.h" #include @@ -1655,24 +1721,24 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:1658: \"$ac_link\"") >&5 +if { (eval echo "$as_me:1724: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:1661: \$? = $ac_status" >&5 + echo "$as_me:1727: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:1664: \"$ac_try\"") >&5 + { (eval echo "$as_me:1730: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1667: \$? = $ac_status" >&5 + echo "$as_me:1733: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:1669: result: OK" >&5 + echo "$as_me:1735: result: OK" >&5 echo "${ECHO_T}OK" >&6 else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -echo "$as_me:1675: result: Failed" >&5 +echo "$as_me:1741: result: Failed" >&5 echo "${ECHO_T}Failed" >&6 required_defs="$macroname $required_defs" @@ -1682,10 +1748,10 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test $enable_test = 'yes'; then ac_ext=$use_ac_ext - echo "$as_me:1685: checking $title (fail expected) " >&5 + echo "$as_me:1751: checking $title (fail expected) " >&5 echo $ECHO_N "checking $title (fail expected) ... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 1688 "configure" +#line 1754 "configure" #include "confdefs.h" #include @@ -1713,25 +1779,25 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:1716: \"$ac_link\"") >&5 +if { (eval echo "$as_me:1782: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:1719: \$? = $ac_status" >&5 + echo "$as_me:1785: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:1722: \"$ac_try\"") >&5 + { (eval echo "$as_me:1788: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1725: \$? = $ac_status" >&5 + echo "$as_me:1791: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:1727: result: failed" >&5 + echo "$as_me:1793: result: failed" >&5 echo "${ECHO_T}failed" >&6 required_undefs="$macroname $required_undefs" else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -echo "$as_me:1734: result: OK" >&5 +echo "$as_me:1800: result: OK" >&5 echo "${ECHO_T}OK" >&6 fi @@ -1744,7 +1810,7 @@ done # # enumerate optional test files and test each one: # -for file in ./test/boost_has*.cxx; do +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/'` @@ -1758,10 +1824,10 @@ for file in ./test/boost_has*.cxx; do ac_ext=$use_ac_ext if test $enable_test = 'yes'; then - echo "$as_me:1761: checking $title (pass expected) " >&5 + echo "$as_me:1827: checking $title (pass expected) " >&5 echo $ECHO_N "checking $title (pass expected) ... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 1764 "configure" +#line 1830 "configure" #include "confdefs.h" #include @@ -1789,34 +1855,34 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:1792: \"$ac_link\"") >&5 +if { (eval echo "$as_me:1858: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:1795: \$? = $ac_status" >&5 + echo "$as_me:1861: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:1798: \"$ac_try\"") >&5 + { (eval echo "$as_me:1864: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1801: \$? = $ac_status" >&5 + echo "$as_me:1867: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:1803: result: OK" >&5 + echo "$as_me:1869: result: OK" >&5 echo "${ECHO_T}OK" >&6 else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -echo "$as_me:1809: result: Failed" >&5 +echo "$as_me:1875: result: Failed" >&5 echo "${ECHO_T}Failed" >&6 required_undefs="$macroname $required_undefs" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - echo "$as_me:1816: checking $title (fail expected) " >&5 + echo "$as_me:1882: checking $title (fail expected) " >&5 echo $ECHO_N "checking $title (fail expected) ... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 1819 "configure" +#line 1885 "configure" #include "confdefs.h" #include @@ -1844,19 +1910,19 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:1847: \"$ac_link\"") >&5 +if { (eval echo "$as_me:1913: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:1850: \$? = $ac_status" >&5 + echo "$as_me:1916: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:1853: \"$ac_try\"") >&5 + { (eval echo "$as_me:1919: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1856: \$? = $ac_status" >&5 + echo "$as_me:1922: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:1859: result: failed" >&5 + echo "$as_me:1925: result: failed" >&5 echo "${ECHO_T}failed" >&6 required_defs="$macroname $required_defs" @@ -1864,7 +1930,7 @@ else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - echo "$as_me:1867: result: OK" >&5 + echo "$as_me:1933: result: OK" >&5 echo "${ECHO_T}OK" >&6 fi @@ -1873,10 +1939,10 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext else ac_ext=$use_ac_ext - echo "$as_me:1876: checking $title" >&5 + echo "$as_me:1942: checking $title" >&5 echo $ECHO_N "checking $title... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 1879 "configure" +#line 1945 "configure" #include "confdefs.h" #include @@ -1900,19 +1966,19 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:1903: \"$ac_link\"") >&5 +if { (eval echo "$as_me:1969: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:1906: \$? = $ac_status" >&5 + echo "$as_me:1972: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:1909: \"$ac_try\"") >&5 + { (eval echo "$as_me:1975: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1912: \$? = $ac_status" >&5 + echo "$as_me:1978: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:1915: result: Yes" >&5 + echo "$as_me:1981: result: Yes" >&5 echo "${ECHO_T}Yes" >&6 required_defs="$macroname $required_defs" @@ -1920,7 +1986,7 @@ else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - echo "$as_me:1923: result: no" >&5 + echo "$as_me:1989: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2054,7 +2120,7 @@ rm -f confdef2opt.sed : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:2057: creating $CONFIG_STATUS" >&5 +{ echo "$as_me:2123: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL @@ -2219,7 +2285,7 @@ cat >>$CONFIG_STATUS <<\EOF echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header - { { echo "$as_me:2222: error: ambiguous option: $1 + { { echo "$as_me:2288: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} @@ -2238,7 +2304,7 @@ Try \`$0 --help' for more information." >&2;} ac_need_defaults=false;; # This is an error. - -*) { { echo "$as_me:2241: error: unrecognized option: $1 + -*) { { echo "$as_me:2307: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} @@ -2283,7 +2349,7 @@ do case "$ac_config_target" in # Handling of arguments. "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; - *) { { echo "$as_me:2286: error: invalid argument: $ac_config_target" >&5 + *) { { echo "$as_me:2352: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac diff --git a/tools/configure.in b/tools/configure.in index f5e7628c..2b2a60e0 100644 --- a/tools/configure.in +++ b/tools/configure.in @@ -65,6 +65,61 @@ esac ] ) +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]), + [ + #echo "--with boost is set" + if test "x$withval" != "x"; then + if test "x$withval" != no; then + boost_base=`echo "$withval" | sed 's,//*,/,g' | sed 's,/$,,'` + #echo boost_base=$boost_base + if test -f "$boost_base/boost/config.hpp"; then + if test -f "$boost_base/libs/config/configure"; then :; else + boost_base= + #echo "$boost_base/libs/config/configure" not found + fi + else + #echo "$boost_base/boost/config.hpp" not found + 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 "$boost_base/boost/config.hpp"; then + if test -f "$boost_base/libs/config/configure"; 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/config.hpp"; then + if test -f "$d/libs/config/configure"; then + boost_base="$d" + 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,9 +130,9 @@ ac_ext=$use_ac_ext AC_LANG_CPLUSPLUS if test $enable_test = 'yes'; then -CXXFLAGS="-I../../ -I./test $CXXFLAGS" + CXXFLAGS="-I$boost_base -I$boost_base/libs/config/test $CXXFLAGS" else -CXXFLAGS="-I../../ -I./test $CXXFLAGS -DBOOST_NO_CONFIG" + CXXFLAGS="-I$boost_base -I$boost_base/libs/config/test $CXXFLAGS -DBOOST_NO_CONFIG" fi dnl check for some standard libraries @@ -90,7 +145,7 @@ AC_HAVE_LIBRARY(rt) # # enumerate test files and test each one: # -for file in ./test/boost_no*.cxx; do +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,7 +229,7 @@ done # # enumerate optional test files and test each one: # -for file in ./test/boost_has*.cxx; do +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/'` @@ -389,3 +444,5 @@ fi + +