2 # Process this file with autoconf to produce a configure script.
4 # Copyright (C) 1992, 1993, 1994, 1995, 1999, 2000, 2001, 2002, 2003
5 # 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 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, write to the Free Software
19 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
22 # We need AC_CONFIG_TESTDIR.
25 AC_INIT([GNU Autoconf], [2.57f], [bug-autoconf@gnu.org])
26 AC_SUBST([PACKAGE_NAME])dnl
27 AC_CONFIG_SRCDIR([ChangeLog])
29 AC_CONFIG_AUX_DIR([config])
30 AC_CONFIG_FILES([config/Makefile])
32 AM_INIT_AUTOMAKE([check-news 1.7.7 dist-bzip2 readme-alpha])
34 # Initialize the test suite and build position independent wrappers.
35 AC_CONFIG_TESTDIR([tests])
36 AC_CONFIG_FILES([tests/Makefile tests/atlocal])
37 AC_CONFIG_FILES([tests/autoconf:tests/wrapper.in],
38 [chmod +x tests/autoconf])
39 AC_CONFIG_FILES([tests/autoheader:tests/wrapper.in],
40 [chmod +x tests/autoheader])
41 AC_CONFIG_FILES([tests/autom4te:tests/wrapper.in],
42 [chmod +x tests/autom4te])
43 AC_CONFIG_FILES([tests/autoreconf:tests/wrapper.in],
44 [chmod +x tests/autoreconf])
45 AC_CONFIG_FILES([tests/autoscan:tests/wrapper.in],
46 [chmod +x tests/autoscan])
47 AC_CONFIG_FILES([tests/autoupdate:tests/wrapper.in],
48 [chmod +x tests/autoupdate])
49 AC_CONFIG_FILES([tests/ifnames:tests/wrapper.in],
50 [chmod +x tests/ifnames])
51 AC_PATH_PROG([EXPR], [expr])
58 # We use a path for GNU m4 so even if users have another m4 first in
59 # their path, the installer can configure with a path that has GNU m4
60 # first and get that path embedded in the installed autoconf and
63 if test x"$ac_cv_prog_gnu_m4" != xyes; then
64 AC_MSG_ERROR([GNU M4 1.4 is required])
71 AC_CONFIG_FILES(man/Makefile)
72 AM_MISSING_PROG(HELP2MAN, help2man)
79 # We use a path for perl so the #! line in autoscan will work.
80 AC_PATH_PROG([PERL], perl, no)
82 if test "$PERL" = no; then
83 AC_MSG_ERROR([perl is not found])
85 $PERL -e 'require 5.005_03;' || {
86 AC_MSG_ERROR([Perl 5.005_03 or better is required])
94 AC_CONFIG_FILES([lib/emacs/Makefile])
96 test x"$TEST_EMACS" = xt && TEST_EMACS=
97 AC_CHECK_PROGS([TEST_EMACS], [emacs xemacs], [no])
99 # autoconf-mode.el and autotest-mode.el do not work with older version of
100 # Emacs (i.e. 18.x.x). During byte-compilation, Emacs complains:
101 # "Variable (broken nil) seen on pass 2 of byte compiler but not pass 1"
102 # We detect this problem here.
103 AS_IF([test "$TEST_EMACS" != no],
104 [AC_CACHE_CHECK([whether $TEST_EMACS is sufficiently recent],
105 [ac_cv_prog_emacs_ok],
106 [# Note: The quoted "EOF" is intentional. It protects the ` in the text.
107 cat >conftest.el << "EOF"
109 (defun broken-mode () (setq broken-defaults `(broken nil)))
112 [$TEST_EMACS -batch -q -f batch-byte-compile conftest.el 1>&2])],
113 [ac_cv_prog_emacs_ok=yes], [ac_cv_prog_emacs_ok=no])
114 rm -f conftest.el conftest.elc])
115 AS_IF([test $ac_cv_prog_emacs_ok = no], [TEST_EMACS=no])])
117 AC_SUBST([EMACS], [$TEST_EMACS])
126 AC_CONFIG_FILES([Makefile doc/Makefile
127 lib/Makefile lib/Autom4te/Makefile lib/autoscan/Makefile
129 lib/autoconf/Makefile lib/autotest/Makefile
133 # Report the state of this version of Autoconf if this is a beta.
134 m4_bmatch(m4_defn([AC_PACKAGE_VERSION]), [[a-z]],
137 You are about to use an experimental version of Autoconf. Be sure to
138 read the relevant mailing lists, most importantly <autoconf@gnu.org>.
140 Below you will find information on the status of this version of Autoconf.
144 sed -n '/^\* Status/,$p' $srcdir/BUGS