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