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, 2008, 2009, 2010, 2011 Free Software Foundation,
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 AC_INIT([GNU Automake], [1.11a], [bug-automake@gnu.org])
22 m4_ifndef([AC_PACKAGE_URL],
23 [AC_SUBST([PACKAGE_URL], [http://www.gnu.org/software/automake/])])
25 AC_CONFIG_SRCDIR(automake.in)
26 AC_CONFIG_AUX_DIR(lib)
31 # Save the AUTOCONF setting before AM_INIT_AUTOMAKE overrides it; this
32 # way we can run Autoconf tests from configure (or from the test
33 # suite) without being bothered by `missing'. Likewise for autom4te,
34 # autoreconf, autoheader, and autoupdate.
35 AC_SUBST([am_AUTOCONF], ["${AUTOCONF-autoconf}"])
36 AC_SUBST([am_AUTOM4TE], ["${AUTOM4TE-autom4te}"])
37 AC_SUBST([am_AUTORECONF], ["${AUTORECONF-autoreconf}"])
38 AC_SUBST([am_AUTOHEADER], ["${AUTOHEADER-autoheader}"])
39 AC_SUBST([am_AUTOUPDATE], ["${AUTOUPDATE-autoupdate}"])
41 AM_INIT_AUTOMAKE([1.10a dist-bzip2 filename-length-max=99 color-tests
42 parallel-tests silent-rules])
44 # The API version is the base version. We must guarantee
45 # compatibility for all releases with the same API version.
46 # Our current rule is that:
47 # * All releases, including the prereleases, in an X.Y series
48 # are compatible. So 1.5.1c is compatible with 1.5.
49 # * Prereleases on the trunk are all incompatible -- 1.5b and 1.5c
51 APIVERSION=`echo "$VERSION" | sed -e 's/^\([[0-9]]*\.[[0-9]]*[[a-z]]*\).*$/\1/'`
52 AC_SUBST([APIVERSION])
54 AC_SUBST([pkgvdatadir], ["\${datadir}/$PACKAGE-$APIVERSION"])
55 AC_SUBST([scriptdir], ["\${pkgvdatadir}"])
56 AC_SUBST([amdir], ["\${pkgvdatadir}/am"])
57 AC_SUBST([automake_acdir], ["\${datadir}/aclocal-$APIVERSION"])
58 AC_SUBST([system_acdir], ["\${datadir}/aclocal"])
60 # $AUTOMAKE and $ACLOCAL are always run after a `cd $top_srcdir',
61 # hence `.' is really what we want for perllibdir, libdir, and acdir.
62 ACLOCAL="perllibdir=\"`pwd`/lib$PATH_SEPARATOR./lib\" \"`pwd`/aclocal\" --acdir=m4 -I m4"
63 AUTOMAKE="perllibdir=\"`pwd`/lib$PATH_SEPARATOR./lib\" \"`pwd`/automake\" --libdir=lib"
65 AC_PATH_PROG(PERL, perl)
66 if test -z "$PERL"; then
67 AC_MSG_ERROR([perl not found])
69 # Save details about the selected perl interpreter in config.log.
70 AM_RUN_LOG([eval $PERL --version])
71 $PERL -e 'require 5.006;' || {
73 [perl 5.6 or better is required; perl 5.8.2 or better
74 is recommended. If you have several perl versions
75 installed, select the one Automake should use using
76 ./configure PERL=/path/to/perl])
79 # We require ithreads support, and version 5.7.2 for CLONE.
80 AC_CACHE_CHECK([whether $PERL supports ithreads], [am_cv_prog_PERL_ithreads],
84 if ($Config{useithreads})
88 require Thread::Queue;
92 exit 1;' >&AS_MESSAGE_LOG_FD 2>&1
94 am_cv_prog_PERL_ithreads=yes
96 am_cv_prog_PERL_ithreads=no
98 if test $am_cv_prog_PERL_ithreads = yes; then
103 AC_SUBST([PERL_THREADS])
105 # The test suite will skip some tests if tex is absent.
106 AC_CHECK_PROG([TEX], [tex], [tex])
108 # Generate man pages.
109 AM_MISSING_PROG([HELP2MAN], [help2man])
111 # Test for Autoconf. We run Autoconf in a subdirectory to ease
112 # deletion of any files created (such as those added to
113 # autom4te.cache). We used to perform only the last of the three
114 # following tests, but some users were unable to figure out that their
115 # installation was broken since --version appeared to work.
117 required_autoconf_version=2.62
118 AC_CACHE_CHECK([whether autoconf is installed], [am_cv_autoconf_installed],
119 [if AM_RUN_LOG([eval $am_AUTOCONF --version]);
121 am_cv_autoconf_installed=yes
123 am_cv_autoconf_installed=no
125 if test "$am_cv_autoconf_installed" = no; then
126 AC_MSG_ERROR([Autoconf $required_autoconf_version or better is required.
127 Please make sure it is installed and in your PATH.])
130 AC_CACHE_CHECK([whether autoconf works], [am_cv_autoconf_works],
132 echo 'AC''_INIT' > conftest/conftest.ac
133 if AM_RUN_LOG([cd conftest && eval $am_AUTOCONF -o /dev/null conftest.ac]);
135 am_cv_autoconf_works=yes
137 am_cv_autoconf_works=no
140 if test "$am_cv_autoconf_works" = no; then
141 AC_MSG_ERROR([The installed version of autoconf does not work.
142 Please check config.log for error messages before this one.])
145 AC_CACHE_CHECK([whether autoconf is recent enough], [am_cv_autoconf_version],
147 dnl Creative quoting required to avoid spurious expansion of AC_PREREQ macro
148 echo 'AC'"_PREREQ([[$required_autoconf_version]])" > conftest/conftest.ac
149 if AM_RUN_LOG([cd conftest && eval $am_AUTOCONF -o /dev/null conftest.ac]);
151 am_cv_autoconf_version=yes
153 am_cv_autoconf_version=no
156 if test "$am_cv_autoconf_version" = no; then
157 AC_MSG_ERROR([Autoconf $required_autoconf_version or better is required.])
160 # Test for ln. We need use it to install the versioned binaries.
161 AC_MSG_CHECKING([whether ln works])
162 AC_CACHE_VAL([am_cv_prog_ln], [
163 rm -f conftest conftest.file
165 if ln conftest.file conftest 2>/dev/null; then
168 am_cv_prog_ln='cp -p'
170 rm -f conftest conftest.file])
171 AC_SUBST([LN], [$am_cv_prog_ln])
173 test "x$am_cv_prog_ln" = xln && result=yes
174 AC_MSG_RESULT([$result])
176 # The amount we should wait after modifying files depends on the platform.
177 # On Windows '95, '98 and ME, files modifications have 2-seconds
178 # granularity and can be up to 3 seconds in the future w.r.t. the
179 # system clock. When it is important to ensure one file is older
180 # than another we wait at least 5 seconds between creations.
182 *-pc-msdosdjgpp) MODIFICATION_DELAY=5;;
183 *) MODIFICATION_DELAY=2;;
185 AC_SUBST([MODIFICATION_DELAY])
187 # Test for things needed by the test suite.
191 AC_CACHE_CHECK([whether $SHELL has working 'set -e' with exit trap],
192 [am_cv_sh_errexit_works],
193 [if $SHELL -ec "trap 'exit \$?' 0; (exit 77); exit 77"; test $? = 77
195 am_cv_sh_errexit_works=yes
197 am_cv_sh_errexit_works=no
200 if test $am_cv_sh_errexit_works = no; then
201 AC_MSG_WARN([`${MAKE-make} check' will leave leftover directories tests/*.dir])
202 AC_MSG_WARN([you can clean them up manually using `${MAKE-make} clean' or])
203 AC_MSG_WARN([`cd tests && ${MAKE-make} clean-local-check'])
204 dnl restore font-lock: `
206 AC_SUBST([sh_errexit_works], [$am_cv_sh_errexit_works])
211 lib/Automake/Makefile
212 lib/Automake/tests/Makefile
218 AC_CONFIG_LINKS([tests/defs:tests/defs])
219 AC_CONFIG_FILES([tests/aclocal-${APIVERSION}:tests/aclocal.in],
220 [chmod +x tests/aclocal-${APIVERSION}],
221 [APIVERSION=$APIVERSION])
222 AC_CONFIG_FILES([tests/automake-${APIVERSION}:tests/automake.in],
223 [chmod +x tests/automake-${APIVERSION}])