From: Amos Jeffries Date: Fri, 10 Aug 2012 00:38:14 +0000 (+1200) Subject: MacOS: detect glibtool and glibtoolize when bootstrapping X-Git-Tag: sourceformat-review-1~124 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5f152e61bdac69759c67e33ac201a4f4d0b875dd;p=thirdparty%2Fsquid.git MacOS: detect glibtool and glibtoolize when bootstrapping --- diff --git a/bootstrap.sh b/bootstrap.sh index 4b008feb60..370c2d876a 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -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