[XviD-devel] Bootstrap

Christoph Lampert chl at math.uni-bonn.de
Wed Feb 19 09:51:30 CET 2003


On Wed, 19 Feb 2003, Edouard Gomez wrote:

> Christoph Lampert (chl at math.uni-bonn.de) wrote:
> > why is exactly "autoconf2.50" called in 
> > xvidcore/build/generic/bootstrap.sh ?
> > 
> > It may be called like this in Debian, but shouldn't we 
> > rather use the generic name "autoconf" instead of some 
> > special versioning? 
> 
> It's distro specific, and no, we can't use autoconf because many distros
> use symbolic links between  real autoconf2.13 and /usr/bin/autoconf. The
> configure.in is really for autoconf 2.50 and higher.
> 
> I may insert  a minimum requirement in the  configure.in (don't remember
> the  exact macro  name for  that) but  anyway, this  does not  solve the
> autoconf version problem.  That's why i added to  the script header this
> sentence:
> <quote>
> # NB: This script is adapted to Debian GNU/Linux SID program names
> #     Perhaps you could have to modify program names to match your distro
> </quote>

Yes, of course I read that, but I find it rather strange to remove all the
makefiles by an advanced automatic "autoconf/automake" system, and then
every user except for Debian Linux (which I doubt is the majority of
non-windows users) has to edit the file by hand before even bootstrap
runs. 

How about a wrapper (as -like google told me- e.g. Quakeforge does) that
checks for both and uses whichever is better? 

#!/bin/sh
# detect autoconf 
# Quakeforge showed how to do it.
#
AUTOCONF=`which autoconf2.50 2> /dev/null`
if [ -x "$AUTOCONF" ]; then
        rm -f configure.in
else
		AUTOCONF=`which autoconf 2> /dev/null`
        if [ -x "$AUTOCONF" ]; then
		AC_VER=`autoconf --version | head -1 | sed
's/^[^0-9]*//i'`
                AC_MAJORVER=`echo $AC_VER | cut -f1 -d'.'`
                AC_MINORVER=`echo $AC_VER | cut -f2 -d'.'`

                if [ "$AC_MAJORVER" -lt "2" ]; then
                        echo bootstrap.sh needs autoconf 2.50 or greater.
                        exit 1
                fi

                if [ "$AC_MINORVER" -lt "50" ]; then
                        echo bootstrap.sh needs autoconf 2.50 or greater.
                        exit 1
                fi
        else
                echo "autoconf wasn't found at all."
		echo "bootstrap.sh needs autoconf 2.50 or greater."
                exit 1
        fi
fi

# ----------------- the rest --------------------
#
# echo $AUTOCONF $AC_VER
#
#


gruel



More information about the XviD-devel mailing list