2 # Process this file with autoconf to produce a configure script.
4 # Copyright (C) 1992, 1993, 1994, 1995, 1999, 2000, 2001, 2002, 2003,
5 # 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
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 3 of the License, or
10 # (at your option) any later version.
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 # We need AC_CONFIG_TESTDIR.
23 AC_INIT([GNU Autoconf], [2.61b], [bug-autoconf@gnu.org])
24 AC_SUBST([PACKAGE_NAME])dnl
25 AC_CONFIG_SRCDIR([ChangeLog])
27 AC_CONFIG_AUX_DIR([build-aux])
29 AM_INIT_AUTOMAKE([check-news 1.7.9 dist-bzip2 readme-alpha])
31 # We use `/bin/sh -n script' to check that there are no syntax errors
32 # in the scripts. Although incredible, there are /bin/sh that go into
33 # endless loops with `-n', e.g., SunOS's:
36 # SunOS ondine 4.1.3 2 sun4m unknown
43 # $ time sh endless.sh
44 # sh endless.sh 0,02s user 0,03s system 78% cpu 0,064 total
45 # $ time sh -nx endless.sh
46 # ^Csh -nx endless.sh 3,67s user 0,03s system 63% cpu 5,868 total
48 # Also, some implementations of /bin/sh (e.g., Solaris 8) are soooo slow
49 # that they are unusable on large scripts like our testsuite.
51 # So before using `/bin/sh -n' to check our scripts, we first check
52 # that `/bin/sh -n' is known to not have these problems.
54 AC_CACHE_CHECK([whether /bin/sh -n is known to work], ac_cv_sh_n_works,
56 unset BASH_VERSION ZSH_VERSION
58 test -n "${BASH_VERSION+set}" || # Bash
59 test -n "${KSH_VERSION+set}" || # pdksh
60 test -n "${ZSH_VERSION+set}" || # zsh
61 test -n "${.sh.version}" # ksh93; put this last since its syntax is dodgy
64 then ac_cv_sh_n_works=yes
65 else ac_cv_sh_n_works=no
68 AC_SUBST(ac_cv_sh_n_works)
70 # Initialize the test suite.
71 AC_CONFIG_TESTDIR([tests])
72 AC_CONFIG_FILES([tests/Makefile tests/atlocal])
73 AC_PATH_PROG([EXPR], [expr])
80 # We use an absolute name for GNU m4 so even if users have another m4 first in
81 # their path, the installer can configure with a path that has GNU m4
82 # first and get that path embedded in the installed autoconf and
85 if test x"$ac_cv_prog_gnu_m4" != xyes; then
86 AC_MSG_ERROR([GNU M4 1.4.5 or later is required; 1.4.8 is recommended])
93 AC_CONFIG_FILES(man/Makefile)
94 AM_MISSING_PROG(HELP2MAN, help2man)
101 # We use an absolute name for perl so the #! line in autoscan will work.
102 AC_PATH_PROG([PERL], perl, no)
104 if test "$PERL" = no; then
105 AC_MSG_ERROR([perl is not found])
107 $PERL -e 'require 5.005_03;' || {
108 AC_MSG_ERROR([Perl 5.005_03 or better is required])
116 AC_CONFIG_FILES([lib/emacs/Makefile])
118 test x"$TEST_EMACS" = xt && TEST_EMACS=
119 AC_CHECK_PROGS([TEST_EMACS], [emacs xemacs], [no])
121 # autoconf-mode.el and autotest-mode.el do not work with older version of
122 # Emacs (i.e. 18.x.x). During byte-compilation, Emacs complains:
123 # "Variable (broken nil) seen on pass 2 of byte compiler but not pass 1"
124 # We detect this problem here.
125 AS_IF([test "$TEST_EMACS" != no],
126 [AC_CACHE_CHECK([whether $TEST_EMACS is sufficiently recent],
127 [ac_cv_prog_emacs_ok],
128 [# Note: The quoted "EOF" is intentional. It protects the ` in the text.
129 cat >conftest.el << "EOF"
131 (defun broken-mode () (setq broken-defaults `(broken nil)))
134 [$TEST_EMACS -batch -q -f batch-byte-compile conftest.el 1>&2])],
135 [ac_cv_prog_emacs_ok=yes], [ac_cv_prog_emacs_ok=no])
136 rm -f conftest.el conftest.elc])
137 AS_IF([test $ac_cv_prog_emacs_ok = no], [TEST_EMACS=no])])
139 AC_SUBST([EMACS], [$TEST_EMACS])
156 AC_CONFIG_FILES([Makefile doc/Makefile
157 lib/Makefile lib/Autom4te/Makefile lib/autoscan/Makefile
159 lib/autoconf/Makefile lib/autotest/Makefile
163 # Report the state of this version of Autoconf if this is a beta.
164 m4_bmatch(m4_defn([AC_PACKAGE_VERSION]), [[a-z]],
167 You are about to use an experimental version of Autoconf. Be sure to
168 read the relevant mailing lists, most importantly <autoconf@gnu.org>.
170 Below you will find information on the status of this version of Autoconf.
174 sed -n '/^\* Status/,$p' $srcdir/BUGS