annotate src/libsamplerate-0.1.9/autogen.sh @ 169:223a55898ab9 tip default

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