* tests/atspecific.m4 (AT_DATA_AUTOCONF): New.

* tests/aclocal.m4: Remove, as it is no longer used.
This commit is contained in:
Akim Demaille 2001-11-13 14:05:25 +00:00
parent 3c94358e38
commit 2b88201591
7 changed files with 89 additions and 100 deletions

View File

@ -1,3 +1,10 @@
2001-11-13 Akim Demaille <akim@epita.fr>
* tests/atspecific.m4 (AT_DATA_AUTOCONF): New.
(AT_CONFIGURE_AC): Output the definition of AC_STATE_SAVE in
configure.ac.
* tests/aclocal.m4: Remove, as it is no longer used.
2001-11-13 Akim Demaille <akim@epita.fr>
* lib/autotest/general.m4: Change `tests?' into `groups?' in

View File

@ -1,26 +1,11 @@
Makefile
AT-* at-* atlocal atconfig experr expout stderr stdout
config.h config.hin
config.log
config.status
configure configure.ac configure.in configure.scan
confdefs.h
conftest*
dst1 dst2 src1 src2
empty
endless.sh
macros.m4
mycc mycpp
state*
syntax.sh expr
expr
*.log
testsuite testsuite.tmp testsuite.[0-9][0-9][0-9]
testsuite testsuite.tmp testsuite.dir
autom4te.cache
command.in header.in link.in
script.s4g
package.m4
ifnames
install-sh
autoupdate
autoscan
autoreconf

View File

@ -20,7 +20,7 @@
# We don't actually distribute the testsuite, since one only
# needs m4 to build it, m4 being required anyway to install Autoconf.
EXTRA_DIST = $(TESTSUITE_AT) atspecific.m4 aclocal.m4 mktests.sh \
EXTRA_DIST = $(TESTSUITE_AT) atspecific.m4 mktests.sh \
atlocal.in
# Running the uninstalled scripts.

View File

@ -72,7 +72,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
PERL = @PERL@
VERSION = @VERSION@
EXTRA_DIST = $(TESTSUITE_AT) atspecific.m4 aclocal.m4 mktests.sh \
EXTRA_DIST = $(TESTSUITE_AT) atspecific.m4 mktests.sh \
atlocal.in

76
tests/aclocal.m4 vendored
View File

@ -1,76 +0,0 @@
# actest.m4 -*- autoconf -*-
# Additional Autoconf macros to ease testing.
# 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.
# AC_STATE_SAVE(FILE)
# ------------------
# Save the environment, except for those variables we are allowed to touch.
# 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
# is AC_SUBST'ed.
# - ^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.
# - CONFIG_STATUS and DEFS
# Set by AC_OUTPUT.
# - F77_DUMMY_MAIN
# Set by AC_F77_DUMMY_MAIN.
# - 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
# - _|@|.[*#?].|LINENO|OLDPWD|PIPESTATUS|RANDOM|SECONDS
# Some variables some shells use and change.
# `.[*#?].' catches `$#' etc. which are displayed like this:
# | '!'=18186
# | '#'=0
# | '$'=6908
# - POW_LIB
# From acfunctions.m4.
#
# 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.
m4_defun([AC_STATE_SAVE],
[(set) 2>&1 |
egrep -v -e 'm4_join([|],
[^a[cs]_],
[^((exec_)?prefix|DEFS|CONFIG_STATUS)=],
[^(CC|CFLAGS|CPP|GCC|CXX|CXXFLAGS|CXXCPP|GXX|F77|FFLAGS|FLIBS|G77)=],
[^(LIBS|LIB@&t@OBJS|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))=],
[^(ALLOCA|GETLOADAVG_LIBS|KMEM_GROUP|NEED_SETGID|POW_LIB)=],
[^(AWK|LEX|LEXLIB|LEX_OUTPUT_ROOT|LN_S|M4|RANLIB|SET_MAKE|YACC)=],
[^(_|@|.[*#?].|LINENO|OLDPWD|PIPESTATUS|RANDOM|SECONDS)=])' 2>/dev/null |
# There maybe variables spread on several lines, eg IFS, remove the dead
# lines.
grep '^m4_defn([m4_re_word])=' >state-env.$1
test $? = 0 || rm -f state-env.$1
ls -1 | egrep -v '^(at-|state-|config\.)' | sort >state-ls.$1
])# AC_STATE_SAVE

View File

@ -37,7 +37,7 @@ m4_define([AT_DATA_M4SUGAR],
# ----------------------------------------------------------
m4_define([AT_CHECK_M4SUGAR],
[AT_CHECK([autom4te --language=m4sugar script.4s -o script $1],
m4_default([$2], [0]), [$3], [$4])])
m4_default([$2], [0]), [$3], [$4])])
@ -60,7 +60,7 @@ m4_define([AT_DATA_M4SH],
# -------------------------------------------------------
m4_define([AT_CHECK_M4SH],
[AT_CHECK([autom4te --language=m4sh script.as -o script $1],
m4_default([$2], [0]), [$3], [$4])])
m4_default([$2], [0]), [$3], [$4])])
@ -69,13 +69,86 @@ m4_define([AT_CHECK_M4SH],
## ------------------ ##
# AT_DATA_AUTOCONF(FILENAME, CONTENTS)
# ------------------------------------
# Escape the invalid tokens with @&t@.
m4_define([AT_DATA_AUTOCONF],
[AT_DATA([$1],
[m4_bpatsubsts([$2],
[\(m4\|AS\|AC\)_], [\1@&t@_],
[dnl], [d@&t@nl])])])
# AT_CONFIGURE_AC(BODY)
# ---------------------
# Create a full configure.ac running BODY, with a config header set up,
# AC_OUTPUT, and environement checking hooks.
#
# Here are the exceptions to AC_STATE_SAVE:
#
# - ^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.
# - CONFIG_STATUS and DEFS
# Set by AC_OUTPUT.
# - F77_DUMMY_MAIN
# Set by AC_F77_DUMMY_MAIN.
# - 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
# - _|@|.[*#?].|LINENO|OLDPWD|PIPESTATUS|RANDOM|SECONDS
# Some variables some shells use and change.
# `.[*#?].' catches `$#' etc. which are displayed like this:
# | '!'=18186
# | '#'=0
# | '$'=6908
# - POW_LIB
# From acfunctions.m4.
#
m4_define([AT_CONFIGURE_AC],
[AT_DATA([configure.ac],
[[AC_INIT
[AT_DATA_AUTOCONF([configure.ac],
[[
# AC_STATE_SAVE(FILE)
# ------------------
# Save the environment, except for those variables we are allowed to touch.
# 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
# is AC_SUBST'ed.
#
# 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.
m4_defun([AC_STATE_SAVE],
[(set) 2>&1 |
egrep -v -e 'm4_join([|],
[^a[cs]_],
[^((exec_)?prefix|DEFS|CONFIG_STATUS)=],
[^(CC|CFLAGS|CPP|GCC|CXX|CXXFLAGS|CXXCPP|GXX|F77|FFLAGS|FLIBS|G77)=],
[^(LIBS|LIB@&t@OBJS|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))=],
[^(ALLOCA|GETLOADAVG_LIBS|KMEM_GROUP|NEED_SETGID|POW_LIB)=],
[^(AWK|LEX|LEXLIB|LEX_OUTPUT_ROOT|LN_S|M4|RANLIB|SET_MAKE|YACC)=],
[^(_|@|.[*#?].|LINENO|OLDPWD|PIPESTATUS|RANDOM|SECONDS)=])' 2>/dev/null |
# There maybe variables spread on several lines, eg IFS, remove the dead
# lines.
grep '^m4_defn([m4_re_word])=' >state-env.$1
test $? = 0 || rm -f state-env.$1
ls -1 | egrep -v '^(at-|state-|config\.)' | sort >state-ls.$1
])# AC_STATE_SAVE
AC_INIT
AC_CONFIG_AUX_DIR($top_srcdir/config)
AC_CONFIG_HEADER(config.h:config.hin)
AC_STATE_SAVE(before)]

View File

@ -18,7 +18,7 @@
# 02111-1307, USA.
# We need a very up to date version of Autotest.
m4_version_prereq([2.52e])
m4_version_prereq([2.52g])
# Macros specialized for Autoconf testing.
m4_include([atspecific.m4])