2 # Run this to generate configure, the initial makefiles, etc.
4 # Source (non-CVS) distributions should come with a "configure" script
5 # already generated--people simply compiling the program shouldn't
6 # need autoconf and friends installed.
8 # CVS only contains the source files: Makefile.am, configure.ac, and
13 test -z
"$srcdir" && srcdir
=.
18 ACLOCAL_OPTIONS
=-Iautoconf
/m4/
23 (test -f
$srcdir/configure.ac \
24 && test -d
$srcdir/src
) ||
{
25 echo -n
"**Error**: Directory \"$srcdir\" does not look like the"
26 echo " top-level $PKG_NAME directory"
33 ($AUTOCONF --version
) > /dev
/null
2>&1 ||
{
35 echo "**Error**: You must have \`autoconf' installed to compile $PKG_NAME."
36 echo "Download the appropriate package for your distribution,"
37 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/autoconf/"
41 # Try automake-1.9, 1.8, and 1.7.
42 if automake-1.9
--version
> /dev
/null
2>&1; then
45 ACLOCAL_OPTIONS
='-I autoconf/m4/'
46 elif automake-1.8
--version
> /dev
/null
2>&1; then
49 ACLOCAL_OPTIONS
='-I autoconf/m4/'
50 elif automake-1.7
--version
> /dev
/null
2>&1; then
53 ACLOCAL_OPTIONS
='-I autoconf/m4/'
56 # If none of those were found, check if "automake" exists, and check the version.
57 if test -z
"$AUTOMAKE" && automake
--version
> /dev
/null
2>&1; then
58 version
=`automake --version 2>/dev/null|head -1|sed -e 's/.* \([0-9]\+\.[0-9]\+\).*$/\1/'`
62 if test -z
"$version"; then
63 echo "\`automake' appears to be installed, but the version string could not"
64 echo "be parsed. Proceeding anyway ..."
65 elif test $1 -lt
1 -o
$2 -lt
7; then
66 echo "\`automake' appears to be installed, but is not recent enough. Automake"
67 echo "1.7 or newer is required."
75 if test -z
"$AUTOMAKE"; then
77 echo "**Error**: You must have \`automake' installed to compile $PKG_NAME."
83 # if no automake, don't bother testing for aclocal
84 test -n
"$NO_AUTOMAKE" ||
($ACLOCAL --version
) < /dev
/null
> /dev
/null
2>&1 ||
{
86 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
87 echo "installed doesn't appear recent enough."
91 if test "$DIE" -eq
1; then
95 $ACLOCAL $ACLOCAL_OPTIONS
98 $AUTOMAKE $AUTOMAKE_OPTIONS