2 # Run this to generate all the initial makefiles, etc.
5 test -z "$srcdir" && srcdir=.
10 echo "**Warning**: I am going to run \`configure' with arguments for"
11 echo "developer/maintainer mode. If you wish to pass extra arguments,"
12 echo "(such as --prefix), please specify them on the \`$0'"
14 echo "If you wish to run configure yourself, please specify --no-configure."
18 (test -f $srcdir/configure.ac) || {
19 echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
20 echo " top-level package directory"
24 # Make some directories required by automake, if they don't exist
25 if ! [ -d config ]; then mkdir -v config; fi
26 if ! [ -d m4 ]; then mkdir -v m4; fi
28 if ! autoreconf --version </dev/null >/dev/null 2>&1
31 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
33 echo "**Error**: You must have \`autoconf' installed."
34 echo "Download the appropriate package for your distribution,"
35 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
39 (grep "^LT_INIT" $srcdir/configure.ac >/dev/null) && {
40 (libtoolize --version) < /dev/null > /dev/null 2>&1 \
41 && LIBTOOLIZE=libtoolize || {
42 (glibtoolize --version) < /dev/null > /dev/null 2>&1 \
43 && LIBTOOLIZE=glibtoolize || {
45 echo "**Error**: You must have \`libtool' installed."
46 echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
52 (automake --version) < /dev/null > /dev/null 2>&1 || {
54 echo "**Error**: You must have \`automake' installed."
55 echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
61 # if no automake, don't bother testing for aclocal
62 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
64 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
65 echo "installed doesn't appear recent enough."
66 echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
70 if test "$DIE" -eq 1; then
76 am_opt=--include-deps;;
79 echo "Running aclocal $aclocalinclude ..."
80 aclocal $ACLOCAL_FLAGS || exit 1
81 echo "Running $LIBTOOLIZE ..."
83 echo "Running automake --gnu $am_opt ..."
84 automake --add-missing --gnu $am_opt || exit 1
85 echo "Running autoconf ..."
88 else # autoreconf instead
90 echo "Running autoreconf --verbose --install ..."
91 autoreconf --verbose --install || exit 1
95 if ( echo "$@" | grep -q -e "--no-configure" ); then
99 conf_flags="--enable-maintainer-mode --enable-debug --disable-silent-rules"
101 if test x$NOCONFIGURE = x; then
102 echo Running $srcdir/configure $conf_flags "$@" ...
103 $srcdir/configure $conf_flags "$@" \
104 && echo Now type \`make\' to compile. || exit 1
106 echo Skipping configure process.