]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Francesco Chemolli <kinkie@squid-cache.org>
authorAmos Jeffries <amosjeffries@squid-cache.org>
Fri, 23 Jul 2010 04:28:43 +0000 (22:28 -0600)
committerAmos Jeffries <amosjeffries@squid-cache.org>
Fri, 23 Jul 2010 04:28:43 +0000 (22:28 -0600)
Kludge: try to detect system acinclude path, to fix libtool brokenness.

bootstrap.sh

index d0f17211069161aa602b29c80836c8ad775c7e19..ad5b5c064ad2ea2cf425cac46e26478d33c198d1 100755 (executable)
@@ -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