2000-05-24 22:39:24 +08:00
|
|
|
# actest.m4 -*- autoconf -*-
|
|
|
|
# Additional Autoconf macros to ease testing.
|
Test that the macros respect the user variable name space.
* acgeneral.m4 (AC_CANONICAL_THING): define, not AC_DEFUN.
Don't AC_PROVIDE, there is no need.
When calling `config.sub`, also || exit 1, to catch failures from
config.sub.
* acspecific.m4 (AC_SYS_LONG_FILE_NAMES): Use ac_val, not val.
(AC_EXEEXT): Use ac_file, not file.
* tests/actest.m4: New file, holding extra Autoconf macros used
during the testing.
(AC_ENV_SAVE): New macro, save the sh variables in a file.
* tests/suite.m4 (AT_TEST_MACRO, Generation of configure.in):
include actest.m4, and call twice AC_ENV_SAVE to compare the
variables before and after the macro.
* tests/Makefile.am (macro.m4): Don't test macros that are
required: they will be tested somewhere else.
2000-02-07 21:25:35 +08:00
|
|
|
|
* 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
|
|
|
# Copyright 2000, 2001 Free Software Foundation, Inc.
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
# any later version.
|
|
|
|
#
|
|
|
|
# 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
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
|
|
# 02111-1307, USA.
|
|
|
|
|
2000-10-25 19:47:20 +08:00
|
|
|
# AC_STATE_SAVE(FILE)
|
Test that the macros respect the user variable name space.
* acgeneral.m4 (AC_CANONICAL_THING): define, not AC_DEFUN.
Don't AC_PROVIDE, there is no need.
When calling `config.sub`, also || exit 1, to catch failures from
config.sub.
* acspecific.m4 (AC_SYS_LONG_FILE_NAMES): Use ac_val, not val.
(AC_EXEEXT): Use ac_file, not file.
* tests/actest.m4: New file, holding extra Autoconf macros used
during the testing.
(AC_ENV_SAVE): New macro, save the sh variables in a file.
* tests/suite.m4 (AT_TEST_MACRO, Generation of configure.in):
include actest.m4, and call twice AC_ENV_SAVE to compare the
variables before and after the macro.
* tests/Makefile.am (macro.m4): Don't test macros that are
required: they will be tested somewhere else.
2000-02-07 21:25:35 +08:00
|
|
|
# ------------------
|
2001-03-13 20:43:14 +08:00
|
|
|
# Save the environment, except for those variables we are allowed to touch.
|
Test that the macros respect the user variable name space.
* acgeneral.m4 (AC_CANONICAL_THING): define, not AC_DEFUN.
Don't AC_PROVIDE, there is no need.
When calling `config.sub`, also || exit 1, to catch failures from
config.sub.
* acspecific.m4 (AC_SYS_LONG_FILE_NAMES): Use ac_val, not val.
(AC_EXEEXT): Use ac_file, not file.
* tests/actest.m4: New file, holding extra Autoconf macros used
during the testing.
(AC_ENV_SAVE): New macro, save the sh variables in a file.
* tests/suite.m4 (AT_TEST_MACRO, Generation of configure.in):
include actest.m4, and call twice AC_ENV_SAVE to compare the
variables before and after the macro.
* tests/Makefile.am (macro.m4): Don't test macros that are
required: they will be tested somewhere else.
2000-02-07 21:25:35 +08:00
|
|
|
# This is to check no test touches the user name space.
|
|
|
|
# FIXME: There are surely better ways. Explore for instance if
|
|
|
|
# we can ask help from AC_SUBST. We have the right to touch what
|
2001-03-13 20:43:14 +08:00
|
|
|
# is AC_SUBST'ed.
|
2000-03-01 19:28:02 +08:00
|
|
|
# - ^ac_
|
|
|
|
# Autoconf's shell name space.
|
2001-01-24 21:19:10 +08:00
|
|
|
# - prefix and exec_prefix
|
2001-03-13 20:43:14 +08:00
|
|
|
# are kept undefined (NONE) until AC_OUTPUT which then sets them to
|
2001-01-24 21:19:10 +08:00
|
|
|
# `/usr/local' and `${prefix}' for make.
|
|
|
|
# - CONFIG_STATUS and DEFS
|
|
|
|
# Set by AC_OUTPUT.
|
2001-07-18 00:30:20 +08:00
|
|
|
# - F77_DUMMY_MAIN
|
|
|
|
# Set by AC_F77_DUMMY_MAIN.
|
2000-03-01 19:28:02 +08:00
|
|
|
# - ALLOCA|NEED_SETGID|KMEM_GROUP
|
|
|
|
# AC_FUNCs from acspecific.
|
|
|
|
# - AWK|LEX|LEXLIB|LEX_OUTPUT_ROOT|LN_S|M4|RANLIB|SET_MAKE|YACC
|
|
|
|
# AC_PROGs from acspecific
|
2000-10-16 20:27:30 +08:00
|
|
|
# - _|@|.[*#?].|LINENO|OLDPWD|PIPESTATUS|RANDOM|SECONDS
|
2000-12-06 23:14:16 +08:00
|
|
|
# Some variables some shells use and change.
|
|
|
|
# `.[*#?].' catches `$#' etc. which are displayed like this:
|
|
|
|
# | '!'=18186
|
|
|
|
# | '#'=0
|
|
|
|
# | '$'=6908
|
2000-09-19 23:36:39 +08:00
|
|
|
# - POW_LIB
|
|
|
|
# From acfunctions.m4.
|
2000-12-06 23:14:16 +08:00
|
|
|
#
|
|
|
|
# Some `egrep' choke on such a big regex (e.g., SunOS 4.1.3). 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.
|
2000-12-06 22:05:46 +08:00
|
|
|
m4_defun([AC_STATE_SAVE],
|
Test that the macros respect the user variable name space.
* acgeneral.m4 (AC_CANONICAL_THING): define, not AC_DEFUN.
Don't AC_PROVIDE, there is no need.
When calling `config.sub`, also || exit 1, to catch failures from
config.sub.
* acspecific.m4 (AC_SYS_LONG_FILE_NAMES): Use ac_val, not val.
(AC_EXEEXT): Use ac_file, not file.
* tests/actest.m4: New file, holding extra Autoconf macros used
during the testing.
(AC_ENV_SAVE): New macro, save the sh variables in a file.
* tests/suite.m4 (AT_TEST_MACRO, Generation of configure.in):
include actest.m4, and call twice AC_ENV_SAVE to compare the
variables before and after the macro.
* tests/Makefile.am (macro.m4): Don't test macros that are
required: they will be tested somewhere else.
2000-02-07 21:25:35 +08:00
|
|
|
[(set) 2>&1 |
|
2000-12-06 22:05:46 +08:00
|
|
|
egrep -v -e 'm4_join([|],
|
* acgeneral.m4 (AC_VAR_SET, AC_VAR_GET, AC_VAR_TEST_SET)
(AC_VAR_SET_IFELSE, AC_VAR_PUSHDEF and AC_VAR_POPDEF, AC_TR_CPP)
(AC_TR_SH): Move as...
* m4sh.m4 (AS_VAR_SET, AS_VAR_GET, AS_VAR_TEST_SET)
(AS_VAR_SET_IF, AC_VAR_PUSHDEF, AS_VAR_POPDEF, AS_TR_CPP)
(AS_TR_SH): these.
(_AS_TR_PREPARE, _AS_CR_PREPARE, _AS_TR_CPP_PREPARE)
(_AS_TR_SH_PREPARE): New.
(AS_SHELL_SANITIZE): Invoke _AS_TR_PREPARE.
* tests/aclocal.m4 (AC_STATE_SAVE): `as_' vars can be modified.
2001-06-05 00:07:23 +08:00
|
|
|
[^a[cs]_],
|
2001-01-24 21:19:10 +08:00
|
|
|
[^((exec_)?prefix|DEFS|CONFIG_STATUS)=],
|
2000-03-10 23:22:13 +08:00
|
|
|
[^(CC|CFLAGS|CPP|GCC|CXX|CXXFLAGS|CXXCPP|GXX|F77|FFLAGS|FLIBS|G77)=],
|
|
|
|
[^(LIBS|LIBOBJS|LDFLAGS)=],
|
|
|
|
[^INSTALL(_(DATA|PROGRAM|SCRIPT))?=],
|
2000-05-24 22:39:24 +08:00
|
|
|
[^(CYGWIN|ISC|MINGW32|MINIX|EMXOS2|XENIX|EXEEXT|OBJEXT)=],
|
2000-06-07 01:00:46 +08:00
|
|
|
[^(X_(CFLAGS|(EXTRA_|PRE_)?LIBS)|x_(includes|libraries)|(have|no)_x)=],
|
2000-03-10 23:22:13 +08:00
|
|
|
[^(host|build|target)(_(alias|cpu|vendor|os))?=],
|
|
|
|
[^(cross_compiling)=],
|
2001-07-18 00:30:20 +08:00
|
|
|
[^(interpval|PATH_SEPARATOR)=],
|
2001-07-18 01:03:16 +08:00
|
|
|
[^(F77_DUMMY_MAIN|f77_(case|underscore))=],
|
2000-09-19 23:36:39 +08:00
|
|
|
[^(ALLOCA|GETLOADAVG_LIBS|KMEM_GROUP|NEED_SETGID|POW_LIB)=],
|
2000-03-10 23:22:13 +08:00
|
|
|
[^(AWK|LEX|LEXLIB|LEX_OUTPUT_ROOT|LN_S|M4|RANLIB|SET_MAKE|YACC)=],
|
2000-12-06 23:14:16 +08:00
|
|
|
[^(_|@|.[*#?].|LINENO|OLDPWD|PIPESTATUS|RANDOM|SECONDS)=])' 2>/dev/null |
|
Test that the macros respect the user variable name space.
* acgeneral.m4 (AC_CANONICAL_THING): define, not AC_DEFUN.
Don't AC_PROVIDE, there is no need.
When calling `config.sub`, also || exit 1, to catch failures from
config.sub.
* acspecific.m4 (AC_SYS_LONG_FILE_NAMES): Use ac_val, not val.
(AC_EXEEXT): Use ac_file, not file.
* tests/actest.m4: New file, holding extra Autoconf macros used
during the testing.
(AC_ENV_SAVE): New macro, save the sh variables in a file.
* tests/suite.m4 (AT_TEST_MACRO, Generation of configure.in):
include actest.m4, and call twice AC_ENV_SAVE to compare the
variables before and after the macro.
* tests/Makefile.am (macro.m4): Don't test macros that are
required: they will be tested somewhere else.
2000-02-07 21:25:35 +08:00
|
|
|
# There maybe variables spread on several lines, eg IFS, remove the dead
|
2000-12-06 22:05:46 +08:00
|
|
|
# lines.
|
2000-12-12 19:04:43 +08:00
|
|
|
grep '^m4_defn([m4_re_word])=' >state-env.$1
|
2000-12-06 22:05:46 +08:00
|
|
|
test $? = 0 || rm -f state-env.$1
|
|
|
|
|
2001-02-05 18:16:32 +08:00
|
|
|
ls -1 | egrep -v '^(at-|state-|config\.)' | sort >state-ls.$1
|
2000-12-06 22:05:46 +08:00
|
|
|
])# AC_STATE_SAVE
|