3 ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I m4"
7 test -z "$srcdir" && srcdir=.
9 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
11 echo "**Error**: You must have \`autoconf' installed."
12 echo "Download the appropriate package for your distribution,"
13 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
17 if [ -z "$LIBTOOL" ]; then
18 LIBTOOL=`which glibtool 2>/dev/null`
19 if [ ! -x "$LIBTOOL" ]; then
20 LIBTOOL=`which libtool`
24 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
25 ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || {
27 echo "**Error**: You must have \`libtool' installed."
28 echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
29 echo "(or a newer version if it is available)"
34 (automake --version) < /dev/null > /dev/null 2>&1 || {
36 echo "**Error**: You must have \`automake' installed."
37 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
38 echo "(or a newer version if it is available)"
44 # if no automake, don't bother testing for aclocal
45 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
47 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
48 echo "installed doesn't appear recent enough."
49 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
50 echo "(or a newer version if it is available)"
54 if test "$DIE" -eq 1; then
59 echo "**Warning**: I am going to run \`configure' with no arguments."
60 echo "If you wish to pass any to it, please specify them on the"
61 echo \`$0\'" command line."
67 am_opt=--include-deps;;
71 if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
72 if test -z "$NO_LIBTOOLIZE" ; then
73 echo "Running libtoolize..."
74 libtoolize --force --copy
78 echo "Running aclocal $ACLOCAL_FLAGS ..."
79 aclocal $ACLOCAL_FLAGS || {
81 echo "**Error**: aclocal failed. This may mean that you have not"
82 echo "installed all of the packages you need, or you may need to"
83 echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\""
84 echo "for the prefix where you installed the packages whose"
85 echo "macros were not found"
89 if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then
90 echo "Running autoheader..."
91 autoheader || { echo "**Error**: autoheader failed."; exit 1; }
94 echo "Running automake --gnu $am_opt ..."
95 automake --add-missing --gnu $am_opt ||
96 { echo "**Error**: automake failed."; exit 1; }
97 echo "Running autoconf ..."
98 autoconf || { echo "**Error**: autoconf failed."; exit 1; }
101 conf_flags="--enable-maintainer-mode"
103 if test x$NOCONFIGURE = x; then
104 echo Running $srcdir/configure $conf_flags "$@" ...
105 $srcdir/configure $conf_flags "$@" \
106 && echo Now type \`make\' to compile $PKG_NAME || exit 1
108 echo Skipping configure process.