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