From: Amos Jeffries Date: Fri, 23 Jul 2010 04:28:43 +0000 (-0600) Subject: Author: Francesco Chemolli X-Git-Tag: SQUID_3_1_5_1~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e4c3fd38179a943e51c85d90264c099bcbd131a4;p=thirdparty%2Fsquid.git Author: Francesco Chemolli Kludge: try to detect system acinclude path, to fix libtool brokenness. --- diff --git a/bootstrap.sh b/bootstrap.sh index d0f1721106..ad5b5c064a 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -64,6 +64,18 @@ find_variant() echo $found } +find_path() +{ + tool=$1 + path=`which $tool` + if test $? -gt 0 ; then + # path for $tool not found. Not defining, and hoping for the best + echo + return + fi + echo $(dirname $path) +} + bootstrap() { if "$@"; then true # Everything OK @@ -122,12 +134,16 @@ amversion=`show_version automake ${amversions}` acversion=`show_version autoconf ${acversions}` ltversion=`show_version libtool ${ltversions}` +# Find the libtool path to get the right aclocal includes +ltpath=`find_path libtool$ltver` + # Set environment variable to tell automake which autoconf to use. AUTOCONF="autoconf${acver}" ; export AUTOCONF echo "automake ($amversion) : automake$amver" echo "autoconf ($acversion) : autoconf$acver" echo "libtool ($ltversion) : libtool$ltver" +echo "libtool path : $ltpath" for dir in \ "" \ @@ -143,9 +159,15 @@ do elif [ ! -f $dir/configure ]; then # Make sure cfgaux exists mkdir -p cfgaux + + if test -n "$ltpath"; then + acincludeflag="-I $ltpath/../share/aclocal" + else + acincludeflag="" + fi # Bootstrap the autotool subsystems - bootstrap aclocal$amver + bootstrap aclocal$amver $acincludeflag bootstrap autoheader$acver bootstrap_libtoolize $ltver bootstrap automake$amver --foreign --add-missing --copy -f