2001-09-09 22:21:46 -04:00
|
|
|
#!/bin/sh
|
|
|
|
# Run this to set up the build system: configure, makefiles, etc.
|
|
|
|
# (based on the version in enlightenment's cvs)
|
|
|
|
|
2003-11-17 19:39:19 -05:00
|
|
|
package="icecast"
|
2001-09-09 22:21:46 -04:00
|
|
|
|
2002-07-11 00:00:04 -04:00
|
|
|
olddir=`pwd`
|
2001-09-09 22:21:46 -04:00
|
|
|
srcdir=`dirname $0`
|
|
|
|
test -z "$srcdir" && srcdir=.
|
|
|
|
|
|
|
|
cd "$srcdir"
|
|
|
|
DIE=0
|
|
|
|
|
|
|
|
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
|
|
|
echo
|
|
|
|
echo "You must have autoconf installed to compile $package."
|
|
|
|
echo "Download the appropriate package for your distribution,"
|
|
|
|
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
|
|
|
DIE=1
|
|
|
|
}
|
2003-07-20 22:23:41 -04:00
|
|
|
VERSIONGREP="sed -e s/.*[^0-9\.]\([0-9]\.[0-9]\).*/\1/"
|
|
|
|
|
|
|
|
# do we need automake?
|
|
|
|
if test -r Makefile.am; then
|
2014-11-08 07:02:48 -05:00
|
|
|
echo "Checking for automake version"
|
2003-07-30 10:46:35 -04:00
|
|
|
options=`fgrep AUTOMAKE_OPTIONS Makefile.am`
|
|
|
|
AM_NEEDED=`echo "$options" | $VERSIONGREP`
|
|
|
|
AM_PROGS=automake
|
|
|
|
AC_PROGS=aclocal
|
|
|
|
if test -n "$AM_NEEDED" && test "x$AM_NEEDED" != "x$options"
|
|
|
|
then
|
|
|
|
AM_PROGS="automake-$AM_NEEDED automake$AM_NEEDED $AM_PROGS"
|
|
|
|
AC_PROGS="aclocal-$AM_NEEDED aclocal$AM_NEEDED $AC_PROGS"
|
2003-07-20 22:23:41 -04:00
|
|
|
else
|
2003-07-30 10:46:35 -04:00
|
|
|
AM_NEEDED=""
|
2003-07-20 22:23:41 -04:00
|
|
|
fi
|
2003-07-30 10:46:35 -04:00
|
|
|
AM_PROGS="$AUTOMAKE $AM_PROGS"
|
|
|
|
AC_PROGS="$ACLOCAL $AC_PROGS"
|
|
|
|
for am in $AM_PROGS; do
|
|
|
|
($am --version > /dev/null 2>&1) 2>/dev/null || continue
|
|
|
|
ver=`$am --version | head -1 | $VERSIONGREP`
|
|
|
|
AWK_RES=`echo $ver $AM_NEEDED | awk '{ if ( $1 >= $2 ) print "yes"; else print "no" }'`
|
|
|
|
if test "$AWK_RES" = "yes"; then
|
2003-07-20 22:23:41 -04:00
|
|
|
AUTOMAKE=$am
|
2003-07-30 10:46:35 -04:00
|
|
|
echo " found $AUTOMAKE"
|
2003-07-20 22:23:41 -04:00
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
2003-07-30 10:46:35 -04:00
|
|
|
for ac in $AC_PROGS; do
|
|
|
|
($ac --version > /dev/null 2>&1) 2>/dev/null || continue
|
2003-07-20 22:23:41 -04:00
|
|
|
ver=`$ac --version < /dev/null | head -1 | $VERSIONGREP`
|
2003-07-30 10:46:35 -04:00
|
|
|
AWK_RES=`echo $ver $AM_NEEDED | awk '{ if ( $1 >= $2 ) print "yes"; else print "no" }'`
|
|
|
|
if test "$AWK_RES" = "yes"; then
|
2003-07-20 22:23:41 -04:00
|
|
|
ACLOCAL=$ac
|
2003-07-30 10:46:35 -04:00
|
|
|
echo " found $ACLOCAL"
|
2003-07-20 22:23:41 -04:00
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
2003-07-30 10:46:35 -04:00
|
|
|
test -z $AUTOMAKE || test -z $ACLOCAL && {
|
2001-09-09 22:21:46 -04:00
|
|
|
echo
|
2003-07-30 10:46:35 -04:00
|
|
|
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
|
2003-07-20 22:23:41 -04:00
|
|
|
echo "Download the appropriate package for your distribution,"
|
|
|
|
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
2001-09-09 22:21:46 -04:00
|
|
|
DIE=1
|
2003-07-30 10:46:35 -04:00
|
|
|
}
|
2003-07-20 22:23:41 -04:00
|
|
|
fi
|
2001-09-09 22:21:46 -04:00
|
|
|
|
2014-11-08 07:02:48 -05:00
|
|
|
if command libtoolize --version 2>/dev/null; then
|
|
|
|
USE_GLIBTOOLIZE=0
|
|
|
|
else
|
|
|
|
if command glibtoolize --version 2>/dev/null; then
|
|
|
|
USE_GLIBTOOLIZE=1
|
|
|
|
else
|
|
|
|
echo
|
|
|
|
echo "You must have libtool installed to compile $package."
|
|
|
|
echo "Download the appropriate package for your system,"
|
|
|
|
echo "or get the source from one of the GNU ftp sites"
|
|
|
|
echo "listed in http://www.gnu.org/order/ftp.html"
|
|
|
|
DIE=1
|
|
|
|
fi
|
|
|
|
fi
|
2001-09-09 22:21:46 -04:00
|
|
|
|
|
|
|
if test "$DIE" -eq 1; then
|
2014-11-08 07:02:48 -05:00
|
|
|
exit 1
|
2001-09-09 22:21:46 -04:00
|
|
|
fi
|
|
|
|
|
2003-07-20 22:23:41 -04:00
|
|
|
echo "Generating configuration files for $package, please wait...."
|
|
|
|
|
|
|
|
ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I m4"
|
2003-07-30 10:46:35 -04:00
|
|
|
if test -n "$ACLOCAL"; then
|
2003-07-20 22:23:41 -04:00
|
|
|
echo " $ACLOCAL $ACLOCAL_FLAGS"
|
|
|
|
$ACLOCAL $ACLOCAL_FLAGS
|
2001-09-09 22:21:46 -04:00
|
|
|
fi
|
|
|
|
|
2003-07-20 22:23:41 -04:00
|
|
|
echo " autoheader"
|
|
|
|
autoheader
|
2001-09-09 22:21:46 -04:00
|
|
|
|
2014-11-08 07:02:48 -05:00
|
|
|
if test "$USE_GLIBTOOLIZE" -eq 0; then
|
|
|
|
echo " libtoolize --automake"
|
|
|
|
libtoolize --automake
|
|
|
|
else
|
|
|
|
echo " glibtoolize --automake"
|
|
|
|
glibtoolize --automake
|
|
|
|
fi
|
2003-07-20 22:23:41 -04:00
|
|
|
|
2003-07-30 10:46:35 -04:00
|
|
|
if test -n "$AUTOMAKE"; then
|
2003-07-20 22:23:41 -04:00
|
|
|
echo " $AUTOMAKE --add-missing"
|
|
|
|
$AUTOMAKE --add-missing
|
|
|
|
fi
|
|
|
|
|
2001-09-09 22:21:46 -04:00
|
|
|
echo " autoconf"
|
|
|
|
autoconf
|
|
|
|
|
2003-07-20 22:23:41 -04:00
|
|
|
if test -z "$*"; then
|
|
|
|
echo "I am going to run ./configure with no arguments - if you wish "
|
|
|
|
echo "to pass any to it, please specify them on the $0 command line."
|
|
|
|
fi
|
2002-07-11 00:00:04 -04:00
|
|
|
cd $olddir
|
2001-09-09 22:21:46 -04:00
|
|
|
$srcdir/configure "$@" && echo
|