------------------------------------------------------------ revno: 12268 revision-id: squid3@treenet.co.nz-20120810003814-rwxz0gn1m1ozu0mb parent: squidadm@squid-cache.org-20120810001223-c9hlzv6sxbk2q2v6 committer: Amos Jeffries branch nick: trunk timestamp: Fri 2012-08-10 12:38:14 +1200 message: MacOS: detect glibtool and glibtoolize when bootstrapping ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20120810003814-rwxz0gn1m1ozu0mb # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: 8c6f835f2a68f0a07661f55272ad4ac0adce5d5e # timestamp: 2012-08-10 00:52:51 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: squidadm@squid-cache.org-20120810001223-\ # c9hlzv6sxbk2q2v6 # # Begin patch === modified file 'bootstrap.sh' --- bootstrap.sh 2012-08-05 11:11:02 +0000 +++ bootstrap.sh 2012-08-10 00:38:14 +0000 @@ -72,11 +72,11 @@ } 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 @@ 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 @@ 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 @@ # 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