1 # Process this file with autoconf to produce a configure script.
3 # Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
4 # 2004, 2006, 2007 Free Software Foundation, Inc.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3, or (at your option)
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 dnl Require Autoconf 2.60 for AC_REQUIRE_AUX_FILE.
21 AC_INIT([GNU Automake], [1.10a], [bug-automake@gnu.org])
23 AC_CONFIG_SRCDIR(automake.in)
24 AC_CONFIG_AUX_DIR(lib)
28 # Save the AUTOCONF setting before AM_INIT_AUTOMAKE overrides it; this
29 # way we can run Autoconf tests from configure (or from the test
30 # suite) without being bothered by `missing'.
31 AC_SUBST([am_AUTOCONF], ["${AUTOCONF-autoconf}"])
33 AM_INIT_AUTOMAKE([1.10a dist-bzip2 filename-length-max=99 color-tests])
35 # The API version is the base version. We must guarantee
36 # compatibility for all releases with the same API version.
37 # Our current rule is that:
38 # * All releases, including the prereleases, in an X.Y series
39 # are compatible. So 1.5.1c is compatible with 1.5.
40 # * Prereleases on the trunk are all incompatible -- 1.5b and 1.5c
42 APIVERSION=`echo "$VERSION" | sed -e 's/^\([[0-9]]*\.[[0-9]]*[[a-z]]*\).*$/\1/'`
45 # A versioned directory, defined here for convenience.
46 AC_SUBST([pkgvdatadir], ["\${datadir}/$PACKAGE-$APIVERSION"])
48 # $AUTOMAKE and $ACLOCAL are always run after a `cd $top_srcdir',
49 # hence `.' is really what we want for perllibdir, libdir, and acdir.
50 ACLOCAL="perllibdir=\"`pwd`/lib$PATH_SEPARATOR./lib\" \"`pwd`/aclocal\" --acdir=m4 -I m4"
51 AUTOMAKE="perllibdir=\"`pwd`/lib$PATH_SEPARATOR./lib\" \"`pwd`/automake\" --libdir=lib"
53 AC_PATH_PROG(PERL, perl)
54 if test -z "$PERL"; then
55 AC_MSG_ERROR([perl not found])
57 $PERL -e 'require 5.006;' || {
59 [perl 5.6 or better is required; perl 5.8.2 or better
60 is recommended. If you have several perl versions
61 installed, select the one Automake should use using
62 ./configure PERL=/path/to/perl])
65 # The test suite will skip some tests if tex is absent.
66 AC_CHECK_PROG([TEX], [tex], [tex])
68 # Test for Autoconf. We run Autoconf in a subdirectory to ease
69 # deletion of any files created (such as those added to
70 # autom4te.cache). We used to perform only the last of the three
71 # following tests, but some users were unable to figure out that their
72 # installation was broken since --version appeared to work.
74 AC_CACHE_CHECK([whether autoconf is installed], [am_cv_autoconf_installed],
75 [if AM_RUN_LOG([eval $am_AUTOCONF --version]);
77 am_cv_autoconf_installed=yes
79 am_cv_autoconf_installed=no
81 if test "$am_cv_autoconf_installed" = no; then
82 AC_MSG_ERROR([Autoconf 2.60 or better is required.
83 Please make sure it is installed and in your PATH.])
86 AC_CACHE_CHECK([whether autoconf works], [am_cv_autoconf_works],
88 echo 'AC''_INIT' > conftest/conftest.ac
89 if AM_RUN_LOG([cd conftest && eval $am_AUTOCONF -o /dev/null conftest.ac]);
91 am_cv_autoconf_works=yes
93 am_cv_autoconf_works=no
96 if test "$am_cv_autoconf_works" = no; then
97 AC_MSG_ERROR([The installed version of autoconf does not work.
98 Please check config.log for error messages before this one.])
101 AC_CACHE_CHECK([whether autoconf is recent enough], [am_cv_autoconf_version],
103 echo 'AC''_PREREQ(2.60)' > conftest/conftest.ac
104 if AM_RUN_LOG([cd conftest && eval $am_AUTOCONF -o /dev/null conftest.ac]);
106 am_cv_autoconf_version=yes
108 am_cv_autoconf_version=no
111 if test "$am_cv_autoconf_version" = no; then
112 AC_MSG_ERROR([Autoconf 2.60 or better is required.])
115 # Test for ln. We need use it to install the versioned binaries.
116 AC_MSG_CHECKING([whether ln works])
117 AC_CACHE_VAL([am_cv_prog_ln], [
118 rm -f conftest conftest.file
120 if ln conftest.file conftest 2>/dev/null; then
123 am_cv_prog_ln='cp -p'
125 rm -f conftest conftest.file])
126 AC_SUBST([LN], [$am_cv_prog_ln])
128 test "x$am_cv_prog_ln" = xln && result=yes
129 AC_MSG_RESULT([$result])
131 # The amount we should wait after modifying files depends on the platform.
132 # On Windows '95, '98 and ME, files modifications have 2-seconds
133 # granularity and can be up to 3 seconds in the future w.r.t. the
134 # system clock. When it is important to ensure one file is older
135 # than another we wait at least 5 seconds between creations.
137 *-pc-msdosdjgpp) MODIFICATION_DELAY=5;;
138 *) MODIFICATION_DELAY=2;;
140 AC_SUBST([MODIFICATION_DELAY])
142 # Test for things needed by the test suite.
149 lib/Automake/Makefile
150 lib/Automake/tests/Makefile
157 AC_CONFIG_FILES([tests/aclocal-${APIVERSION}:tests/aclocal.in],
158 [chmod +x tests/aclocal-${APIVERSION}],
159 [APIVERSION=$APIVERSION])
160 AC_CONFIG_FILES([tests/automake-${APIVERSION}:tests/automake.in],
161 [chmod +x tests/automake-${APIVERSION}])