* tests/missing3.test: New file (check for Paolo's change below).
[automake.git] / configure.ac
blobe55aab9016dfc9b00c7b6d3d2624cc4b22f19c2e
1 # Process this file with autoconf to produce a configure script.
3 # Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
4 # 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 2, or (at your option)
9 # any later version.
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, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19 # 02111-1307, USA.
21 dnl Require Autoconf 2.59a for AC_REQUIRE_AUX_FILE.
22 AC_PREREQ(2.59a)
23 AC_INIT([GNU Automake], [1.9a], [bug-automake@gnu.org])
25 AC_CONFIG_SRCDIR(automake.in)
26 AC_CONFIG_AUX_DIR(lib)
28 AC_CANONICAL_BUILD
30 # Save the AUTOCONF setting before AM_INIT_AUTOMAKE overrides it;
31 # this way we can run Autoconf tests from configure without being
32 # bothered by `missing'.
33 am_AUTOCONF=${AUTOCONF-autoconf}
35 AM_INIT_AUTOMAKE([1.8a dist-bzip2 filename-length-max=99])
37 # The API version is the base version.  We must guarantee
38 # compatibility for all releases with the same API version.
39 # Our current rule is that:
40 # * All releases, including the prereleases, in an X.Y series
41 #   are compatible.  So 1.5.1c is compatible with 1.5.
42 # * Prereleases on the trunk are all incompatible -- 1.5b and 1.5c
43 #   aren't the same.
44 APIVERSION=`echo "$VERSION" | sed -e 's/^\([[0-9]]*\.[[0-9]]*[[a-z]]*\).*$/\1/'`
45 AC_SUBST(APIVERSION)
47 # A versioned directory, defined here for convenience.
48 AC_SUBST([pkgvdatadir], ["\${datadir}/$PACKAGE-$APIVERSION"])
50 # $AUTOMAKE and $ACLOCAL are always run after a `cd $top_srcdir',
51 # hence `.' is really what we want for perllibdir, libdir, and acdir.
52 ACLOCAL="perllibdir=`pwd`\"/lib$PATH_SEPARATOR./lib\" `pwd`/aclocal --acdir=m4"
53 AUTOMAKE="perllibdir=`pwd`\"/lib$PATH_SEPARATOR./lib\" `pwd`/automake --libdir=lib"
55 AC_PATH_PROG(PERL, perl)
56 if test -z "$PERL"; then
57    AC_MSG_ERROR([perl not found])
59 $PERL -e 'require 5.005;' || {
60    AC_MSG_ERROR([perl 5.005 or better is required])
63 # The test suite will skip some tests if tex is absent.
64 AC_CHECK_PROG([TEX], [tex], [tex])
66 # Test for Autoconf.  We run Autoconf in a subdirectory to ease
67 # deletion of any files created (such as those added to
68 # autom4te.cache).  We used to perform only the last of the three
69 # following tests, but some users were unable to figure out that their
70 # installation was broken since --version appeared to work.
72 AC_CACHE_CHECK([whether autoconf is installed], [am_cv_autoconf_installed],
73 [if AM_RUN_LOG([eval $am_AUTOCONF --version]);
74 then
75   am_cv_autoconf_installed=yes
76 else
77   am_cv_autoconf_installed=no
78 fi])
79 if test "$am_cv_autoconf_installed" = no; then
80   AC_MSG_ERROR([Autoconf 2.58 or better is required.
81     Please make sure it is installed and in your PATH.])
84 AC_CACHE_CHECK([whether autoconf works], [am_cv_autoconf_works],
85 [mkdir conftest
86 echo 'AC''_INIT' > conftest/conftest.ac
87 if AM_RUN_LOG([cd conftest && eval $am_AUTOCONF -o /dev/null conftest.ac]);
88 then
89   am_cv_autoconf_works=yes
90 else
91   am_cv_autoconf_works=no
93 rm -rf conftest])
94 if test "$am_cv_autoconf_works" = no; then
95   AC_MSG_ERROR([The installed version of autoconf does not work.
96     Please check config.log for error messages before this one.])
99 AC_CACHE_CHECK([whether autoconf is recent enough], [am_cv_autoconf_version],
100 [mkdir conftest
101 echo 'AC''_PREREQ(2.58)' > conftest/conftest.ac
102 if AM_RUN_LOG([cd conftest && eval $am_AUTOCONF -o /dev/null conftest.ac]);
103 then
104   am_cv_autoconf_version=yes
105 else
106   am_cv_autoconf_version=no
108 rm -rf conftest])
109 if test "$am_cv_autoconf_version" = no; then
110   AC_MSG_ERROR([Autoconf 2.58 or better is required.])
113 # Test for ln.  We need use it to install the versioned binaries.
114 AC_MSG_CHECKING([whether ln works])
115 AC_CACHE_VAL([am_cv_prog_ln], [
116 rm -f conftest conftest.file
117 : >conftest.file
118 if ln conftest.file conftest 2>/dev/null; then
119   am_cv_prog_ln=ln
120 else
121   am_cv_prog_ln='cp -p'
123 rm -f conftest conftest.file])
124 AC_SUBST([LN], [$am_cv_prog_ln])
125 result=no
126 test "x$am_cv_prog_ln" = xln && result=yes
127 AC_MSG_RESULT([$result])
129 # The amount we should wait after modifying files depends on the platform.
130 # On Windows '95, '98 and ME, files modifications have 2-seconds
131 # granularity and can be up to 3 seconds in the future w.r.t. the
132 # system clock.  When it is important to ensure one file is older
133 # than another we wait at least 5 seconds between creations.
134 case $build in
135   *-pc-msdosdjgpp) MODIFICATION_DELAY=5;;
136   *)               MODIFICATION_DELAY=2;;
137 esac
138 AC_SUBST([MODIFICATION_DELAY])
140 # Test for things needed by the test suite.
141 AC_PROG_EGREP
142 AC_PROG_FGREP
144 AC_CONFIG_FILES([
145   Makefile
146   doc/Makefile
147   lib/Automake/Makefile
148   lib/Automake/tests/Makefile
149   lib/Makefile
150   lib/am/Makefile
151   m4/Makefile
152   tests/Makefile
153   tests/defs
155 AC_CONFIG_FILES([tests/aclocal-${APIVERSION}:tests/aclocal.in],
156                 [chmod +x tests/aclocal-${APIVERSION}],
157                 [APIVERSION=$APIVERSION])
158 AC_CONFIG_FILES([tests/automake-${APIVERSION}:tests/automake.in],
159                 [chmod +x tests/automake-${APIVERSION}])
161 AC_OUTPUT