]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Kludge: try to detect system acinclude path, to fix libtool brokenness.
authorFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 22 Jul 2010 11:23:03 +0000 (13:23 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 22 Jul 2010 11:23:03 +0000 (13:23 +0200)
bootstrap.sh

index 3136a4d75fef40f5ef6bf75ea91724187cefbed4..63193575b9c9cc9f74272f6b6c1e1ee3139ba5cc 100755 (executable)
@@ -64,6 +64,17 @@ find_variant()
   echo $found
 }
 
+find_path()
+{
+  tool=$1
+  path=`which $tool`
+  if test $? -gt 0 ; then
+    echo "path for $tool not found. Not defining, and hoping for the best"
+    return
+  fi
+  echo $(dirname $path)
+}
+
 bootstrap() {
   if "$@"; then
     true # Everything OK
@@ -122,6 +133,9 @@ 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
 
@@ -142,9 +156,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