annotate src/flac-1.2.1/autogen.sh @ 83:ae30d91d2ffe

Replace these with versions built using an older toolset (so as to avoid ABI compatibilities when linking on Ubuntu 14.04 for packaging purposes)
author Chris Cannam
date Fri, 07 Feb 2020 11:51:13 +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 # Some notes:
Chris@1 6 #
Chris@1 7 # You may need to specify -I /SOME_PATH/share/aclocal in ACLOCAL_FLAGS
Chris@1 8 # if any packages FLAC relies on (autotools, libogg, libiconv) are
Chris@1 9 # installed in non-standard places.
Chris@1 10 #
Chris@1 11 # If you don't have XMMS installed at all, you should comment out
Chris@1 12 # AM_PATH_XMMS in configure.in.
Chris@1 13 #
Chris@1 14 # FLAC uses iconv but not gettext. iconv requires config.rpath which
Chris@1 15 # is supplied by gettext, which is copied in by gettextize. But we
Chris@1 16 # can't run gettextize since we do not fulfill all it's requirements
Chris@1 17 # (because we don't use it). So you may have to:
Chris@1 18 #
Chris@1 19 # cp /usr/share/gettext/config.rpath .
Chris@1 20 #
Chris@1 21 # before running autogen.sh
Chris@1 22 #
Chris@1 23 # If you are running on OS X and get errors related to the AM_ICONV
Chris@1 24 # and/or AM_LANGINFO_CODESET macros, replace those 2 lines in
Chris@1 25 # configure.in with
Chris@1 26 #
Chris@1 27 # AC_DEFINE([HAVE_ICONV], [], [Whether we have libiconv available]) LIBICONV="-liconv"
Chris@1 28 # AC_SUBST(LIBICONV)
Chris@1 29 #
Chris@1 30 # See also http://lists.xiph.org/pipermail/flac-dev/2007-September/002384.html
Chris@1 31 #
Chris@1 32 # Also watchout, if you replace ltmain.sh, there is a bug in some
Chris@1 33 # versions of libtool (or maybe autoconf) on some platforms where the
Chris@1 34 # configure-generated libtool does not have $SED defined. See also:
Chris@1 35 #
Chris@1 36 # http://lists.gnu.org/archive/html/libtool/2003-11/msg00131.html
Chris@1 37
Chris@1 38 package="flac"
Chris@1 39
Chris@1 40 olddir=`pwd`
Chris@1 41 srcdir=`dirname $0`
Chris@1 42 test -z "$srcdir" && srcdir=.
Chris@1 43
Chris@1 44 cd "$srcdir"
Chris@1 45 DIE=0
Chris@1 46
Chris@1 47 ACLOCAL_FLAGS="-I m4 $ACLOCAL_FLAGS"
Chris@1 48
Chris@1 49 echo "checking for autoconf... "
Chris@1 50 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
Chris@1 51 echo
Chris@1 52 echo "You must have autoconf installed to compile $package."
Chris@1 53 echo "Download the appropriate package for your distribution,"
Chris@1 54 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
Chris@1 55 DIE=1
Chris@1 56 }
Chris@1 57
Chris@1 58 VERSIONGREP="sed -e s/.*[^0-9\.]\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/"
Chris@1 59 VERSIONMKMAJ="sed -e s/\([0-9][0-9]*\)[^0-9].*/\\1/"
Chris@1 60 VERSIONMKMIN="sed -e s/.*[0-9][0-9]*\.//"
Chris@1 61
Chris@1 62 # do we need automake?
Chris@1 63 if test -r Makefile.am; then
Chris@1 64 AM_OPTIONS=`fgrep AUTOMAKE_OPTIONS Makefile.am`
Chris@1 65 AM_NEEDED=`echo $AM_OPTIONS | $VERSIONGREP`
Chris@1 66 if test x"$AM_NEEDED" = "x$AM_OPTIONS"; then
Chris@1 67 AM_NEEDED=""
Chris@1 68 fi
Chris@1 69 if test -z $AM_NEEDED; then
Chris@1 70 echo -n "checking for automake... "
Chris@1 71 AUTOMAKE=automake
Chris@1 72 ACLOCAL=aclocal
Chris@1 73 if ($AUTOMAKE --version < /dev/null > /dev/null 2>&1); then
Chris@1 74 echo "yes"
Chris@1 75 else
Chris@1 76 echo "no"
Chris@1 77 AUTOMAKE=
Chris@1 78 fi
Chris@1 79 else
Chris@1 80 echo -n "checking for automake $AM_NEEDED or later... "
Chris@1 81 majneeded=`echo $AM_NEEDED | $VERSIONMKMAJ`
Chris@1 82 minneeded=`echo $AM_NEEDED | $VERSIONMKMIN`
Chris@1 83 for am in automake-$AM_NEEDED automake$AM_NEEDED \
Chris@1 84 automake automake-1.7 automake-1.8 automake-1.9 automake-1.10; do
Chris@1 85 ($am --version < /dev/null > /dev/null 2>&1) || continue
Chris@1 86 ver=`$am --version < /dev/null | head -n 1 | $VERSIONGREP`
Chris@1 87 maj=`echo $ver | $VERSIONMKMAJ`
Chris@1 88 min=`echo $ver | $VERSIONMKMIN`
Chris@1 89 if test $maj -eq $majneeded -a $min -ge $minneeded; then
Chris@1 90 AUTOMAKE=$am
Chris@1 91 echo $AUTOMAKE
Chris@1 92 break
Chris@1 93 fi
Chris@1 94 done
Chris@1 95 test -z $AUTOMAKE && echo "no"
Chris@1 96 echo -n "checking for aclocal $AM_NEEDED or later... "
Chris@1 97 for ac in aclocal-$AM_NEEDED aclocal$AM_NEEDED \
Chris@1 98 aclocal aclocal-1.7 aclocal-1.8 aclocal-1.9 aclocal-1.10; do
Chris@1 99 ($ac --version < /dev/null > /dev/null 2>&1) || continue
Chris@1 100 ver=`$ac --version < /dev/null | head -n 1 | $VERSIONGREP`
Chris@1 101 maj=`echo $ver | $VERSIONMKMAJ`
Chris@1 102 min=`echo $ver | $VERSIONMKMIN`
Chris@1 103 if test $maj -eq $majneeded -a $min -ge $minneeded; then
Chris@1 104 ACLOCAL=$ac
Chris@1 105 echo $ACLOCAL
Chris@1 106 break
Chris@1 107 fi
Chris@1 108 done
Chris@1 109 test -z $ACLOCAL && echo "no"
Chris@1 110 fi
Chris@1 111 test -z $AUTOMAKE || test -z $ACLOCAL && {
Chris@1 112 echo
Chris@1 113 echo "You must have automake installed to compile $package."
Chris@1 114 echo "Download the appropriate package for your distribution,"
Chris@1 115 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
Chris@1 116 exit 1
Chris@1 117 }
Chris@1 118 fi
Chris@1 119
Chris@1 120 echo -n "checking for libtool... "
Chris@1 121 for LIBTOOLIZE in libtoolize glibtoolize nope; do
Chris@1 122 ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 && break
Chris@1 123 done
Chris@1 124 if test x$LIBTOOLIZE = xnope; then
Chris@1 125 echo "nope."
Chris@1 126 LIBTOOLIZE=libtoolize
Chris@1 127 else
Chris@1 128 echo $LIBTOOLIZE
Chris@1 129 fi
Chris@1 130 ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
Chris@1 131 echo
Chris@1 132 echo "You must have libtool installed to compile $package."
Chris@1 133 echo "Download the appropriate package for your system,"
Chris@1 134 echo "or get the source from one of the GNU ftp sites"
Chris@1 135 echo "listed in http://www.gnu.org/order/ftp.html"
Chris@1 136 DIE=1
Chris@1 137 }
Chris@1 138
Chris@1 139 if test "$DIE" -eq 1; then
Chris@1 140 exit 1
Chris@1 141 fi
Chris@1 142
Chris@1 143 if test -z "$*"; then
Chris@1 144 echo "I am going to run ./configure with no arguments - if you wish "
Chris@1 145 echo "to pass any to it, please specify them on the $0 command line."
Chris@1 146 fi
Chris@1 147
Chris@1 148 echo "Generating configuration files for $package, please wait...."
Chris@1 149
Chris@1 150 echo " $ACLOCAL $ACLOCAL_FLAGS"
Chris@1 151 $ACLOCAL $ACLOCAL_FLAGS || exit 1
Chris@1 152 echo " $LIBTOOLIZE --automake"
Chris@1 153 $LIBTOOLIZE --automake || exit 1
Chris@1 154 echo " autoheader"
Chris@1 155 autoheader || exit 1
Chris@1 156 echo " $AUTOMAKE --add-missing $AUTOMAKE_FLAGS"
Chris@1 157 $AUTOMAKE --add-missing $AUTOMAKE_FLAGS || exit 1
Chris@1 158 echo " autoconf"
Chris@1 159 autoconf || exit 1
Chris@1 160
Chris@1 161 cd $olddir
Chris@1 162 $srcdir/configure --enable-maintainer-mode "$@" && echo