annotate src/libvorbis-1.3.3/autogen.sh @ 36:55ece8862b6d

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