[XviD-devel] ./bootstrap.sh errors

Steven M. Schultz sms at 2BSD.COM
Thu Feb 20 14:12:06 CET 2003


Hi !

	Ran into a bit of trouble with the new ./bootstrap.sh script...

$ testing=`which autoconf2.50`
$ echo $testing
no autoconf2.50 in /bin /usr/bin /usr/sbin /sbin /usr/contrib/bin /usr/X11/bin /usr/local/bin /usr/local/sbin /usr/contrib/teTeX/bin /mysql/bin /usr/java/bin /usr/wp8/wpbin /usr/local/pccts/bin /usr/contrib/kde/bin /usr/contrib/gnome/bin /usr/contrib/gnome/enlightenment/bin

	The test for autoconf2.50 does not work as expected since that test
	uses `which autoconf2.50`

awds59.643-> ./bootstrap.sh 
sed: 1: "s/^[^0-9]*//i": bad flag in substitute command: 'i'
test: null string where integer was expected
test: null string where integer was expected
Creating ./configure
Copying files provided by automake
Copying files provided by libtool
Removing files that are not needed

	'i' isn't a valid flag for 'sed' it seems.   The "test" errors
	are because strings are empty and that causes argument mismatches
	in '[' ']' processing.

	Below is an alternate approach to testing for the correct version
	of autoconf.

	Also, there needs to be a "-soname"  in the shared library that
	is built - else the ld.so loader can't find the shared object at
	run time (that's what the patch I submitted yesterday was for).

	Cheers,
	Steven Schultz

--------------------cut here---------------------
--- bootstrap.sh.dist	Thu Feb 20 13:36:57 2003
+++ bootstrap.sh	Thu Feb 20 14:06:54 2003
@@ -11,21 +11,23 @@
 ##############################################################################
 
 # we first test Debian GNU/Linux autoconf for 2.50 series
-AUTOCONF=`which autoconf2.50`
+AUTOCONF=autoconf2.50
 
-if [ ! -x "$AUTOCONF" ] ; then
+$AUTOCONF >/dev/null 2>/dev/null
+if [ $? != 0 ] ; then
 
     # Test failed, testing generic name -- many distros are shipping 2.13 with
     # that name, that's why we have to perform an additional test for version.
-    AUTOCONF=`which autoconf`
+    AUTOCONF=autoconf
 
-    if [ ! -x "$AUTOCONF" ] ; then
+    $AUTOCONF
+    if [ $? != 0 ] ; then
 	echo "No autoconf binary found in PATH"
 	exit -1
     fi
 
     # Tests the autoconf version
-    AC_VER=`$AUTOCONF --version | head -1 | sed 's/^[^0-9]*//i'`
+    AC_VER=`$AUTOCONF --version | head -1 | sed 's/^[^0-9]*//'`
     AC_MAJORVER=`echo $AC_VER | cut -f1 -d'.'`
     AC_MINORVER=`echo $AC_VER | cut -f2 -d'.'`
 


More information about the XviD-devel mailing list