rhughes@241: #!/bin/sh rhughes@241: # Run this to generate all the initial makefiles, etc. rhughes@241: rhughes@241: srcdir=`dirname $0` rhughes@241: test -z "$srcdir" && srcdir=. rhughes@241: rhughes@241: DIE=0 rhughes@241: rhughes@241: (test -f $srcdir/configure.ac) || { rhughes@241: echo -n "**Error**: Directory $srcdir does not look like the" rhughes@241: echo " top-level package directory" rhughes@241: exit 1 rhughes@241: } rhughes@241: rhughes@241: (autoconf --version) < /dev/null > /dev/null 2>&1 || { rhughes@241: echo rhughes@241: echo "**Error**: You must have autoconf installed." rhughes@241: echo "Download the appropriate package for your distribution," rhughes@241: echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" rhughes@241: DIE=1 rhughes@241: } rhughes@241: rhughes@241: (grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && { rhughes@241: (libtool --version) < /dev/null > /dev/null 2>&1 || { rhughes@241: echo rhughes@241: echo "**Error**: You must have libtool installed." rhughes@241: echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/" rhughes@241: DIE=1 rhughes@241: } rhughes@241: } rhughes@241: rhughes@241: (automake --version) < /dev/null > /dev/null 2>&1 || { rhughes@241: echo rhughes@241: echo "**Error**: You must have automake installed." rhughes@241: echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/" rhughes@241: DIE=1 rhughes@241: NO_AUTOMAKE=yes rhughes@241: } rhughes@241: rhughes@241: rhughes@241: # if no automake, don't bother testing for aclocal rhughes@241: test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { rhughes@241: echo rhughes@241: echo "**Error**: Missing aclocal. The version of automake" rhughes@241: echo "installed doesn't appear recent enough." rhughes@241: echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/" rhughes@241: DIE=1 rhughes@241: } rhughes@241: ali@323: if [ -z "$GNULIB_TOOL" ]; then ali@323: GNULIB_TOOL=`which gnulib-tool` ali@323: if [ -z "$GNULIB_TOOL" ]; then ali@323: echo ali@323: echo "**Error**: Missing gnulib-tool. Set GNULIB_TOOL to point" ali@323: echo "to a copy of gnulib-tool which is not in your PATH." ali@323: echo "You can get gnulib from http://www.gnu.org/software/gnulib/" ali@323: DIE=1 ali@323: fi ali@323: fi ali@323: rhughes@241: if test "$DIE" -eq 1; then rhughes@241: exit 1 rhughes@241: fi rhughes@241: rhughes@241: if test -z "$*"; then rhughes@241: echo "**Warning**: I am going to run configure with no arguments." rhughes@241: echo "If you wish to pass any to it, please specify them on the" rhughes@241: echo $0 " command line." rhughes@241: echo rhughes@241: fi rhughes@241: rhughes@241: case $CC in rhughes@241: xlc ) rhughes@241: am_opt=--include-deps;; rhughes@241: esac rhughes@241: ali@323: aclocalinclude="-I gl/m4 $ACLOCAL_FLAGS" rhughes@241: rhughes@241: if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then rhughes@241: if test -z "$NO_LIBTOOLIZE" ; then rhughes@241: echo "Running libtoolize..." rhughes@241: libtoolize --force --copy rhughes@241: fi rhughes@241: fi rhughes@241: echo "Running aclocal $aclocalinclude ..." rhughes@241: aclocal $aclocalinclude rhughes@241: if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then rhughes@241: echo "Running autoheader..." rhughes@241: autoheader rhughes@241: fi rhughes@241: echo "Running automake --gnu -Wno-portability $am_opt ..." rhughes@241: automake --add-missing --gnu -Wno-portability $am_opt rhughes@241: echo "Running autoconf ..." rhughes@241: autoconf rhughes@241: rhughes@241: intltoolize --copy --force --automake || exit 1 rhughes@241: krh@262: gtkdocize --copy --flavour no-tmpl krh@262: ali@323: echo "Running $GNULIB_TOOL --update ..." ali@323: $GNULIB_TOOL --update ali@323: rhughes@241: conf_flags="--enable-maintainer-mode" rhughes@241: rhughes@241: if test x$NOCONFIGURE = x; then rhughes@241: echo "Running $srcdir/configure $conf_flags $@ ..." rhughes@241: $srcdir/configure $conf_flags "$@" \ rhughes@241: && echo "Now type make to compile." || exit 1 rhughes@241: else rhughes@241: echo "Skipping configure process." rhughes@241: fi