From e4c3fd38179a943e51c85d90264c099bcbd131a4 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Thu, 22 Jul 2010 22:28:43 -0600 Subject: [PATCH] Author: Francesco Chemolli Kludge: try to detect system acinclude path, to fix libtool brokenness. --- bootstrap.sh | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/bootstrap.sh b/bootstrap.sh index d0f1721106..ad5b5c064a 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -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 -- 2.47.3