]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
MacOS: detect glibtool and glibtoolize when bootstrapping
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 10 Aug 2012 00:38:14 +0000 (12:38 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 10 Aug 2012 00:38:14 +0000 (12:38 +1200)
bootstrap.sh

index 4b008feb60d14a954e07379cd14fbed91c717dff..370c2d876a483111a80d194ccb1e70e164e62066 100755 (executable)
@@ -72,11 +72,11 @@ bootstrap() {
 }
 
 bootstrap_libtoolize() {
-    ltver=$1
+    tool=$1
 
     ltdl="--ltdl"
 
-    bootstrap libtoolize$ltver $ltdl --force --copy --automake
+    bootstrap $tool $ltdl --force --copy --automake
 
     # customize generated libltdl, if any
     if test -d libltdl
@@ -93,25 +93,33 @@ bootstrap_libtoolize() {
     fi
 }
 
+# On MAC OS X, GNU libtool is named 'glibtool':
+if [ `(uname -s) 2>/dev/null` == 'Darwin' ]
+then
+  LIBTOOL_BIN="glibtool"
+else
+  LIBTOOL_BIN="libtool"
+fi
+
 # Adjust paths of required autool packages
 amver=`find_variant automake ${amversions}`
 acver=`find_variant autoconf ${acversions}`
-ltver=`find_variant libtool ${ltversions}`
+ltver=`find_variant ${LIBTOOL_BIN} ${ltversions}`
 
 # Produce debug output about what version actually found.
 amversion=`show_version automake "${amver}"`
 acversion=`show_version autoconf "${acver}"`
-ltversion=`show_version libtool "${ltver}"`
+ltversion=`show_version ${LIBTOOL_BIN} "${ltver}"`
 
 # Find the libtool path to get the right aclocal includes
-ltpath=`find_path libtool$ltver`
+ltpath=`find_path ${LIBTOOL_BIN}${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  ($ltversion) : ${LIBTOOL_BIN}${ltver}"
 echo "libtool path : $ltpath"
 
 for dir in \
@@ -127,7 +135,7 @@ do
        elif [ ! -f $dir/configure ]; then
            # Make sure cfgaux exists
            mkdir -p cfgaux
-            
+
             if test -n "$ltpath"; then
               acincludeflag="-I $ltpath/../share/aclocal"
             else
@@ -137,7 +145,7 @@ do
            # Bootstrap the autotool subsystems
            bootstrap aclocal$amver $acincludeflag
            bootstrap autoheader$acver
-           bootstrap_libtoolize $ltver
+           bootstrap_libtoolize ${LIBTOOL_BIN}ize${ltver}
            bootstrap automake$amver --foreign --add-missing --copy -f
            bootstrap autoconf$acver --force
        fi ); then