cannam@89: #!/bin/sh cannam@89: # Run this to generate all the initial makefiles, etc. cannam@89: cannam@89: srcdir=`dirname $0` cannam@89: test -z "$srcdir" && srcdir=. cannam@89: cannam@89: DIE=0 cannam@89: cannam@89: (test -f $srcdir/configure.ac) || { cannam@89: echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" cannam@89: echo " top-level package directory" cannam@89: exit 1 cannam@89: } cannam@89: cannam@89: (autoconf --version) < /dev/null > /dev/null 2>&1 || { cannam@89: echo cannam@89: echo "**Error**: You must have \`autoconf' installed." cannam@89: echo "Download the appropriate package for your distribution," cannam@89: echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" cannam@89: DIE=1 cannam@89: } cannam@89: cannam@89: (grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && { cannam@89: (libtoolize --version) < /dev/null > /dev/null 2>&1 \ cannam@89: && LIBTOOLIZE=libtoolize || { cannam@89: (glibtoolize --version) < /dev/null > /dev/null 2>&1 \ cannam@89: && LIBTOOLIZE=glibtoolize || { cannam@89: echo cannam@89: echo "**Error**: You must have \`libtool' installed." cannam@89: echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/" cannam@89: DIE=1 cannam@89: } cannam@89: } cannam@89: } cannam@89: cannam@89: (automake --version) < /dev/null > /dev/null 2>&1 || { cannam@89: echo cannam@89: echo "**Error**: You must have \`automake' installed." cannam@89: echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/" cannam@89: DIE=1 cannam@89: NO_AUTOMAKE=yes cannam@89: } cannam@89: cannam@89: cannam@89: # if no automake, don't bother testing for aclocal cannam@89: test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { cannam@89: echo cannam@89: echo "**Error**: Missing \`aclocal'. The version of \`automake'" cannam@89: echo "installed doesn't appear recent enough." cannam@89: echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/" cannam@89: DIE=1 cannam@89: } cannam@89: cannam@89: if test "$DIE" -eq 1; then cannam@89: exit 1 cannam@89: fi cannam@89: cannam@89: if test -z "$*"; then cannam@89: echo "**Warning**: I am going to run \`configure' with no arguments." cannam@89: echo "If you wish to pass any to it, please specify them on the" cannam@89: echo \`$0\'" command line." cannam@89: echo cannam@89: fi cannam@89: cannam@89: case $CC in cannam@89: xlc ) cannam@89: am_opt=--include-deps;; cannam@89: esac cannam@89: cannam@89: for coin in `find $srcdir -name configure.ac -print` cannam@89: do cannam@89: dr=`dirname $coin` cannam@89: if test -f $dr/NO-AUTO-GEN; then cannam@89: echo skipping $dr -- flagged as no auto-gen cannam@89: else cannam@89: echo processing $dr cannam@89: ( cd $dr cannam@89: cannam@89: aclocalinclude="$ACLOCAL_FLAGS" cannam@89: cannam@89: if grep "^AM_GLIB_GNU_GETTEXT" configure.ac >/dev/null; then cannam@89: echo "Creating $dr/aclocal.m4 ..." cannam@89: test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 cannam@89: echo "Running glib-gettextize... Ignore non-fatal messages." cannam@89: echo "no" | glib-gettextize --force --copy cannam@89: echo "Making $dr/aclocal.m4 writable ..." cannam@89: test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 cannam@89: fi cannam@89: if grep "^AC_PROG_INTLTOOL" configure.ac >/dev/null; then cannam@89: echo "Running intltoolize..." cannam@89: intltoolize --copy --force --automake cannam@89: fi cannam@89: if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then cannam@89: if test -z "$NO_LIBTOOLIZE" ; then cannam@89: echo "Running libtoolize..." cannam@89: $LIBTOOLIZE --force --copy cannam@89: fi cannam@89: fi cannam@89: echo "Running aclocal $aclocalinclude ..." cannam@89: aclocal $aclocalinclude cannam@89: if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then cannam@89: echo "Running autoheader..." cannam@89: autoheader cannam@89: fi cannam@89: echo "Running automake --gnu $am_opt ..." cannam@89: automake --add-missing --gnu $am_opt cannam@89: echo "Running autoconf ..." cannam@89: autoconf cannam@89: ) cannam@89: fi cannam@89: done cannam@89: cannam@89: conf_flags="--enable-maintainer-mode" cannam@89: cannam@89: if test x$NOCONFIGURE = x; then cannam@89: echo Running $srcdir/configure $conf_flags "$@" ... cannam@89: $srcdir/configure $conf_flags "$@" \ cannam@89: && echo Now type \`make\' to compile. || exit 1 cannam@89: else cannam@89: echo Skipping configure process. cannam@89: fi