From 4dc8bf7380539092dba9c94caa5ebba088fd112b Mon Sep 17 00:00:00 2001 From: Andre Pang Date: Mon, 21 Jun 2004 07:40:10 +0000 Subject: Look for glibtool(ize) before looking for libtool(ize): some BSDs (such as Mac OS X) have libtool installed with a 'g' prefix. CVS patchset: 6720 CVS date: 2004/06/21 07:40:10 --- autogen.sh | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/autogen.sh b/autogen.sh index 1c4d28045..94c254319 100755 --- a/autogen.sh +++ b/autogen.sh @@ -18,7 +18,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # -# $Id: autogen.sh,v 1.13 2003/10/25 19:26:27 mroi Exp $ +# $Id: autogen.sh,v 1.14 2004/06/21 07:40:10 athp Exp $ # # Maintained by Stephen Torri # @@ -106,13 +106,14 @@ run_autoconf () { #-------------------- # LIBTOOL #------------------- -detect_libtool() { - set -- `type libtool 2>/dev/null` +try_libtool_executable() { + libtool=$1 + set -- `type $libtool 2>/dev/null` RETVAL=$? NUM_RESULT=$# RESULT_FILE=$3 if [ $RETVAL -eq 0 -a $NUM_RESULT -eq 3 -a -f "$RESULT_FILE" ]; then - LT="`libtool --version | awk '{ print $4 }' | sed -e 's/[a-zA-Z\ \.\(\)\-\;]//g'`" + LT="`$libtool --version | awk '{ print $4 }' | sed -e 's/[a-zA-Z\ \.\(\)\-\;]//g'`" LIBTOOL_MIN="`echo $LIBTOOL_MIN | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`" if test $LT -lt 100 ; then LT=`expr $LT \* 10` @@ -120,12 +121,21 @@ detect_libtool() { if [ `expr $LT` -ge $LIBTOOL_MIN ]; then libtool_ok=yes fi - else - echo - echo "**Error**: You must have \`libtool' >= $LIBTOOL_MIN installed to" - echo " compile $PROG. Download the appropriate package" - echo " for your distribution or source from ftp.gnu.org." - exit 1 + fi +} + +detect_libtool() { + # try glibtool first, then libtool + try_libtool_executable 'glibtool' + if [ "x$libtool_ok" != "xyes" ]; then + try_libtool_executable 'libtool' + if [ "x$libtool_ok" != "xyes" ]; then + echo + echo "**Error**: You must have \`libtool' >= $LIBTOOL_MIN installed to" + echo " compile $PROG. Download the appropriate package" + echo " for your distribution or source from ftp.gnu.org." + exit 1 + fi fi } @@ -138,7 +148,7 @@ run_libtoolize() { fi echo $_echo_n " + Running libtoolize: $_echo_c"; - libtoolize --force --copy >/dev/null 2>&1; + "${libtool}ize" --force --copy >/dev/null 2>&1; echo "done." } -- cgit v1.2.3