2001-08-27 15:03:48 +08:00
|
|
|
# M4 macros used in building Autoconf test suites. -*- Autotest -*-
|
2000-10-24 18:16:30 +08:00
|
|
|
|
2007-09-28 11:09:18 +08:00
|
|
|
# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software
|
2005-02-05 12:55:08 +08:00
|
|
|
# Foundation, Inc.
|
* AUTHORS, BUGS, ChangeLog, ChangeLog.0, ChangeLog.1,
ChangeLog.2, GNUmakefile, Makefile.maint, NEWS, README,
README-alpha, TODO, configure.ac, lib/autoconf/Makefile.am,
m4/atconfig.m4, m4/init.m4, m4/m4.m4, m4/missing.m4,
m4/sanity.m4, tests/README, tests/aclocal.m4,
tests/atspecific.m4, tests/base.at, tests/compile.at,
tests/foreign.at, tests/m4sh.at, tests/m4sugar.at,
tests/semantics.at, tests/suite.at, tests/tools.at,
tests/torture.at: Add copyright notice.
* tests/mktests.sh: Update year in copyright notice.
2001-08-12 21:05:11 +08:00
|
|
|
|
2007-07-21 07:11:49 +08:00
|
|
|
# This program is free software: you can redistribute it and/or modify
|
2000-10-24 18:16:30 +08:00
|
|
|
# it under the terms of the GNU General Public License as published by
|
2007-07-21 07:11:49 +08:00
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
2000-10-24 18:16:30 +08:00
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
2007-07-21 07:11:49 +08:00
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2000-10-24 18:16:30 +08:00
|
|
|
|
2003-08-27 23:14:03 +08:00
|
|
|
m4_version_prereq([2.57])
|
2003-06-23 19:11:41 +08:00
|
|
|
|
|
|
|
# Used in many tests.
|
|
|
|
m4_pattern_allow([^AS_EXIT$])
|
|
|
|
m4_pattern_allow([^m4_(define|shift)$])
|
|
|
|
|
|
|
|
AT_TESTED([autom4te autoconf autoheader autoupdate autoreconf ifnames])
|
2000-10-24 18:16:30 +08:00
|
|
|
|
2005-02-05 13:45:14 +08:00
|
|
|
|
|
|
|
## ---------------- ##
|
|
|
|
## Utility macros. ##
|
|
|
|
## ---------------- ##
|
|
|
|
|
|
|
|
# AT_CMP(FILE-1, FILE-2)
|
|
|
|
# ----------------------
|
2005-02-05 14:51:45 +08:00
|
|
|
# Check FILE-1 and FILE-2 for equality, like `cmp FILE-1 FILE-2'.
|
2005-02-05 13:45:14 +08:00
|
|
|
m4_define([AT_CMP],
|
|
|
|
[m4_ifval([$2],, [m4_fatal([AT_CMP takes two arguments.])])[]dnl
|
2005-02-05 14:51:45 +08:00
|
|
|
AT_CHECK([$at_diff "$1" "$2"])
|
2005-02-05 13:45:14 +08:00
|
|
|
])# AT_CMP
|
|
|
|
|
|
|
|
|
2003-12-25 23:49:59 +08:00
|
|
|
## ---------------- ##
|
|
|
|
## Testing syntax. ##
|
|
|
|
## ---------------- ##
|
|
|
|
|
2006-04-19 12:13:48 +08:00
|
|
|
# AT_CHECK_SHELL_SYNTAX(PROGRAM)
|
|
|
|
# ------------------------------
|
2004-12-12 17:50:40 +08:00
|
|
|
# If the shell handles `-n' well, use it to check the syntax of PROGRAM;
|
2006-04-19 12:13:48 +08:00
|
|
|
# otherwise, do nothing.
|
2003-12-25 23:49:59 +08:00
|
|
|
m4_define([AT_CHECK_SHELL_SYNTAX],
|
2006-04-19 12:13:48 +08:00
|
|
|
[AS_IF([test "$ac_cv_sh_n_works" = yes],
|
|
|
|
[AT_CHECK([/bin/sh -n $1])])])
|
2003-12-25 23:49:59 +08:00
|
|
|
|
|
|
|
m4_define([AT_CHECK_PERL_SYNTAX],
|
|
|
|
[AT_CHECK([autom4te_perllibdir=$abs_top_srcdir/lib $PERL -c $abs_top_builddir/bin/$1],
|
|
|
|
0, [], [ignore])])
|
|
|
|
|
2002-10-18 23:20:46 +08:00
|
|
|
## ------------------ ##
|
|
|
|
## Testing autom4te. ##
|
|
|
|
## ------------------ ##
|
|
|
|
|
|
|
|
|
2006-06-05 16:18:33 +08:00
|
|
|
# AT_CHECK_M4(COMMAND, [EXIT-STATUS = 0], STDOUT, STDERR)
|
|
|
|
# -------------------------------------------------------
|
2006-09-12 00:42:57 +08:00
|
|
|
# If stderr is specified, normalize the observed stderr.
|
|
|
|
# This (using GNU M4 1.4.6 or later)
|
2002-10-18 23:20:46 +08:00
|
|
|
#
|
2006-09-12 00:42:57 +08:00
|
|
|
# /usr/local/bin/m4:script.4s:1: cannot open `foo': No such file or directory
|
2002-10-18 23:20:46 +08:00
|
|
|
# autom4te: /usr/local/bin/m4 failed with exit status: 1
|
|
|
|
#
|
2006-09-12 00:42:57 +08:00
|
|
|
# or this (GNU M4 1.4 installed as gm4)
|
2002-10-28 15:15:05 +08:00
|
|
|
#
|
|
|
|
# script.4s:1: /usr/local/bin/gm4: Cannot open foo: No such file or directory
|
2005-12-09 17:54:11 +08:00
|
|
|
# autom4te: /usr/local/bin/gm4 failed with exit status: 1
|
2002-10-28 15:15:05 +08:00
|
|
|
#
|
2002-10-18 23:20:46 +08:00
|
|
|
# becomes
|
|
|
|
#
|
2006-09-12 00:42:57 +08:00
|
|
|
# m4:script.4s:1: cannot open `foo': No such file or directory
|
2002-10-18 23:20:46 +08:00
|
|
|
# autom4te: m4 failed with exit status: 1
|
2002-10-28 15:15:05 +08:00
|
|
|
#
|
|
|
|
# We use the following sed patterns:
|
|
|
|
#
|
2006-09-12 00:42:57 +08:00
|
|
|
# (m4): ?(file): ?(line):
|
|
|
|
# or (file): ?(line): ?(m4):
|
|
|
|
# to m4:(file):(line):
|
|
|
|
#
|
|
|
|
# and
|
|
|
|
# m4:(file):(line): Cannot open foo:
|
|
|
|
# to m4:(file):(line): cannot open `foo':
|
2002-10-28 15:15:05 +08:00
|
|
|
#
|
|
|
|
# and
|
|
|
|
# autom4te: [^ ]m4
|
2006-06-05 16:18:33 +08:00
|
|
|
# or autom4te: [^ ]m4.exe
|
2002-10-28 15:15:05 +08:00
|
|
|
# to autom4te: m4
|
2006-09-12 00:42:57 +08:00
|
|
|
#
|
|
|
|
# Moreover, DJGPP error messages include the error code in brackets;
|
|
|
|
# remove the error code during normalization.
|
|
|
|
#
|
2006-06-05 16:18:33 +08:00
|
|
|
m4_define([AT_CHECK_M4],
|
2007-09-28 20:14:11 +08:00
|
|
|
[AT_CHECK([$1], [$2], [$3],
|
|
|
|
m4_case([$4], [], [], [ignore], [ignore], [stderr]))
|
|
|
|
m4_case([$4], [], [], [ignore], [],
|
2006-09-12 00:42:57 +08:00
|
|
|
[AT_CHECK([[sed 's/^[^:]*m4: *\([^:]*:\) *\([0-9][0-9]*: \)/m4:\1\2/
|
|
|
|
s/^\([^:]*:\) *\([0-9][0-9]*:\)[^:]*m4: /m4:\1\2 /
|
|
|
|
s/^\(m4:[^:]*:[0-9][0-9]*: \)C\(annot open \)\([^`:]*\):/\1c\2`\3'\'':/
|
|
|
|
s/^autom4te: [^ ]*m4 /autom4te: m4 /
|
|
|
|
s/^autom4te: [^ ]*m4\.exe /autom4te: m4 /
|
|
|
|
s/ (E[A-Z]*)$//
|
2007-09-28 11:09:18 +08:00
|
|
|
' stderr >&2]], [0], [], [$4])])
|
2002-10-18 23:20:46 +08:00
|
|
|
])
|
|
|
|
|
2006-06-05 16:18:33 +08:00
|
|
|
# AT_CHECK_AUTOM4TE(FLAGS, [EXIT-STATUS = 0], STDOUT, STDERR)
|
|
|
|
# -----------------------------------------------------------
|
|
|
|
m4_define([AT_CHECK_AUTOM4TE],
|
|
|
|
[AT_CHECK_M4([autom4te $1], [$2], [$3], [$4])])
|
|
|
|
|
2002-10-18 23:20:46 +08:00
|
|
|
|
|
|
|
|
2001-10-08 16:21:54 +08:00
|
|
|
## ----------------- ##
|
|
|
|
## Testing M4sugar. ##
|
|
|
|
## ----------------- ##
|
|
|
|
|
|
|
|
|
2004-08-21 03:58:06 +08:00
|
|
|
# AT_DATA_M4SUGAR(FILE-NAME, CONTENTS)
|
|
|
|
# ------------------------------------
|
2001-10-08 16:21:54 +08:00
|
|
|
# Escape the invalid tokens with @&t@.
|
|
|
|
m4_define([AT_DATA_M4SUGAR],
|
|
|
|
[AT_DATA([$1],
|
2001-10-08 16:22:49 +08:00
|
|
|
[m4_bpatsubsts([$2],
|
* aclocal.m4, bin/autoconf.as, lib/autoconf/autoconf.m4,
* lib/autoconf/autoheader.m4, lib/autoconf/autoupdate.m4,
* lib/autoconf/c.m4, lib/autoconf/fortran.m4,
* lib/autoconf/general.m4, lib/autoconf/headers.m4,
* lib/autoconf/lang.m4, lib/autoconf/libs.m4,
* lib/autoconf/programs.m4, lib/autoconf/specific.m4,
* lib/autoconf/status.m4, lib/autoconf/types.m4,
* lib/autotest/general.m4, lib/m4sugar/m4sugar.m4,
* tests/atspecific.m4, tests/base.at, tests/compile.at,
* tests/foreign.at, tests/m4sh.at, tests/semantics.at,
* tests/tools.at, tests/torture.at:
Whitespace clean up.
Suggested by Jim Meyering.
2003-05-22 21:24:04 +08:00
|
|
|
[@&t@], [@&@&t@t@],
|
|
|
|
[\(m4\)_], [\1@&t@_],
|
|
|
|
[dnl], [d@&t@nl])])])
|
2001-10-08 16:21:54 +08:00
|
|
|
|
The use of `dumpstat' revealed that `len' was used although it
should not. m4_text_wrap was using it, but in the Autoconf world
where it is legal. Hence (i) test M4sh in its own world, not
Autoconf's, and (ii), ahem, fix the bug :)
* lib/autotest/general.m4: Be sure the set good quotes, as tracing
does not like `' instead of [].
(AT_INIT): Forbid `^_?AT_'.
And don't output such tokens.
* tests/Makefile.am (CLEANFILES): Add `script', `script.s4g',
`script.as', and `autom4te.cache'.
Remove `empty' and `macro' which are no longer used.
* tests/atspecific.m4 (AT_CHECK_M4SUGAR, AT_CHECK_M4SH): New.
* tests/m4sugar.at: Use it.
* lib/m4sugar/m4sugar.m4: Use `m4_len' not `len'.
2001-08-07 15:56:40 +08:00
|
|
|
|
|
|
|
# AT_CHECK_M4SUGAR(FLAGS, [EXIT-STATUS = 0], STDOUT, STDERR)
|
|
|
|
# ----------------------------------------------------------
|
|
|
|
m4_define([AT_CHECK_M4SUGAR],
|
2005-02-05 12:55:08 +08:00
|
|
|
[AT_KEYWORDS([m4sugar])
|
|
|
|
AT_CHECK_AUTOM4TE([--language=m4sugar script.4s -o script $1],
|
2003-08-27 23:14:03 +08:00
|
|
|
[$2], [$3], [$4])])
|
The use of `dumpstat' revealed that `len' was used although it
should not. m4_text_wrap was using it, but in the Autoconf world
where it is legal. Hence (i) test M4sh in its own world, not
Autoconf's, and (ii), ahem, fix the bug :)
* lib/autotest/general.m4: Be sure the set good quotes, as tracing
does not like `' instead of [].
(AT_INIT): Forbid `^_?AT_'.
And don't output such tokens.
* tests/Makefile.am (CLEANFILES): Add `script', `script.s4g',
`script.as', and `autom4te.cache'.
Remove `empty' and `macro' which are no longer used.
* tests/atspecific.m4 (AT_CHECK_M4SUGAR, AT_CHECK_M4SH): New.
* tests/m4sugar.at: Use it.
* lib/m4sugar/m4sugar.m4: Use `m4_len' not `len'.
2001-08-07 15:56:40 +08:00
|
|
|
|
|
|
|
|
2001-10-08 16:21:54 +08:00
|
|
|
|
|
|
|
## -------------- ##
|
|
|
|
## Testing M4sh. ##
|
|
|
|
## -------------- ##
|
|
|
|
|
|
|
|
|
2004-08-21 03:58:06 +08:00
|
|
|
# AT_DATA_M4SH(FILE-NAME, CONTENTS)
|
|
|
|
# ---------------------------------
|
2001-10-08 16:21:54 +08:00
|
|
|
# Escape the invalid tokens with @&t@.
|
|
|
|
m4_define([AT_DATA_M4SH],
|
|
|
|
[AT_DATA([$1],
|
2001-10-08 16:22:49 +08:00
|
|
|
[m4_bpatsubsts([$2],
|
* aclocal.m4, bin/autoconf.as, lib/autoconf/autoconf.m4,
* lib/autoconf/autoheader.m4, lib/autoconf/autoupdate.m4,
* lib/autoconf/c.m4, lib/autoconf/fortran.m4,
* lib/autoconf/general.m4, lib/autoconf/headers.m4,
* lib/autoconf/lang.m4, lib/autoconf/libs.m4,
* lib/autoconf/programs.m4, lib/autoconf/specific.m4,
* lib/autoconf/status.m4, lib/autoconf/types.m4,
* lib/autotest/general.m4, lib/m4sugar/m4sugar.m4,
* tests/atspecific.m4, tests/base.at, tests/compile.at,
* tests/foreign.at, tests/m4sh.at, tests/semantics.at,
* tests/tools.at, tests/torture.at:
Whitespace clean up.
Suggested by Jim Meyering.
2003-05-22 21:24:04 +08:00
|
|
|
[@&t@], [@&@&t@t@],
|
|
|
|
[\(m4\|AS\)_], [\1@&t@_],
|
|
|
|
[dnl], [d@&t@nl])])])
|
2001-10-08 16:21:54 +08:00
|
|
|
|
|
|
|
|
The use of `dumpstat' revealed that `len' was used although it
should not. m4_text_wrap was using it, but in the Autoconf world
where it is legal. Hence (i) test M4sh in its own world, not
Autoconf's, and (ii), ahem, fix the bug :)
* lib/autotest/general.m4: Be sure the set good quotes, as tracing
does not like `' instead of [].
(AT_INIT): Forbid `^_?AT_'.
And don't output such tokens.
* tests/Makefile.am (CLEANFILES): Add `script', `script.s4g',
`script.as', and `autom4te.cache'.
Remove `empty' and `macro' which are no longer used.
* tests/atspecific.m4 (AT_CHECK_M4SUGAR, AT_CHECK_M4SH): New.
* tests/m4sugar.at: Use it.
* lib/m4sugar/m4sugar.m4: Use `m4_len' not `len'.
2001-08-07 15:56:40 +08:00
|
|
|
# AT_CHECK_M4SH(FLAGS, [EXIT-STATUS = 0], STDOUT, STDERR)
|
|
|
|
# -------------------------------------------------------
|
|
|
|
m4_define([AT_CHECK_M4SH],
|
2003-08-27 23:14:03 +08:00
|
|
|
[AT_CHECK_AUTOM4TE([--language=m4sh script.as -o script $1],
|
|
|
|
[$2], [$3], [$4])])
|
The use of `dumpstat' revealed that `len' was used although it
should not. m4_text_wrap was using it, but in the Autoconf world
where it is legal. Hence (i) test M4sh in its own world, not
Autoconf's, and (ii), ahem, fix the bug :)
* lib/autotest/general.m4: Be sure the set good quotes, as tracing
does not like `' instead of [].
(AT_INIT): Forbid `^_?AT_'.
And don't output such tokens.
* tests/Makefile.am (CLEANFILES): Add `script', `script.s4g',
`script.as', and `autom4te.cache'.
Remove `empty' and `macro' which are no longer used.
* tests/atspecific.m4 (AT_CHECK_M4SUGAR, AT_CHECK_M4SH): New.
* tests/m4sugar.at: Use it.
* lib/m4sugar/m4sugar.m4: Use `m4_len' not `len'.
2001-08-07 15:56:40 +08:00
|
|
|
|
|
|
|
|
2001-10-08 16:21:54 +08:00
|
|
|
|
|
|
|
## ------------------ ##
|
|
|
|
## Testing Autoconf. ##
|
|
|
|
## ------------------ ##
|
2000-10-24 18:16:30 +08:00
|
|
|
|
|
|
|
|
2004-08-21 03:58:06 +08:00
|
|
|
# AT_DATA_AUTOCONF(FILE-NAME, CONTENTS)
|
|
|
|
# -------------------------------------
|
2001-11-13 22:05:25 +08:00
|
|
|
# Escape the invalid tokens with @&t@.
|
|
|
|
m4_define([AT_DATA_AUTOCONF],
|
|
|
|
[AT_DATA([$1],
|
|
|
|
[m4_bpatsubsts([$2],
|
* aclocal.m4, bin/autoconf.as, lib/autoconf/autoconf.m4,
* lib/autoconf/autoheader.m4, lib/autoconf/autoupdate.m4,
* lib/autoconf/c.m4, lib/autoconf/fortran.m4,
* lib/autoconf/general.m4, lib/autoconf/headers.m4,
* lib/autoconf/lang.m4, lib/autoconf/libs.m4,
* lib/autoconf/programs.m4, lib/autoconf/specific.m4,
* lib/autoconf/status.m4, lib/autoconf/types.m4,
* lib/autotest/general.m4, lib/m4sugar/m4sugar.m4,
* tests/atspecific.m4, tests/base.at, tests/compile.at,
* tests/foreign.at, tests/m4sh.at, tests/semantics.at,
* tests/tools.at, tests/torture.at:
Whitespace clean up.
Suggested by Jim Meyering.
2003-05-22 21:24:04 +08:00
|
|
|
[@&t@], [@&@&t@t@],
|
|
|
|
[\(m4\|AS\|AC\)_], [\1@&t@_],
|
|
|
|
[dnl], [d@&t@nl])])])
|
2001-11-13 22:05:25 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
2001-01-22 17:03:38 +08:00
|
|
|
# AT_CONFIGURE_AC(BODY)
|
|
|
|
# ---------------------
|
|
|
|
# Create a full configure.ac running BODY, with a config header set up,
|
2001-11-25 23:13:03 +08:00
|
|
|
# AC_OUTPUT, and environment checking hooks.
|
2001-01-22 17:03:38 +08:00
|
|
|
m4_define([AT_CONFIGURE_AC],
|
2001-11-13 22:43:50 +08:00
|
|
|
[AT_DATA_AUTOCONF([aclocal.m4],
|
2001-11-13 22:05:25 +08:00
|
|
|
[[
|
|
|
|
# AC_STATE_SAVE(FILE)
|
2005-02-05 13:45:14 +08:00
|
|
|
# -------------------
|
|
|
|
# Save the shell variables and directory listing. AT_CHECK_ENV uses these to
|
|
|
|
# confirm that no test modifies variables outside the Autoconf namespace or
|
|
|
|
# leaves temporary files. AT_CONFIG_CMP uses the variable dumps to confirm that
|
|
|
|
# tests have the same side effects regardless of caching.
|
2001-11-13 22:05:25 +08:00
|
|
|
m4_defun([AC_STATE_SAVE],
|
2006-04-28 12:17:51 +08:00
|
|
|
[(set) 2>&1 | sort >state-env.$][1
|
2002-10-31 21:57:37 +08:00
|
|
|
ls -1 | sed '/^at-/d;/^state-/d;/^config\./d' | sort >state-ls.$][1
|
2001-11-13 22:05:25 +08:00
|
|
|
])# AC_STATE_SAVE
|
2001-11-13 22:43:50 +08:00
|
|
|
]])
|
2001-11-13 22:05:25 +08:00
|
|
|
|
2001-11-13 22:43:50 +08:00
|
|
|
AT_DATA([configure.ac],
|
|
|
|
[[AC_INIT
|
Rework to use more-modern build style.
Many files are renamed; all uses of their names were changed.
* .x-sc_trailing_blank: Renamed from .x-sc_trailing_blank.
* .x-sc_useless_cpp_parens: New file.
* build-aux/config.guess: Renamed from config/config.guess. Update.
* build-aux/config.sub: Renamed from config/config.sub. Update.
* build-aux/elisp-comp: Renamed from config/elisp-comp.
* build-aux/install-sh: Renamed from config/install-sh. Update.
* build-aux/mdate-sh: Renamed from config/mdate-sh.
* build-aux/missing: Renamed from config/missing.
* build-aux/texinfo.tex: Renamed from config/texinfo.tex. Update.
* build-aux/vc-list-files: Renamed from config/vc-list-files.
* config/Makefile.am: Removed.
* config/mkinstalldirs: Removed.
* config/move-if-change: Removed.
* m4/m4.m4: Renamed from config/m4.m4. Add (C) to copyright notice.
* Makefile.am (SUBDIRS): Remove config.
(ACLOCAL_AMFLAGS): Include from m4, not config.
(EXTRA_DIST): Add config/announce-gen, config/prev-version.txt.
(WGET, WGETFLAGS): New macros, since Makefile.maint no longer does this.
(autom4te-update): Rewrite with a loop. Get from gnulib, not automake.
Fail if there's an error.
* Makefile.cfg (move_if_change): Remove.
(wget_files): Remove.
(cvs_executable_files): New macro.
(cvs_files): Use it. Remove mkinstalldirs. Add fdl.texi.
(executable-update): Use $(cvs_executable_files).
(local-checks-to-skip): Remove.
* Makefile.maint: Merge from coreutils, plus add our own changes
(gzip_rsyncable): New macro.
(GZIP_ENV): Use it.
(CVS_LIST): Use build-aux/vc-list-files.
(VERSION_REGEXP): New macro.
(local-checks-available): Add patch-check, $(syntax-check-rules),
check-AUTHORS.
(syntax-check-rules): Compute dynamically.
(sc_cast_of_x_alloc_return_value): Work even if no source files.
(sc_cast_of_alloca_return_value): Likewise.
(sc_prohibit_atoi_atof): Simplify regexp.
(sc_no_if_have_config_h, sc_require_config_h):
(sc_prohibit_assert_without_use,
(sc_obsolete_symbols): Check for O_NDELAY.
(sc_texi_notab): Remove.
(sc-changelog): Don't make an exception for '----' lines.
(.re-list): Remove, so we don't have a junk file behind.
(sc_system_h_headers): Remove the need for .re-list.
(sc_the_the): New rule.
(sc_tight_scope): Simplify.
(sc_trailing_space): Renamed from sc_trailing_blank.
(longopt_re): New macro.
(sc_two_space_separator_in_usage): New rule.
(sc_unmarked_diagnostics): Look at all files under CVS.
(sc_useless_cpp_parens, patch-check, check-AUTHORS): New rules.
(news-date-check, changelog-check): Version is OK.
(po-check): Look for lib files even if not in CVS.
(copyright-check): Use $() not ``.
(maintainer-distcheck): Do not depend on changelog-check.
(my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
Also check for -Wpointer-arith.
(WGET, WGETFLAGS, tgz-md5, tgz-sha1, bz2-md5, bz2-sha1):
(xdelta-md5, xdelta-sha1, tgz-size, bz2-size, xd-size, rel-check):
Remove.
(announcement): Add --gpg-key-id arg.
(cvs-sv): Remove.
(move_if_change): Just use mv.
(local_updates: Remove wget-update, po-update.
(po_repo, do-po-update, po-update, wget_files, get-targets): Remove.
(config.guess-url_prefix, config.sub-url_prefix): Remove.
(ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
(standards.texi-url_prefix, make-stds.texi-url_prefix, target, url):
($(get-targets)): Remove.
(cvs_files): Remove missing, mkinstalldirs, ansi2knr.c.
(gnulib_repo): Renamed from automake_repo. Get from gnulib now.
(cvs-update): Get from gnulib.
(emut_upload_commands): gnupload is in build-aux now.
(alpha beta major): Add changelog-check. Check version.
* configure.ac (AC_CONFIG_AUX_DIR): Renamed from config to build-aux.
(AC_CONFIG_FILES): Remove.
* bin/autoconf.as: Add spaces to avoid distcheck warning.
* config/announce-gen: Sync from coreutils.
* doc/make-stds.texi: Sync from gnulib.
* doc/standards.texi: Likewise.
* man/Makefile.am: Adjust for config -> build-aux renaming.
* tests/Makefile.am: Prefer $(FOO) to @FOO@.
* tests/local.at: Adjust from config -> build-aux renaming.
* tests/tools.at: Likewise.
* tests/torture.at: Likewise.
2006-08-25 06:56:47 +08:00
|
|
|
AC_CONFIG_AUX_DIR($top_srcdir/build-aux)
|
2001-01-22 17:03:38 +08:00
|
|
|
AC_CONFIG_HEADER(config.h:config.hin)
|
2001-02-16 07:36:48 +08:00
|
|
|
AC_STATE_SAVE(before)]
|
2001-01-22 17:03:38 +08:00
|
|
|
$1
|
2001-02-16 07:36:48 +08:00
|
|
|
[AC_OUTPUT
|
2001-01-24 21:19:10 +08:00
|
|
|
AC_STATE_SAVE(after)
|
2001-11-13 22:43:50 +08:00
|
|
|
]])
|
|
|
|
])# AT_CONFIGURE_AC
|
2001-01-22 17:03:38 +08:00
|
|
|
|
|
|
|
|
2001-08-31 21:32:35 +08:00
|
|
|
# AT_CHECK_AUTOCONF(ARGS, [EXIT-STATUS = 0], STDOUT, STDERR)
|
|
|
|
# ----------------------------------------------------------
|
2005-09-28 00:08:10 +08:00
|
|
|
# We always use "--force", to prevent problems with timestamps if the testsuite
|
|
|
|
# were running too fast.
|
2000-11-29 18:11:38 +08:00
|
|
|
m4_define([AT_CHECK_AUTOCONF],
|
2006-06-05 16:18:33 +08:00
|
|
|
[AT_CHECK_M4([autoconf --force $1], [$2], [$3], [$4])
|
2003-12-25 23:49:59 +08:00
|
|
|
if test -s configure; then
|
|
|
|
AT_CHECK_SHELL_SYNTAX(configure)
|
|
|
|
fi
|
|
|
|
])
|
2000-11-23 17:52:35 +08:00
|
|
|
|
|
|
|
|
2002-10-16 14:38:50 +08:00
|
|
|
# AT_CHECK_AUTOHEADER(ARGS, [EXIT-STATUS = 0], STDOUT, STDERR)
|
|
|
|
# ------------------------------------------------------------
|
2000-11-29 18:11:38 +08:00
|
|
|
m4_define([AT_CHECK_AUTOHEADER],
|
2002-10-16 14:38:50 +08:00
|
|
|
[AT_CHECK([autoheader $1], [$2], [$3], [$4])
|
|
|
|
])
|
2000-11-23 17:52:35 +08:00
|
|
|
|
|
|
|
|
2000-12-19 16:15:48 +08:00
|
|
|
# AT_CHECK_CONFIGURE(END-COMMAND,
|
|
|
|
# [EXIT-STATUS = 0],
|
2003-02-28 18:11:07 +08:00
|
|
|
# [STDOUT = IGNORE], STDERR)
|
2000-12-19 16:15:48 +08:00
|
|
|
# --------------------------------------------
|
* lib/autoconf/status.m4 (_AC_SRCPATHS): Rename buildpath to
abs_builddir, top_buildpath to abs_top_builddir, srcpath to
abs_srcdir, top_srcpath to abs_top_srcdir.
(_AC_OUTPUT_FILES): Adjust.
* NEWS, doc/autoconf.texi, lib/autoconf/autotest.m4,
* tests/atspecific.m4, tests/autoreconf.in, tests/tools.at,
* tests/wrappl.in, tests/wrapsh.in: Adjust.
2001-12-15 01:57:27 +08:00
|
|
|
# `abs_top_srcdir' is needed so that `./configure' finds install-sh.
|
2000-12-07 23:21:54 +08:00
|
|
|
# Using --srcdir is more expensive.
|
2000-11-29 18:11:38 +08:00
|
|
|
m4_define([AT_CHECK_CONFIGURE],
|
2005-01-01 16:12:12 +08:00
|
|
|
[AT_CAPTURE_FILE([config.log])[]dnl
|
|
|
|
AT_CHECK([top_srcdir=$abs_top_srcdir ./configure $1],
|
* aclocal.m4, bin/autoconf.as, lib/autoconf/autoconf.m4,
* lib/autoconf/autoheader.m4, lib/autoconf/autoupdate.m4,
* lib/autoconf/c.m4, lib/autoconf/fortran.m4,
* lib/autoconf/general.m4, lib/autoconf/headers.m4,
* lib/autoconf/lang.m4, lib/autoconf/libs.m4,
* lib/autoconf/programs.m4, lib/autoconf/specific.m4,
* lib/autoconf/status.m4, lib/autoconf/types.m4,
* lib/autotest/general.m4, lib/m4sugar/m4sugar.m4,
* tests/atspecific.m4, tests/base.at, tests/compile.at,
* tests/foreign.at, tests/m4sh.at, tests/semantics.at,
* tests/tools.at, tests/torture.at:
Whitespace clean up.
Suggested by Jim Meyering.
2003-05-22 21:24:04 +08:00
|
|
|
[$2],
|
2005-01-01 16:12:12 +08:00
|
|
|
m4_default([$3], [ignore]), [$4])])
|
2000-11-23 17:52:35 +08:00
|
|
|
|
|
|
|
|
2001-01-22 17:03:38 +08:00
|
|
|
# AT_CHECK_ENV
|
|
|
|
# ------------
|
|
|
|
# Check that the full configure run remained in its variable name space,
|
|
|
|
# and cleaned up tmp files.
|
2005-02-05 13:45:14 +08:00
|
|
|
#
|
|
|
|
# Perhaps grep -E is not supported, or perhaps it chokes on such a big regex.
|
|
|
|
# In this case just don't pay attention to the env. It would be great
|
|
|
|
# to keep the error message but we can't: that would break AT_CHECK.
|
|
|
|
#
|
2002-10-31 21:57:37 +08:00
|
|
|
# Some tests might exit prematurely when they find a problem, in
|
2001-01-22 17:03:38 +08:00
|
|
|
# which case `env-after' is probably missing. Don't check it then.
|
2005-02-05 13:45:14 +08:00
|
|
|
#
|
|
|
|
# Here are the variables `configure' may modify during execution:
|
|
|
|
# - ^as_
|
|
|
|
# M4sh's shell name space.
|
|
|
|
# - ^ac_
|
|
|
|
# Autoconf's shell name space.
|
|
|
|
# - prefix and exec_prefix
|
|
|
|
# are kept undefined (NONE) until AC_OUTPUT which then sets them to
|
|
|
|
# `/usr/local' and `${prefix}' for make.
|
|
|
|
# - (host|build|target)(_(alias|cpu|vendor|os))?
|
|
|
|
# Set by AC_CANONICAL_(HOST|BUILD|TARGET).
|
|
|
|
# - cross_compiling
|
|
|
|
# Set by AC_INIT.
|
|
|
|
# - interpval
|
|
|
|
# Set by AC_SYS_INTERPRETER.
|
|
|
|
# - CONFIG_STATUS and DEFS
|
|
|
|
# Set by AC_OUTPUT.
|
|
|
|
# - AC_SUBST'ed variables
|
|
|
|
# (FIXME: Generate a list of these automatically.)
|
|
|
|
# - _|@|.[*#?$].|LINENO|OLDPWD|PIPESTATUS|RANDOM|SECONDS
|
|
|
|
# Some variables some shells use and change.
|
|
|
|
# `.[*#?$].' catches `$#' etc. which are displayed like this:
|
|
|
|
# | '!'=18186
|
|
|
|
# | '#'=0
|
|
|
|
# | '$'=6908
|
|
|
|
#
|
2001-01-22 17:03:38 +08:00
|
|
|
m4_define([AT_CHECK_ENV],
|
2005-02-05 13:45:14 +08:00
|
|
|
[# Compare directory listings.
|
|
|
|
test -f state-ls.before ||
|
2002-10-31 21:57:37 +08:00
|
|
|
AS_ERROR([state-ls.before not present])
|
2005-02-05 13:45:14 +08:00
|
|
|
test -f state-ls.after && { AT_CMP([state-ls.before], [state-ls.after]) }
|
|
|
|
# Compare variable space dumps.
|
2002-10-31 21:57:37 +08:00
|
|
|
if test -f state-env.before && test -f state-env.after; then
|
2005-02-05 13:45:14 +08:00
|
|
|
for act_file in state-env.before state-env.after
|
|
|
|
do
|
2005-06-24 08:47:18 +08:00
|
|
|
$EGREP -v '^(m4_join([|],
|
|
|
|
[a[cs]_.*],
|
|
|
|
[(exec_)?prefix|DEFS|CONFIG_STATUS],
|
|
|
|
[CC|CFLAGS|CPP|GCC|CXX|CXXFLAGS|CXXCPP|GXX|F77|FFLAGS|FLIBS|G77],
|
2006-03-21 04:29:45 +08:00
|
|
|
[ERL|ERLC|ERLCFLAGS|ERLANG_PATH_ERL|ERLANG_ROOT_DIR|ERLANG_LIB_DIR],
|
|
|
|
[ERLANG_INSTALL_LIB_DIR|OBJC|OBJCPP|OBJCFLAGS],
|
2007-05-22 06:31:18 +08:00
|
|
|
[OPENMP_CFLAGS],
|
2005-06-24 08:47:18 +08:00
|
|
|
[LIBS|LIB@&t@OBJS|LTLIBOBJS|LDFLAGS],
|
|
|
|
[INSTALL(_(DATA|PROGRAM|SCRIPT))?],
|
|
|
|
[CYGWIN|ISC|MINGW32|MINIX|EMXOS2|XENIX|EXEEXT|OBJEXT],
|
|
|
|
[X_(CFLAGS|(EXTRA_|PRE_)?LIBS)|x_(includes|libraries)|(have|no)_x],
|
|
|
|
[(host|build|target)(_(alias|cpu|vendor|os))?],
|
|
|
|
[cross_compiling],
|
|
|
|
[interpval|PATH_SEPARATOR],
|
|
|
|
[F77_DUMMY_MAIN|f77_(case|underscore)],
|
|
|
|
[FC(_DUMMY_MAIN|FLAGS|LIBS|FLAGS_f)?],
|
|
|
|
[ALLOCA|GETLOADAVG_LIBS|KMEM_GROUP|NEED_SETGID|POW_LIB],
|
2006-05-13 17:54:51 +08:00
|
|
|
[AWK|LEX|LEXLIB|LEX_OUTPUT_ROOT|LN_S|M4|MKDIR_P|RANLIB|SET_MAKE|YACC],
|
2005-06-24 08:47:18 +08:00
|
|
|
[GREP|[EF]GREP|SED],
|
|
|
|
[[_@]|.[*#?$].|LINENO|OLDPWD|PIPESTATUS|RANDOM|SECONDS]))=' \
|
2005-02-05 13:45:14 +08:00
|
|
|
$act_file 2>/dev/null |
|
|
|
|
# There may be variables spread on several lines; remove latter lines.
|
|
|
|
$GREP '^m4_defn([m4_re_word])=' >clean-$act_file
|
|
|
|
done
|
|
|
|
AT_CMP([clean-state-env.before], [clean-state-env.after])
|
2001-01-22 17:03:38 +08:00
|
|
|
fi
|
|
|
|
])
|
|
|
|
|
|
|
|
|
2005-02-05 13:45:14 +08:00
|
|
|
# AT_CONFIG_CMP(VAR-FILE-A, VAR-FILE-B)
|
|
|
|
# -------------------------------------
|
|
|
|
# Check the outcomes of two configure runs for equality by comparing dumps of
|
|
|
|
# their shell variables. VAR-FILE-A and VAR-FILE-B are two `set'-style shell
|
|
|
|
# variable space dumps.
|
|
|
|
#
|
|
|
|
# We permit variance between runs in the following shell variables:
|
|
|
|
# - ^as_
|
|
|
|
# M4sh's shell name space.
|
|
|
|
# - ^ac_, excluding ^ac_cv_
|
|
|
|
# Autoconf's private shell name space.
|
|
|
|
# - PPID [bash, zsh]
|
|
|
|
# - RANDOM [zsh]
|
|
|
|
# - SECONDS [zsh]
|
|
|
|
# - '$' [zsh]
|
|
|
|
#
|
2005-06-22 20:13:59 +08:00
|
|
|
# Furthermore, it is okay for a non-cache variable initialized to empty in one
|
|
|
|
# run to be unset in another run. This happens when, for example, cache update
|
|
|
|
# code tries a number of values in LIBS and eventually restores LIBS to its
|
|
|
|
# original value. If LIBS was previously unset, it will have become set and
|
|
|
|
# empty. (OTOH, cache variables indicate the result of the test even if they
|
|
|
|
# are empty, so we have to be strict about them.)
|
|
|
|
#
|
|
|
|
# Lines that do not look like `foo=bar' are probably latter lines of
|
|
|
|
# multiline values; trim them.
|
|
|
|
#
|
2005-02-05 13:45:14 +08:00
|
|
|
m4_define([AT_CONFIG_CMP],
|
|
|
|
[for act_file in $1 $2
|
|
|
|
do
|
2005-06-22 20:13:59 +08:00
|
|
|
$SED '/^ac_cv_/ b
|
|
|
|
/^m4_defn([m4_re_word])=./ !d
|
2005-07-08 07:56:25 +08:00
|
|
|
/^[[^=]]*='\'''\''$/ d
|
2005-06-22 20:13:59 +08:00
|
|
|
/^a[[cs]]_/ d
|
|
|
|
/^PPID=/ d
|
|
|
|
/^RANDOM=/ d
|
|
|
|
/^SECONDS=/ d
|
|
|
|
/'\'\\\$\''=/ d
|
|
|
|
' $act_file >at_config_vars-$act_file
|
2005-02-05 13:45:14 +08:00
|
|
|
done
|
|
|
|
AT_CMP([at_config_vars-$1], [at_config_vars-$2])[]dnl
|
|
|
|
])# AT_CONFIG_CMP
|
|
|
|
|
|
|
|
|
2001-01-22 17:03:38 +08:00
|
|
|
# AT_CHECK_DEFINES(CONTENT)
|
|
|
|
# -------------------------
|
2002-01-07 04:48:10 +08:00
|
|
|
# Verify that config.h, once stripped, is CONTENT.
|
2001-01-22 17:03:38 +08:00
|
|
|
# Stripping consists of keeping CPP lines (i.e. containing a hash),
|
2002-01-07 04:48:10 +08:00
|
|
|
# but those of automatically checked features (STDC_HEADERS etc.)
|
|
|
|
# and symbols (PACKAGE_...).
|
2001-01-22 17:03:38 +08:00
|
|
|
# AT_CHECK_HEADER is a better name, but too close from AC_CHECK_HEADER.
|
|
|
|
m4_define([AT_CHECK_DEFINES],
|
2002-05-30 06:29:26 +08:00
|
|
|
[AT_CHECK([[sed '/#/!d
|
|
|
|
/INTTYPES/d
|
|
|
|
/MEMORY/d
|
|
|
|
/PACKAGE_/d
|
|
|
|
/STDC_HEADERS/d
|
|
|
|
/STDINT/d
|
|
|
|
/STDLIB/d
|
|
|
|
/STRING/d
|
|
|
|
/SYS_STAT/d
|
|
|
|
/SYS_TYPES/d
|
|
|
|
/UNISTD/d' config.h]],,
|
* aclocal.m4, bin/autoconf.as, lib/autoconf/autoconf.m4,
* lib/autoconf/autoheader.m4, lib/autoconf/autoupdate.m4,
* lib/autoconf/c.m4, lib/autoconf/fortran.m4,
* lib/autoconf/general.m4, lib/autoconf/headers.m4,
* lib/autoconf/lang.m4, lib/autoconf/libs.m4,
* lib/autoconf/programs.m4, lib/autoconf/specific.m4,
* lib/autoconf/status.m4, lib/autoconf/types.m4,
* lib/autotest/general.m4, lib/m4sugar/m4sugar.m4,
* tests/atspecific.m4, tests/base.at, tests/compile.at,
* tests/foreign.at, tests/m4sh.at, tests/semantics.at,
* tests/tools.at, tests/torture.at:
Whitespace clean up.
Suggested by Jim Meyering.
2003-05-22 21:24:04 +08:00
|
|
|
[$1])])
|
2001-01-22 17:03:38 +08:00
|
|
|
|
|
|
|
|
|
|
|
# AT_CHECK_AUTOUPDATE
|
|
|
|
# -------------------
|
|
|
|
m4_define([AT_CHECK_AUTOUPDATE],
|
2002-10-16 14:38:50 +08:00
|
|
|
[AT_CHECK([autoupdate $1], [$2], [$3], [$4])
|
|
|
|
])
|
2001-01-22 17:03:38 +08:00
|
|
|
|
|
|
|
|
2000-10-24 18:16:30 +08:00
|
|
|
# _AT_CHECK_AC_MACRO(AC-BODY, PRE-TESTS)
|
|
|
|
# --------------------------------------
|
2000-12-23 18:11:57 +08:00
|
|
|
# Create a minimalist configure.ac running the macro named
|
2000-10-24 18:16:30 +08:00
|
|
|
# NAME-OF-THE-MACRO, check that autoconf runs on that script,
|
|
|
|
# and that the shell runs correctly the configure.
|
2000-11-29 18:11:38 +08:00
|
|
|
m4_define([_AT_CHECK_AC_MACRO],
|
2001-01-22 17:03:38 +08:00
|
|
|
[AT_CONFIGURE_AC([$1])
|
2000-10-24 18:16:30 +08:00
|
|
|
$2
|
2000-11-23 17:52:35 +08:00
|
|
|
AT_CHECK_AUTOCONF
|
|
|
|
AT_CHECK_AUTOHEADER
|
|
|
|
AT_CHECK_CONFIGURE
|
2001-01-22 17:03:38 +08:00
|
|
|
AT_CHECK_ENV
|
2000-10-24 18:16:30 +08:00
|
|
|
])# _AT_CHECK_AC_MACRO
|
|
|
|
|
|
|
|
|
* configure.ac: Also find tested executables in bin.
* bin/autoconf.in, bin/autoheader.in, bin/autoreconf.in,
* bin/autoscan.in, autoupdate.in: Use exclusively the name of the
installed peer executables, only PATH is allowed to resolve it.
Pass `autoconf_dir' via options, not via invisible envvars.
* lib/Autom4te/General.pm (&find_peer): Remove.
* lib/autotest/general.m4 (AT_INIT): `AUTOTEST_PATH=a:b' gives
`abuild:asrc:bbuild:bsrc', not `abuild:bbuild:asrc:bsrc'.
* man/Makefile.am: Let help2man rely on PATH instead of trying to
find the executables for it.
* tests/Makefile.am: Major cleanup. Too lazy to document...
* tests/atlocal.in: Remove all the obscure envvar manipulations.
We only need PERL.
* tests/atspecific.m4, tests/tools.at: Passing --localdir is
indeed related to running the test suite, while passing
--autoconf-dir and others is related to running non installed
Autoconf executables. So don't do that, leave it to...
* tests/autoconf, tests/autoheader, tests/autom4te, tests/autoupdate,
* tests/autoscan: New.
* tests/atspecific.m4 (AT_CHECK_M4SUGAR, AT_CHECK_M4SH): Don't
refer to library files: rely on --language.
2001-08-31 21:30:11 +08:00
|
|
|
# AT_CHECK_MACRO(MACRO, [MACRO-USE], [ADDITIONAL-CMDS],
|
|
|
|
# [AUTOCONF-FLAGS = -W obsolete])
|
|
|
|
# -----------------------------------------------------
|
2000-12-23 18:11:57 +08:00
|
|
|
# Create a minimalist configure.ac running the macro named
|
2000-10-24 18:16:30 +08:00
|
|
|
# NAME-OF-THE-MACRO, check that autoconf runs on that script,
|
|
|
|
# and that the shell runs correctly the configure.
|
2001-01-22 17:03:38 +08:00
|
|
|
#
|
2005-02-05 13:45:14 +08:00
|
|
|
# We run `configure' twice, both times with a cache, and compare
|
|
|
|
# the environment after each run to detect inconsistencies.
|
|
|
|
#
|
2001-01-22 17:03:38 +08:00
|
|
|
# New macros are not expected to depend upon obsolete macros.
|
2000-11-29 18:11:38 +08:00
|
|
|
m4_define([AT_CHECK_MACRO],
|
2000-10-24 18:16:30 +08:00
|
|
|
[AT_SETUP([$1])
|
2001-09-10 15:18:17 +08:00
|
|
|
|
2001-01-22 17:03:38 +08:00
|
|
|
AT_CONFIGURE_AC([m4_default([$2], [$1])])
|
2000-10-24 18:16:30 +08:00
|
|
|
|
2001-06-26 02:27:51 +08:00
|
|
|
AT_CHECK_AUTOCONF([m4_default([$4], [-W obsolete])])
|
2001-01-22 17:03:38 +08:00
|
|
|
AT_CHECK_AUTOHEADER
|
2005-02-05 13:45:14 +08:00
|
|
|
|
|
|
|
for at_run in r1 r2
|
|
|
|
do
|
|
|
|
AT_CHECK_CONFIGURE([-C])
|
|
|
|
cp -f state-env.after state-env.$at_run
|
|
|
|
cp -f config.h config-h.$at_run
|
|
|
|
AT_CHECK_ENV
|
|
|
|
done
|
|
|
|
|
|
|
|
AT_CMP([config-h.r1], [config-h.r2])
|
|
|
|
AT_CONFIG_CMP([state-env.r1], [state-env.r2])
|
|
|
|
|
2000-10-24 18:16:30 +08:00
|
|
|
$3
|
2005-02-05 13:45:14 +08:00
|
|
|
|
2007-05-16 17:42:25 +08:00
|
|
|
AT_CLEANUP[]dnl
|
2000-10-24 18:16:30 +08:00
|
|
|
])# AT_CHECK_MACRO
|
|
|
|
|
|
|
|
|
2006-03-18 02:03:01 +08:00
|
|
|
# AT_CHECK_MACRO_CROSS(MACRO, [MACRO-USE], [ADDITIONAL-CMDS],
|
|
|
|
# [AUTOCONF-FLAGS = -W obsolete])
|
|
|
|
# -----------------------------------------------------------
|
|
|
|
# Like the previous one, but creates two checks: for native
|
|
|
|
# compile and for cross-compile.
|
|
|
|
m4_define([AT_CHECK_MACRO_CROSS],
|
|
|
|
[AT_CHECK_MACRO($@)
|
|
|
|
AT_CHECK_MACRO([$1 (cross compile)],
|
|
|
|
[AT_KEYWORDS([cross])
|
2006-03-18 04:37:26 +08:00
|
|
|
# Exercise the code used when cross-compiling.
|
2006-03-18 02:03:01 +08:00
|
|
|
cross_compiling=yes
|
2006-03-18 04:37:26 +08:00
|
|
|
ac_tool_warned=yes
|
2006-03-18 02:03:01 +08:00
|
|
|
m4_default([$2], [$1])],
|
|
|
|
[$3], [$4])
|
|
|
|
])
|
|
|
|
|
|
|
|
|
2001-01-22 17:03:38 +08:00
|
|
|
# AT_CHECK_AU_MACRO(MACRO)
|
|
|
|
# ------------------------
|
2000-12-23 18:11:57 +08:00
|
|
|
# Create a minimalist configure.ac running the macro named
|
2000-10-24 18:16:30 +08:00
|
|
|
# NAME-OF-THE-MACRO, autoupdate this script, check that autoconf runs
|
|
|
|
# on that script, and that the shell runs correctly the configure.
|
2001-01-22 17:03:38 +08:00
|
|
|
#
|
|
|
|
# Updated configure.ac shall not depend upon obsolete macros, which votes
|
|
|
|
# in favor of `-W obsolete', but since many of these macros leave a message
|
2002-04-20 14:09:01 +08:00
|
|
|
# to be removed by the user once her code is adjusted, let's not check.
|
2001-01-22 17:03:38 +08:00
|
|
|
#
|
|
|
|
# Remove config.hin to avoid `autoheader: config.hin is unchanged'.
|
|
|
|
m4_define([AT_CHECK_AU_MACRO],
|
|
|
|
[AT_SETUP([$1])
|
2001-09-13 14:53:19 +08:00
|
|
|
AT_KEYWORDS([autoupdate])
|
2001-09-10 15:18:17 +08:00
|
|
|
|
2001-01-22 17:03:38 +08:00
|
|
|
AT_CONFIGURE_AC([$1])
|
2000-10-24 18:16:30 +08:00
|
|
|
|
2001-01-22 17:03:38 +08:00
|
|
|
AT_CHECK_AUTOCONF
|
|
|
|
AT_CHECK_AUTOHEADER
|
|
|
|
AT_CHECK_CONFIGURE
|
|
|
|
AT_CHECK_ENV
|
2000-10-24 18:16:30 +08:00
|
|
|
|
2001-01-22 17:03:38 +08:00
|
|
|
rm config.hin
|
* bin/autoupdate.in: Trace AU_DEFINE instead of AU_DEFUN.
* doc/autoconf.texi: Don't say that the third parameter
is broken.
* lib/autoconf/autoupdate.m4 (AU_DEFINE): New dummy macro.
(AU_DEFUN): Honor the third parameter, create autoupdate
macros with AU_DEFINE.
* lib/autoconf/headers.m4 (AC_USG, AC_MEMORY_H,
AC_DIR_HEADER): Use AU_DEFUN's third parameter.
* lib/autoconf/lang.m4 (AC_LANG_SAVE): Likewise.
* lib/autoconf/programs.m4 (AC_RSH): Likewise.
* lib/autoconf/specific.m4 (AC_HAVE_POUNDBANG,
AC_ARG_ARRAY, AC_CYGWIN, AC_EMXOS2, AC_MINGW32,
AC_XENIX_DIR): Likewise.
* lib/autoconf/types.m4 (AC_INT_16_BITS, AC_LONG_64_BITS,
AC_STRUCT_ST_BLKSIZE, AC_STRUCT_ST_RDEV): Likewise.
* lib/autoconf/status.m4: Remove FIXME.
* tests/local.at (AT_CHECK_AU_MACRO): Ignore stderr, check
that the macro is not present anymore in the updated
configure.ac.
* tests/tools.at (autoupdate AC_LINK_FILES): Ignore stderr
of autoupdate.
2004-01-30 22:21:35 +08:00
|
|
|
AT_CHECK_AUTOUPDATE([], 0, [], ignore)
|
|
|
|
AT_CHECK([grep '^$1$' configure.ac], 1)
|
2000-10-24 18:16:30 +08:00
|
|
|
|
2001-01-22 17:03:38 +08:00
|
|
|
AT_CHECK_AUTOCONF
|
|
|
|
AT_CHECK_AUTOHEADER
|
|
|
|
AT_CHECK_CONFIGURE
|
|
|
|
AT_CHECK_ENV
|
2000-10-24 18:16:30 +08:00
|
|
|
|
2007-05-16 17:42:25 +08:00
|
|
|
AT_CLEANUP[]dnl
|
2003-08-27 23:14:03 +08:00
|
|
|
])# AT_CHECK_AU_MACRO
|
2003-06-23 19:11:41 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## ----------------------- ##
|
|
|
|
## Launch the test suite. ##
|
|
|
|
## ----------------------- ##
|
|
|
|
|
|
|
|
AT_INIT
|
2005-02-05 15:58:43 +08:00
|
|
|
AT_COPYRIGHT(
|
2006-01-06 08:11:16 +08:00
|
|
|
[Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
|
2005-02-05 15:58:43 +08:00
|
|
|
Foundation, Inc.
|
|
|
|
This is free software; see the source for copying conditions. There is NO
|
|
|
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.])
|