annotate src/libsamplerate-0.1.8/autogen.sh @ 23:619f715526df sv_v2.1

Update Vamp plugin SDK to 2.5
author Chris Cannam
date Thu, 09 May 2013 10:52:46 +0100
parents c7265573341e
children
rev   line source
Chris@0 1 #!/bin/sh
Chris@0 2 # Run this to set up the build system: configure, makefiles, etc.
Chris@0 3 # (based on the version in enlightenment's cvs)
Chris@0 4
Chris@0 5 package="libsamplerate"
Chris@0 6
Chris@0 7 ACLOCAL_FLAGS="-I M4"
Chris@0 8
Chris@0 9 olddir=`pwd`
Chris@0 10 srcdir=`dirname $0`
Chris@0 11 test -z "$srcdir" && srcdir=.
Chris@0 12
Chris@0 13 cd "$srcdir"
Chris@0 14 DIE=0
Chris@0 15
Chris@0 16 echo "checking for autoconf... "
Chris@0 17 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
Chris@0 18 echo
Chris@0 19 echo "You must have autoconf installed to compile $package."
Chris@0 20 echo "Download the appropriate package for your distribution,"
Chris@0 21 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
Chris@0 22 DIE=1
Chris@0 23 }
Chris@0 24
Chris@0 25 VERSIONGREP="sed -e s/.*[^0-9\.]\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/"
Chris@0 26 VERSIONMKMAJ="sed -e s/\([0-9][0-9]*\)[^0-9].*/\\1/"
Chris@0 27 VERSIONMKMIN="sed -e s/.*[0-9][0-9]*\.//"
Chris@0 28
Chris@0 29 # do we need automake?
Chris@0 30 if test -r Makefile.am; then
Chris@0 31 AM_OPTIONS=`fgrep AUTOMAKE_OPTIONS Makefile.am`
Chris@0 32 AM_NEEDED=`echo $AM_OPTIONS | $VERSIONGREP`
Chris@0 33 if test x"$AM_NEEDED" = "x$AM_OPTIONS"; then
Chris@0 34 AM_NEEDED=""
Chris@0 35 fi
Chris@0 36 if test -z $AM_NEEDED; then
Chris@0 37 echo -n "checking for automake... "
Chris@0 38 AUTOMAKE=automake
Chris@0 39 ACLOCAL=aclocal
Chris@0 40 if ($AUTOMAKE --version < /dev/null > /dev/null 2>&1); then
Chris@0 41 echo "yes"
Chris@0 42 else
Chris@0 43 echo "no"
Chris@0 44 AUTOMAKE=
Chris@0 45 fi
Chris@0 46 else
Chris@0 47 echo -n "checking for automake $AM_NEEDED or later... "
Chris@0 48 majneeded=`echo $AM_NEEDED | $VERSIONMKMAJ`
Chris@0 49 minneeded=`echo $AM_NEEDED | $VERSIONMKMIN`
Chris@0 50 for am in automake-$AM_NEEDED automake$AM_NEEDED \
Chris@0 51 automake automake-1.7 automake-1.8 automake-1.9 automake-1.10; do
Chris@0 52 ($am --version < /dev/null > /dev/null 2>&1) || continue
Chris@0 53 ver=`$am --version < /dev/null | head -n 1 | $VERSIONGREP`
Chris@0 54 maj=`echo $ver | $VERSIONMKMAJ`
Chris@0 55 min=`echo $ver | $VERSIONMKMIN`
Chris@0 56 if test $maj -eq $majneeded -a $min -ge $minneeded; then
Chris@0 57 AUTOMAKE=$am
Chris@0 58 echo $AUTOMAKE
Chris@0 59 break
Chris@0 60 fi
Chris@0 61 done
Chris@0 62 test -z $AUTOMAKE && echo "no"
Chris@0 63 echo -n "checking for aclocal $AM_NEEDED or later... "
Chris@0 64 for ac in aclocal-$AM_NEEDED aclocal$AM_NEEDED \
Chris@0 65 aclocal aclocal-1.7 aclocal-1.8 aclocal-1.9 aclocal-1.10; do
Chris@0 66 ($ac --version < /dev/null > /dev/null 2>&1) || continue
Chris@0 67 ver=`$ac --version < /dev/null | head -n 1 | $VERSIONGREP`
Chris@0 68 maj=`echo $ver | $VERSIONMKMAJ`
Chris@0 69 min=`echo $ver | $VERSIONMKMIN`
Chris@0 70 if test $maj -eq $majneeded -a $min -ge $minneeded; then
Chris@0 71 ACLOCAL=$ac
Chris@0 72 echo $ACLOCAL
Chris@0 73 break
Chris@0 74 fi
Chris@0 75 done
Chris@0 76 test -z $ACLOCAL && echo "no"
Chris@0 77 fi
Chris@0 78 test -z $AUTOMAKE || test -z $ACLOCAL && {
Chris@0 79 echo
Chris@0 80 echo "You must have automake installed to compile $package."
Chris@0 81 echo "Download the appropriate package for your distribution,"
Chris@0 82 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
Chris@0 83 exit 1
Chris@0 84 }
Chris@0 85 fi
Chris@0 86
Chris@0 87 echo -n "checking for libtool... "
Chris@0 88 for LIBTOOLIZE in libtoolize glibtoolize nope; do
Chris@0 89 ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 && break
Chris@0 90 done
Chris@0 91 if test x$LIBTOOLIZE = xnope; then
Chris@0 92 echo "nope."
Chris@0 93 LIBTOOLIZE=libtoolize
Chris@0 94 else
Chris@0 95 echo $LIBTOOLIZE
Chris@0 96 fi
Chris@0 97 ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
Chris@0 98 echo
Chris@0 99 echo "You must have libtool installed to compile $package."
Chris@0 100 echo "Download the appropriate package for your system,"
Chris@0 101 echo "or get the source from one of the GNU ftp sites"
Chris@0 102 echo "listed in http://www.gnu.org/order/ftp.html"
Chris@0 103 DIE=1
Chris@0 104 }
Chris@0 105
Chris@0 106 if test "$DIE" -eq 1; then
Chris@0 107 exit 1
Chris@0 108 fi
Chris@0 109
Chris@0 110 if test -z "$*"; then
Chris@0 111 echo "I am going to run ./configure with no arguments - if you wish "
Chris@0 112 echo "to pass any to it, please specify them on the $0 command line."
Chris@0 113 fi
Chris@0 114
Chris@0 115 echo "Generating configuration files for $package, please wait...."
Chris@0 116
Chris@0 117 echo " $ACLOCAL $ACLOCAL_FLAGS"
Chris@0 118 $ACLOCAL $ACLOCAL_FLAGS || exit 1
Chris@0 119 echo " $LIBTOOLIZE --automake"
Chris@0 120 $LIBTOOLIZE --automake || exit 1
Chris@0 121 echo " autoheader"
Chris@0 122 autoheader || exit 1
Chris@0 123 echo " $AUTOMAKE --add-missing $AUTOMAKE_FLAGS"
Chris@0 124 $AUTOMAKE --add-missing $AUTOMAKE_FLAGS || exit 1
Chris@0 125 echo " autoconf"
Chris@0 126 autoconf || exit 1
Chris@0 127
Chris@0 128 cd $olddir
Chris@0 129 $srcdir/configure --enable-gcc-werror "$@" && echo