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