--- trunk/xvidcore/build/generic/bootstrap.sh 2003/02/20 23:40:48 880 +++ branches/release-1_0-branch/xvidcore/build/generic/bootstrap.sh 2004/03/22 23:56:55 1387 @@ -3,7 +3,7 @@ # This file builds the configure script and copies all needed files # provided by automake/libtoolize # -# $Id: bootstrap.sh,v 1.3 2003-02-20 23:40:48 edgomez Exp $ +# $Id: bootstrap.sh,v 1.5 2004-03-22 22:36:23 edgomez Exp $ ############################################################################## @@ -11,11 +11,15 @@ ############################################################################## # Find a suitable autoconf -AUTOCONF=`which autoconf2.50` +AUTOCONF="autoconf2.50" +$AUTOCONF --version 2>/dev/null 1>/dev/null + if [ $? -ne 0 ] ; then - AUTOCONF=`which autoconf` + AUTOCONF="autoconf" + $AUTOCONF --version 2>/dev/null 1>/dev/null + if [ $? -ne 0 ] ; then - echo "Autoconf not found" + echo "'autoconf' not found" exit -1 fi fi @@ -35,6 +39,19 @@ exit -1 fi +LIBTOOLIZE="libtoolize" +$LIBTOOLIZE --version 1>/dev/null 2>/dev/null + +if [ $? -ne 0 ] ; then + LIBTOOLIZE="glibtoolize" + $LIBTOOLIZE --version 1>/dev/null 2>/dev/null + + if [ $? -ne 0 ] ; then + echo "'libtoolize' not found" + exit -1 + fi +fi + ############################################################################## # Bootstraps the configure script ############################################################################## @@ -46,7 +63,7 @@ automake -c -a 1>/dev/null 2>/dev/null echo "Copying files provided by libtool" -libtoolize -f -c 1>/dev/null 2>/dev/null +$LIBTOOLIZE -f -c 1>/dev/null 2>/dev/null echo "Removing files that are not needed" rm -rf autom4*