1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-12-04 14:46:30 -05:00

fix issues with non-portable echo flags and re-do the tests for automake

version checking. The enrironment var AUTOMAKE can be used to indicate the
first one to check for

svn path=/trunk/icecast/; revision=5183
This commit is contained in:
Karl Heyes 2003-07-30 14:46:35 +00:00
parent 4f41ecedb6
commit aadf140e5d

View File

@ -2,7 +2,7 @@
# Run this to set up the build system: configure, makefiles, etc. # Run this to set up the build system: configure, makefiles, etc.
# (based on the version in enlightenment's cvs) # (based on the version in enlightenment's cvs)
package="icecast" package="ices"
olddir=`pwd` olddir=`pwd`
srcdir=`dirname $0` srcdir=`dirname $0`
@ -22,52 +22,55 @@ VERSIONGREP="sed -e s/.*[^0-9\.]\([0-9]\.[0-9]\).*/\1/"
# do we need automake? # do we need automake?
if test -r Makefile.am; then if test -r Makefile.am; then
options=`fgrep AUTOMAKE_OPTIONS Makefile.am` echo Checking for automake version
AM_NEEDED=`echo "$options" | $VERSIONGREP` options=`fgrep AUTOMAKE_OPTIONS Makefile.am`
if test -z "$AM_NEEDED" || test "x$AM_NEEDED" = "x$options"; then AM_NEEDED=`echo "$options" | $VERSIONGREP`
echo -n "checking for automake..." AM_PROGS=automake
AUTOMAKE=automake AC_PROGS=aclocal
ACLOCAL=aclocal if test -n "$AM_NEEDED" && test "x$AM_NEEDED" != "x$options"
if ($AUTOMAKE --version < /dev/null > /dev/null 2>&1); then then
echo "yes" AM_PROGS="automake-$AM_NEEDED automake$AM_NEEDED $AM_PROGS"
AC_PROGS="aclocal-$AM_NEEDED aclocal$AM_NEEDED $AC_PROGS"
else else
echo "no" AM_NEEDED=""
AUTOMAKE=""
fi fi
else AM_PROGS="$AUTOMAKE $AM_PROGS"
echo -n "checking for automake $AM_NEEDED or later..." AC_PROGS="$ACLOCAL $AC_PROGS"
for am in automake-$AM_NEEDED automake$AM_NEEDED automake; do for am in $AM_PROGS; do
($am --version < /dev/null > /dev/null 2>&1) || continue ($am --version > /dev/null 2>&1) 2>/dev/null || continue
ver=`$am --version < /dev/null | head -1 | $VERSIONGREP` ver=`$am --version | head -1 | $VERSIONGREP`
if test $ver = $AM_NEEDED; then AWK_RES=`echo $ver $AM_NEEDED | awk '{ if ( $1 >= $2 ) print "yes"; else print "no" }'`
if test "$AWK_RES" = "yes"; then
AUTOMAKE=$am AUTOMAKE=$am
echo $AUTOMAKE echo " found $AUTOMAKE"
break break
fi fi
done done
test -z $AUTOMAKE && echo "no" for ac in $AC_PROGS; do
echo -n "checking for aclocal $AM_NEEDED or later..." ($ac --version > /dev/null 2>&1) 2>/dev/null || continue
for ac in aclocal-$AM_NEEDED aclocal$AM_NEEDED aclocal; do
($ac --version < /dev/null > /dev/null 2>&1) || continue
ver=`$ac --version < /dev/null | head -1 | $VERSIONGREP` ver=`$ac --version < /dev/null | head -1 | $VERSIONGREP`
if test $ver = $AM_NEEDED; then AWK_RES=`echo $ver $AM_NEEDED | awk '{ if ( $1 >= $2 ) print "yes"; else print "no" }'`
if test "$AWK_RES" = "yes"; then
ACLOCAL=$ac ACLOCAL=$ac
echo $ACLOCAL echo " found $ACLOCAL"
break break
fi fi
done done
test -z $ACLOCAL && echo "no" test -z $AUTOMAKE || test -z $ACLOCAL && {
fi
test -z $AUTOMAKE || test -z $ACLOCAL && {
echo echo
echo "You must have automake installed to compile $package." if test -n "$AM_NEEDED"; then
echo "You must have automake version $AM_NEEDED installed"
echo "to compile $package."
else
echo "You must have automake installed to compile $package."
fi
echo "Download the appropriate package for your distribution," echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1 DIE=1
} }
fi fi
(libtoolize --version) < /dev/null > /dev/null 2>&1 || { (libtoolize --version) > /dev/null 2>&1 || {
echo echo
echo "You must have libtool installed to compile $package." echo "You must have libtool installed to compile $package."
echo "Download the appropriate package for your system," echo "Download the appropriate package for your system,"
@ -83,7 +86,7 @@ fi
echo "Generating configuration files for $package, please wait...." echo "Generating configuration files for $package, please wait...."
ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I m4" ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I m4"
if ! test -z $ACLOCAL; then if test -n "$ACLOCAL"; then
echo " $ACLOCAL $ACLOCAL_FLAGS" echo " $ACLOCAL $ACLOCAL_FLAGS"
$ACLOCAL $ACLOCAL_FLAGS $ACLOCAL $ACLOCAL_FLAGS
fi fi
@ -94,7 +97,7 @@ autoheader
echo " libtoolize --automake" echo " libtoolize --automake"
libtoolize --automake libtoolize --automake
if ! test -z $AUTOMAKE; then if test -n "$AUTOMAKE"; then
echo " $AUTOMAKE --add-missing" echo " $AUTOMAKE --add-missing"
$AUTOMAKE --add-missing $AUTOMAKE --add-missing
fi fi