annotate src/libsamplerate-0.1.9/autogen.sh @ 44:9894b839b0cb

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