From 143f0fb6ea598600295f691a2fbe8f6ea4be42c5 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 3 Nov 2005 11:23:34 +0000 Subject: [PATCH] Fix configure script: some tabs had been erroneously stripped, and the regexes were incorrectly quoted for M4. [SVN r31545] --- configure | 33 +++++++++++++++++++++++---------- tools/configure.in | 28 +++++++++++++++++++++------- 2 files changed, 44 insertions(+), 17 deletions(-) diff --git a/configure b/configure index b37f51e9..75f80e2d 100644 --- a/configure +++ b/configure @@ -1304,6 +1304,17 @@ echo "${ECHO_T}Info : .cpp used as extension for tests" >&6 fi; + +if test -f /bin/sed ; then + SED=/bin/sed +else + if test -f /usr/bin/sed ; then + SED=/usr/bin/sed + else + SED=sed + fi +fi + echo "$as_me:$LINENO: checking for boost main tree" >&5 echo $ECHO_N "checking for boost main tree... $ECHO_C" >&6 boost_base= @@ -1315,7 +1326,7 @@ if test "${with_boost+set}" = set; then #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,/$,,'` + 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 @@ -2171,9 +2182,9 @@ fi # for file in $boost_base/libs/config/test/boost_no*.ipp; do - basename=`echo $file | sed 's/.*boost_\(.*\)\.ipp/\1/'` - macroname=`cat $file | grep '^//[] []*MACRO:' | sed 's/.*MACRO:[] []*\([]_A-Z0-9[]*\).*/\1/'` - title=`cat $file | grep '^//[] []*TITLE:' | sed 's/.*TITLE:[] []*\([]^ [].*\)/\1/'` + basename=`echo $file | $SED 's/.*boost_\(.*\)\.ipp/\1/'` + macroname=`cat $file | grep '^//[ ]*MACRO:' | $SED 's/.*MACRO:[ ]*\([_A-Z0-9]*\).*/\1/'` + title=`cat $file | grep '^//[ ]*TITLE:' | $SED 's/.*TITLE:[ ]*\([^ ].*\)/\1/'` namespace=`echo $macroname | tr [A-Z] [a-z]` #echo file = $file @@ -2312,9 +2323,9 @@ done # for file in $boost_base/libs/config/test/boost_has*.ipp; do - basename=`echo $file | sed 's/.*boost_\(.*\)\.ipp/\1/'` - macroname=`cat $file | grep '^//[] []*MACRO:' | sed 's/.*MACRO:[] []*\([]_A-Z0-9[]*\).*/\1/'` - title=`cat $file | grep '^//[] []*TITLE:' | sed 's/.*TITLE:[] []*\([]^ [].*\)/\1/'` + basename=`echo $file | $SED 's/.*boost_\(.*\)\.ipp/\1/'` + macroname=`cat $file | grep '^//[ ]*MACRO:' | $SED 's/.*MACRO:[ ]*\([_A-Z0-9]*\).*/\1/'` + title=`cat $file | grep '^//[ ]*TITLE:' | $SED 's/.*TITLE:[ ]*\([^ ].*\)/\1/'` namespace=`echo $macroname | tr [A-Z] [a-z]` # echo $file @@ -2663,9 +2674,10 @@ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -3339,5 +3351,6 @@ fi + diff --git a/tools/configure.in b/tools/configure.in index 706cbaea..3dcd9196 100644 --- a/tools/configure.in +++ b/tools/configure.in @@ -65,6 +65,19 @@ esac ] ) +dnl figure out which version of sed to use, on some platforms +dnl the version in the path is not Unix conforming (MacOS X ? ) + +if test -f /bin/sed ; then + SED=/bin/sed +else + if test -f /usr/bin/sed ; then + SED=/usr/bin/sed + else + SED=sed + fi +fi + dnl Set the boost main directory. AC_MSG_CHECKING(for boost main tree) boost_base= @@ -74,7 +87,7 @@ AC_ARG_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,/$,,'` + 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 @@ -146,9 +159,9 @@ AC_CHECK_LIB(rt, clock) # for file in $boost_base/libs/config/test/boost_no*.ipp; do - basename=`echo $file | sed 's/.*boost_\(.*\)\.ipp/\1/'` - macroname=`cat $file | grep '^//[[] []]*MACRO:' | sed 's/.*MACRO:[[] []]*\([[]_A-Z0-9[]]*\).*/\1/'` - title=`cat $file | grep '^//[[] []]*TITLE:' | sed 's/.*TITLE:[[] []]*\([[]^ []].*\)/\1/'` + basename=`echo $file | $SED 's/.*boost_\(.*\)\.ipp/\1/'` + macroname=`cat $file | grep '^//[[ ]]*MACRO:' | $SED 's/.*MACRO:[[ ]]*\([[_A-Z0-9]]*\).*/\1/'` + title=`cat $file | grep '^//[[ ]]*TITLE:' | $SED 's/.*TITLE:[[ ]]*\([[^ ]].*\)/\1/'` namespace=`echo $macroname | tr [[A-Z]] [[a-z]]` #echo file = $file @@ -214,9 +227,9 @@ done # for file in $boost_base/libs/config/test/boost_has*.ipp; do - basename=`echo $file | sed 's/.*boost_\(.*\)\.ipp/\1/'` - macroname=`cat $file | grep '^//[[] []]*MACRO:' | sed 's/.*MACRO:[[] []]*\([[]_A-Z0-9[]]*\).*/\1/'` - title=`cat $file | grep '^//[[] []]*TITLE:' | sed 's/.*TITLE:[[] []]*\([[]^ []].*\)/\1/'` + basename=`echo $file | $SED 's/.*boost_\(.*\)\.ipp/\1/'` + macroname=`cat $file | grep '^//[[ ]]*MACRO:' | $SED 's/.*MACRO:[[ ]]*\([[_A-Z0-9]]*\).*/\1/'` + title=`cat $file | grep '^//[[ ]]*TITLE:' | $SED 's/.*TITLE:[[ ]]*\([[^ ]].*\)/\1/'` namespace=`echo $macroname | tr [[A-Z]] [[a-z]]` # echo $file @@ -440,5 +453,6 @@ fi +