2fd749
#!/bin/sh
2fd749
# Run this to generate all the initial makefiles, etc.
2fd749
test -n "$srcdir" || srcdir=`dirname "$0"`
2fd749
test -n "$srcdir" || srcdir=.
2fd749
2fd749
olddir=`pwd`
2fd749
2fd749
cd $srcdir
2fd749
2fd749
(test -f configure.ac) || {
2fd749
	echo "*** ERROR: Directory "\`$srcdir\'" does not look like the top-level project directory ***"
2fd749
	exit 1
2fd749
}
2fd749
2fd749
PKG_NAME=`autoconf --trace 'AC_INIT:$1' configure.ac`
2fd749
2fd749
if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
2fd749
	echo "*** WARNING: I am going to run \`configure' with no arguments." >&2
2fd749
	echo "*** If you wish to pass any to it, please specify them on the" >&2
2fd749
	echo "*** \`$0\' command line." >&2
2fd749
	echo "" >&2
2fd749
fi
2fd749
2fd749
aclocal --install || exit 1
2fd749
autoreconf --verbose --force --install -Wno-portability || exit 1
2fd749
2fd749
cd $olddir
2fd749
if [ "$NOCONFIGURE" = "" ]; then
2fd749
	$srcdir/configure "$@" || exit 1
2fd749
2fd749
	if [ "$1" = "--help" ]; then exit 0 else
2fd749
		echo "Now type \`make\' to compile $PKG_NAME" || exit 1
2fd749
	fi
2fd749
else
2fd749
	echo "Skipping configure process."
2fd749
fi
2fd749