annotate src/liblo-0.26/autogen.sh @ 36:55ece8862b6d

Merge
author Chris Cannam
date Wed, 11 Mar 2015 13:32:44 +0000
parents e13257ea84a4
children
rev   line source
Chris@4 1 #!/bin/sh
Chris@4 2 # Run this to generate all the initial makefiles, etc.
Chris@4 3
Chris@4 4 srcdir=`dirname $0`
Chris@4 5 test -z "$srcdir" && srcdir=.
Chris@4 6
Chris@4 7 DIE=0
Chris@4 8
Chris@4 9 (test -f $srcdir/configure.ac) || {
Chris@4 10 echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
Chris@4 11 echo " top-level package directory"
Chris@4 12 exit 1
Chris@4 13 }
Chris@4 14
Chris@4 15 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
Chris@4 16 echo
Chris@4 17 echo "**Error**: You must have \`autoconf' installed."
Chris@4 18 echo "Download the appropriate package for your distribution,"
Chris@4 19 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
Chris@4 20 DIE=1
Chris@4 21 }
Chris@4 22
Chris@4 23 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
Chris@4 24 (libtoolize --version) < /dev/null > /dev/null 2>&1 \
Chris@4 25 && LIBTOOLIZE=libtoolize || {
Chris@4 26 (glibtoolize --version) < /dev/null > /dev/null 2>&1 \
Chris@4 27 && LIBTOOLIZE=glibtoolize || {
Chris@4 28 echo
Chris@4 29 echo "**Error**: You must have \`libtool' installed."
Chris@4 30 echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
Chris@4 31 DIE=1
Chris@4 32 }
Chris@4 33 }
Chris@4 34 }
Chris@4 35
Chris@4 36 (automake --version) < /dev/null > /dev/null 2>&1 || {
Chris@4 37 echo
Chris@4 38 echo "**Error**: You must have \`automake' installed."
Chris@4 39 echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
Chris@4 40 DIE=1
Chris@4 41 NO_AUTOMAKE=yes
Chris@4 42 }
Chris@4 43
Chris@4 44
Chris@4 45 # if no automake, don't bother testing for aclocal
Chris@4 46 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
Chris@4 47 echo
Chris@4 48 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
Chris@4 49 echo "installed doesn't appear recent enough."
Chris@4 50 echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
Chris@4 51 DIE=1
Chris@4 52 }
Chris@4 53
Chris@4 54 if test "$DIE" -eq 1; then
Chris@4 55 exit 1
Chris@4 56 fi
Chris@4 57
Chris@4 58 if test -z "$*"; then
Chris@4 59 echo "**Warning**: I am going to run \`configure' with no arguments."
Chris@4 60 echo "If you wish to pass any to it, please specify them on the"
Chris@4 61 echo \`$0\'" command line."
Chris@4 62 echo
Chris@4 63 fi
Chris@4 64
Chris@4 65 case $CC in
Chris@4 66 xlc )
Chris@4 67 am_opt=--include-deps;;
Chris@4 68 esac
Chris@4 69
Chris@4 70 for coin in `find $srcdir -name configure.ac -print`
Chris@4 71 do
Chris@4 72 dr=`dirname $coin`
Chris@4 73 if test -f $dr/NO-AUTO-GEN; then
Chris@4 74 echo skipping $dr -- flagged as no auto-gen
Chris@4 75 else
Chris@4 76 echo processing $dr
Chris@4 77 ( cd $dr
Chris@4 78
Chris@4 79 aclocalinclude="$ACLOCAL_FLAGS"
Chris@4 80
Chris@4 81 if grep "^AM_GLIB_GNU_GETTEXT" configure.ac >/dev/null; then
Chris@4 82 echo "Creating $dr/aclocal.m4 ..."
Chris@4 83 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
Chris@4 84 echo "Running glib-gettextize... Ignore non-fatal messages."
Chris@4 85 echo "no" | glib-gettextize --force --copy
Chris@4 86 echo "Making $dr/aclocal.m4 writable ..."
Chris@4 87 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
Chris@4 88 fi
Chris@4 89 if grep "^AC_PROG_INTLTOOL" configure.ac >/dev/null; then
Chris@4 90 echo "Running intltoolize..."
Chris@4 91 intltoolize --copy --force --automake
Chris@4 92 fi
Chris@4 93 if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
Chris@4 94 if test -z "$NO_LIBTOOLIZE" ; then
Chris@4 95 echo "Running libtoolize..."
Chris@4 96 $LIBTOOLIZE --force --copy
Chris@4 97 fi
Chris@4 98 fi
Chris@4 99 echo "Running aclocal $aclocalinclude ..."
Chris@4 100 aclocal $aclocalinclude
Chris@4 101 if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then
Chris@4 102 echo "Running autoheader..."
Chris@4 103 autoheader
Chris@4 104 fi
Chris@4 105 echo "Running automake --gnu $am_opt ..."
Chris@4 106 automake --add-missing --gnu $am_opt
Chris@4 107 echo "Running autoconf ..."
Chris@4 108 autoconf
Chris@4 109 )
Chris@4 110 fi
Chris@4 111 done
Chris@4 112
Chris@4 113 conf_flags="--enable-maintainer-mode"
Chris@4 114
Chris@4 115 if test x$NOCONFIGURE = x; then
Chris@4 116 echo Running $srcdir/configure $conf_flags "$@" ...
Chris@4 117 $srcdir/configure $conf_flags "$@" \
Chris@4 118 && echo Now type \`make\' to compile. || exit 1
Chris@4 119 else
Chris@4 120 echo Skipping configure process.
Chris@4 121 fi