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/>.
21 AC_INIT([GNU Automake], [1.11.0a], [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'. Likewise for autom4te,
31 # autoreconf, autoheader, and autoupdate.
32 AC_SUBST([am_AUTOCONF], ["${AUTOCONF-autoconf}"])
33 AC_SUBST([am_AUTOM4TE], ["${AUTOM4TE-autom4te}"])
34 AC_SUBST([am_AUTORECONF], ["${AUTORECONF-autoreconf}"])
35 AC_SUBST([am_AUTOHEADER], ["${AUTOHEADER-autoheader}"])
36 AC_SUBST([am_AUTOUPDATE], ["${AUTOUPDATE-autoupdate}"])
38 AM_INIT_AUTOMAKE([1.10a dist-xz filename-length-max=99 color-tests parallel-tests])
40 # The API version is the base version. We must guarantee
41 # compatibility for all releases with the same API version.
42 # Our current rule is that:
43 # * All releases, including the prereleases, in an X.Y series
44 # are compatible. So 1.5.1c is compatible with 1.5.
45 # * Prereleases on the trunk are all incompatible -- 1.5b and 1.5c
47 APIVERSION=`echo "$VERSION" | sed -e 's/^\([[0-9]]*\.[[0-9]]*[[a-z]]*\).*$/\1/'`
48 AC_SUBST([APIVERSION])
50 # A versioned directory, defined here for convenience.
51 AC_SUBST([pkgvdatadir], ["\${datadir}/$PACKAGE-$APIVERSION"])
53 # $AUTOMAKE and $ACLOCAL are always run after a `cd $top_srcdir',
54 # hence `.' is really what we want for perllibdir, libdir, and acdir.
55 ACLOCAL="perllibdir=\"`pwd`/lib$PATH_SEPARATOR./lib\" \"`pwd`/aclocal\" --acdir=m4 -I m4"
56 AUTOMAKE="perllibdir=\"`pwd`/lib$PATH_SEPARATOR./lib\" \"`pwd`/automake\" --libdir=lib"
58 AC_PATH_PROG([PERL], [perl])
59 if test -z "$PERL"; then
60 AC_MSG_ERROR([perl not found])
62 # Save details about the selected perl interpreter in config.log.
63 AM_RUN_LOG([$PERL --version])
64 $PERL -e 'require 5.006;' || {
66 [perl 5.6 or better is required; perl 5.8.2 or better
67 is recommended. If you have several perl versions
68 installed, select the one Automake should use using
69 ./configure PERL=/path/to/perl])
72 # We require ithreads support, and version 5.7.2 for CLONE.
73 AC_CACHE_CHECK([whether $PERL supports ithreads], [am_cv_prog_PERL_ithreads],
77 if ($Config{useithreads})
81 require Thread::Queue;
85 exit 1;' >&AS_MESSAGE_LOG_FD 2>&1
87 am_cv_prog_PERL_ithreads=yes
89 am_cv_prog_PERL_ithreads=no
91 if test $am_cv_prog_PERL_ithreads = yes; then
96 AC_SUBST([PERL_THREADS])
98 # The test suite will skip some tests if tex is absent.
99 AC_CHECK_PROG([TEX], [tex], [tex])
100 # Save details about the selected TeX program in config.log.
101 # Redirect input from /dev/null, as TeX might otherwise hang waiting
102 # for input from the terminal.
103 AM_RUN_LOG([$TEX --version </dev/null])
105 # Generate man pages.
106 AM_MISSING_PROG([HELP2MAN], [help2man])
108 # Test for Autoconf. We run Autoconf in a subdirectory to ease
109 # deletion of any files created (such as those added to
110 # autom4te.cache). We used to perform only the last of the three
111 # following tests, but some users were unable to figure out that their
112 # installation was broken since --version appeared to work.
114 required_autoconf_version=2.62
115 AC_CACHE_CHECK([whether autoconf is installed], [am_cv_autoconf_installed],
116 [if AM_RUN_LOG([$am_AUTOCONF --version]);
118 am_cv_autoconf_installed=yes
120 am_cv_autoconf_installed=no
122 if test "$am_cv_autoconf_installed" = no; then
123 AC_MSG_ERROR([Autoconf $required_autoconf_version or better is required.
124 Please make sure it is installed and in your PATH.])
127 AC_CACHE_CHECK([whether autoconf works], [am_cv_autoconf_works],
129 echo 'AC''_INIT' > conftest/conftest.ac
130 if AM_RUN_LOG([cd conftest && $am_AUTOCONF -o /dev/null conftest.ac]);
132 am_cv_autoconf_works=yes
134 am_cv_autoconf_works=no
137 if test "$am_cv_autoconf_works" = no; then
138 AC_MSG_ERROR([The installed version of autoconf does not work.
139 Please check config.log for error messages before this one.])
142 AC_CACHE_CHECK([whether autoconf is recent enough], [am_cv_autoconf_version],
144 dnl Creative quoting required to avoid spurious expansion of AC_PREREQ macro
145 echo 'AC'"_PREREQ([[$required_autoconf_version]])" > conftest/conftest.ac
146 if AM_RUN_LOG([cd conftest && $am_AUTOCONF -o /dev/null conftest.ac]);
148 am_cv_autoconf_version=yes
150 am_cv_autoconf_version=no
153 if test "$am_cv_autoconf_version" = no; then
154 AC_MSG_ERROR([Autoconf $required_autoconf_version or better is required.])
157 # Test for ln. We need use it to install the versioned binaries.
158 AC_MSG_CHECKING([whether ln works])
159 AC_CACHE_VAL([am_cv_prog_ln], [
160 rm -f conftest conftest.file
162 if ln conftest.file conftest 2>/dev/null; then
165 am_cv_prog_ln='cp -p'
167 rm -f conftest conftest.file])
168 AC_SUBST([LN], [$am_cv_prog_ln])
170 test "x$am_cv_prog_ln" = xln && result=yes
171 AC_MSG_RESULT([$result])
173 # The amount we should wait after modifying files depends on the platform.
174 # On Windows '95, '98 and ME, files modifications have 2-seconds
175 # granularity and can be up to 3 seconds in the future w.r.t. the
176 # system clock. When it is important to ensure one file is older
177 # than another we wait at least 5 seconds between creations.
179 *-pc-msdosdjgpp) MODIFICATION_DELAY=5;;
180 *) MODIFICATION_DELAY=2;;
182 AC_SUBST([MODIFICATION_DELAY])
184 # Test for things needed by the test suite.
188 AC_CACHE_CHECK([whether /bin/sh has working 'set -e' with exit trap],
189 [am_cv_sh_errexit_works],
190 [if /bin/sh -ec "trap 'exit \$?' 0; (exit 77); exit 77"; test $? = 77
192 am_cv_sh_errexit_works=yes
194 am_cv_sh_errexit_works=no
197 if test $am_cv_sh_errexit_works = no; then
198 AC_MSG_WARN([`${MAKE-make} check' will leave leftover directories tests/*.dir])
199 AC_MSG_WARN([you can clean them up manually using `${MAKE-make} clean' or])
200 AC_MSG_WARN([`cd tests && ${MAKE-make} clean-local-check'])
201 dnl restore font-lock: `
203 AC_SUBST([sh_errexit_works], [$am_cv_sh_errexit_works])
208 lib/Automake/Makefile
209 lib/Automake/tests/Makefile
216 AC_CONFIG_FILES([tests/aclocal-${APIVERSION}:tests/aclocal.in],
217 [chmod +x tests/aclocal-${APIVERSION}],
218 [APIVERSION=$APIVERSION])
219 AC_CONFIG_FILES([tests/automake-${APIVERSION}:tests/automake.in],
220 [chmod +x tests/automake-${APIVERSION}])
224 # Inform the user if this version of automake is a beta release or
225 # a development snapshot.
226 # According to HACKING, the version of a development snapshot should
227 # end with an "odd" letter (a, c, ...), the version of a test release
228 # should end wit an "even" letter (b, d, ...).
230 am_stable_version_rx='[[1-9]\.[0-9]+(\.[0-9]+)?]'
231 am_beta_version_rx="[$am_stable_version_rx[bdfhjlnprtvxz]]"
233 am_release_type=`AS_ECHO(["$PACKAGE_VERSION"]) | LC_ALL=C awk ["
234 /^$am_stable_version_rx$/ { print \"stable\"; exit(0); }
235 /^$am_beta_version_rx$/ { print \"beta version\"; exit(0); }
236 { print \"development snapshot\"; }"]`
238 test "$am_release_type" = stable || cat <<EOF
240 WARNING: You are about to use a $am_release_type of automake.
241 WARNING: It might easily suffer from new bugs or regressions.
242 WARNING: You are strongly advised not to use it in production code.
244 Please report bugs, problems and feedback to <bug-automake@gnu.org>.