summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Pang <athp@users.sourceforge.net>2004-06-21 07:40:10 +0000
committerAndre Pang <athp@users.sourceforge.net>2004-06-21 07:40:10 +0000
commit4dc8bf7380539092dba9c94caa5ebba088fd112b (patch)
treed2de651ce410829adcf2d0f3a9d9c93b71112c7a
parent09d8634a6550c2a74b4c455eb81299244ab931c6 (diff)
downloadxine-lib-4dc8bf7380539092dba9c94caa5ebba088fd112b.tar.gz
xine-lib-4dc8bf7380539092dba9c94caa5ebba088fd112b.tar.bz2
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
-rwxr-xr-xautogen.sh32
1 files 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 <storri@users.sourceforge.net>
#
@@ -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."
}