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