paulo@0: #! /bin/sh paulo@0: # Run this to generate all the initial makefiles, etc. paulo@0: paulo@0: # Stolen from the GNU Midnight Commander. Customized for giFTcurs. Stolen from paulo@0: # giFTcurs. Customized for giFT. Stolen from giFT. Customized for OpenFT. paulo@0: # Stolen from OpenFT. paulo@0: paulo@0: # Make it possible to specify path in the environment paulo@0: : ${AUTOCONF=autoconf} paulo@0: : ${AUTOHEADER=autoheader} paulo@0: : ${AUTOMAKE=automake} paulo@0: : ${ACLOCAL=aclocal} paulo@0: : ${LIBTOOLIZE=libtoolize} paulo@0: paulo@0: srcdir=`dirname $0` paulo@0: test -z "$srcdir" && srcdir=. paulo@0: paulo@0: ( paulo@0: cd $srcdir paulo@0: paulo@0: # The autoconf cache (version after 2.52) is not reliable yet. paulo@0: rm -rf autom4te.cache paulo@0: paulo@0: rm -f aclocal.m4 paulo@0: ACLOCAL_INCLUDES="-I m4" paulo@0: paulo@0: # Some old version of GNU build tools fail to set error codes. paulo@0: # Check that they generate some of the files they should. paulo@0: paulo@0: echo "Running $ACLOCAL..." paulo@0: $ACLOCAL $ACLOCAL_INCLUDES $ACLOCAL_FLAGS || exit 1 paulo@0: test -f aclocal.m4 || \ paulo@0: { echo "aclocal failed to generate aclocal.m4" 2>&1; exit 1; } paulo@0: paulo@0: echo "Running $AUTOHEADER..." paulo@0: $AUTOHEADER || exit 1 paulo@0: test -f config.h.in || \ paulo@0: { echo "autoheader failed to generate config.h.in" 2>&1; exit 1; } paulo@0: paulo@0: echo "Running $AUTOCONF..." paulo@0: $AUTOCONF || exit 1 paulo@0: test -f configure || \ paulo@0: { echo "autoconf failed to generate configure" 2>&1; exit 1; } paulo@0: paulo@0: # hack hack hack...i hate autotools. paulo@0: echo "Running $LIBTOOLIZE --automake..." paulo@0: $LIBTOOLIZE --automake || exit 1 paulo@0: test -f ltmain.sh || \ paulo@0: { echo "libtoolize failed to generate ltmain.sh" 2>&1; exit 1; } paulo@0: paulo@0: # Workaround for Automake 1.5 to ensure that depcomp is distributed. paulo@0: echo "Running $AUTOMAKE..." paulo@0: $AUTOMAKE -a src/Makefile || exit 1 paulo@0: $AUTOMAKE -a || exit 1 paulo@0: test -f Makefile.in || \ paulo@0: { echo "automake failed to generate Makefile.in" 2>&1; exit 1; } paulo@0: paulo@0: ) || exit 1 paulo@0: paulo@0: #conf_flags="--enable-maintainer-mode --enable-compile-warnings" paulo@0: echo Running $srcdir/configure $conf_flags "$@" ... paulo@0: $srcdir/configure --cache-file=config.cache $conf_flags "$@"