* configure.in: Require Autoconf 2.57b to be sure
[platform/upstream/automake.git] / configure.in
1 # Process this file with autoconf to produce a configure script.
2
3 # Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
4 # Free Software Foundation, Inc.
5 #
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.
10 #
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.
15 #
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.
20
21 AC_PREREQ(2.57b)
22 AC_INIT([GNU Automake], [1.7a], [bug-automake@gnu.org])
23
24 AC_CONFIG_SRCDIR(automake.in)
25 AC_CONFIG_AUX_DIR(lib)
26
27 AC_CANONICAL_BUILD
28
29 # Save the AUTOCONF setting before AM_INIT_AUTOMAKE overrides it;
30 # this way we can run Autoconf tests from configure without being
31 # bothered by `missing'.
32 am_AUTOCONF=${AUTOCONF-autoconf}
33
34 AM_INIT_AUTOMAKE([1.6 dist-bzip2])
35
36 # The API version is the base version.  We must guarantee
37 # compatibility for all releases with the same API version.
38 # Our current rule is that:
39 # * All releases, including the prereleases, in an X.Y series
40 #   are compatible.  So 1.5.1c is compatible with 1.5.
41 # * Prereleases on the trunk are all incompatible -- 1.5b and 1.5c
42 #   aren't the same.
43 APIVERSION=`echo "$VERSION" | sed -e 's/^\([[0-9]]*\.[[0-9]]*[[a-z]]*\).*$/\1/'`
44 AC_SUBST(APIVERSION)
45
46 # A versioned directory, defined here for convenience.
47 pkgvdatadir="\${datadir}/automake-${APIVERSION}"
48 AC_SUBST(pkgvdatadir)
49
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:./lib `pwd`/aclocal --acdir=m4"
53 AUTOMAKE="perllibdir=`pwd`/lib:./lib `pwd`/automake --libdir=lib"
54
55 AC_PATH_PROG(PERL, perl)
56 if test -z "$PERL"; then
57    AC_MSG_ERROR([perl not found])
58 fi
59 $PERL -e 'require 5.005;' || {
60    AC_MSG_ERROR([perl 5.005 or better is required])
61 }
62
63 # The test suite will skip some tests if tex is absent.
64 AC_CHECK_PROG([TEX], [tex], [tex])
65
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).
69 mkdir conftest
70 echo 'AC''_PREREQ(2.54)' > conftest/conftest.ac
71 AM_RUN_LOG([cd conftest && eval $am_AUTOCONF -o /dev/null conftest.ac]) || {
72    AC_MSG_ERROR([Autoconf 2.54 or better is required.
73   Is it installed?  Is it in your PATH?  (try running `autoconf --version')
74   Is it working?  See also config.log for error messages before this one.])
75 }
76 rm -rf conftest
77
78 # Test for ln.  We need use it to install the versioned binaries.
79 AC_MSG_CHECKING([whether ln works])
80 AC_CACHE_VAL([am_cv_prog_ln], [
81 rm -f conftest conftest.file
82 : >conftest.file
83 if ln conftest.file conftest 2>/dev/null; then
84   am_cv_prog_ln=ln
85 else
86   am_cv_prog_ln='cp -p'
87 fi
88 rm -f conftest conftest.file])
89 AC_SUBST([LN], [$am_cv_prog_ln])
90 result=no
91 test "x$am_cv_prog_ln" = xln && result=yes
92 AC_MSG_RESULT([$result])
93
94 # The amount we should wait after modifying files depends on the platform.
95 # On Windows '95, '98 and ME, files modifications have 2-seconds
96 # granularity and can be up to 3 seconds in the future w.r.t. the
97 # system clock.  When it is important to ensure one file is older
98 # than another we wait at least 5 seconds between creations.
99 case $build in
100   *-pc-msdosdjgpp) MODIFICATION_DELAY=5;;
101   *)               MODIFICATION_DELAY=2;;
102 esac
103 AC_SUBST([MODIFICATION_DELAY])
104
105 # Test for things needed by the test suite.
106 AC_PROG_EGREP
107 AC_PROG_FGREP
108
109 AC_CONFIG_FILES([
110   Makefile
111   lib/Automake/Makefile
112   lib/Automake/tests/Makefile
113   lib/Makefile
114   lib/am/Makefile
115   m4/Makefile
116   tests/Makefile
117   tests/defs
118 ])
119
120 AC_OUTPUT