3 # Run this to generate configure, the initial makefiles, etc.
5 # Source (non-CVS) distributions should come with a "configure" script
6 # already generated--people simply compiling the program shouldn't
7 # need autoconf and friends installed.
9 # CVS only contains the source files: Makefile.am, configure.ac, and
14 test -z
"$srcdir" && srcdir
=.
19 ACLOCAL_OPTIONS
='-I autoconf/m4/'
24 (test -f
$srcdir/configure.ac \
25 && test -d
$srcdir/src
) ||
{
26 echo -n
"**Error**: Directory \"$srcdir\" does not look like the"
27 echo " top-level $PKG_NAME directory"
34 ($AUTOCONF --version
) > /dev
/null
2>&1 ||
{
36 echo "**Error**: You must have \`autoconf' installed to compile $PKG_NAME."
37 echo "Download the appropriate package for your distribution,"
38 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/autoconf/"
42 # Try automake-1.9, 1.8, and 1.7.
43 # HACK: automake 1.7/1.8 choke without a space after -I. Override here.
44 if automake-1.9
--version
> /dev
/null
2>&1; then
47 elif automake-1.8
--version
> /dev
/null
2>&1; then
50 ACLOCAL_OPTIONS
="-I autoconf/m4/"
51 elif automake-1.7
--version
> /dev
/null
2>&1; then
55 ACLOCAL_OPTIONS
='-Iautoconf/m4/'
58 # If none of those were found, check if "automake" exists, and check the version.
59 if test -z
"$AUTOMAKE" && automake
--version
> /dev
/null
2>&1; then
60 version
=`automake --version 2>/dev/null|head -1|sed -e 's/.* \([0-9]\+\.[0-9]\+\).*$/\1/'`
64 if test -z
"$version"; then
65 echo "\`automake' appears to be installed, but the version string could not"
66 echo "be parsed. Proceeding anyway ..."
67 elif test $1 -lt
1 -o
$2 -lt
7; then
68 echo "\`automake' appears to be installed, but is not recent enough. Automake"
69 echo "1.7 or newer is required."
77 if test -z
"$AUTOMAKE"; then
79 echo "**Error**: You must have \`automake' installed to compile $PKG_NAME."
85 # if no automake, don't bother testing for aclocal
86 test -n
"$NO_AUTOMAKE" ||
($ACLOCAL --version
) < /dev
/null
> /dev
/null
2>&1 ||
{
88 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
89 echo "installed doesn't appear recent enough."
93 if test "$DIE" -eq
1; then
97 $ACLOCAL $ACLOCAL_OPTIONS
100 $AUTOMAKE $AUTOMAKE_OPTIONS