3
3
# Build some of the Autoconf test files.
4
# Copyright 2000, 2001 Free Software Foundation, Inc.
4
# Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
6
6
# This program is free software; you can redistribute it and/or modify
7
7
# it under the terms of the GNU General Public License as published by
82
82
# - AC_CANONICALIZE, AC_PREFIX_PROGRAM, AC_PREREQ
83
83
# Need an argument.
84
85
# - AC_CHECK decl, file, func, header, lib, member, prog, sizeof, type
85
86
# Performed in the semantics tests.
87
89
# They fail when the source does not exist.
91
# - AC_FUNC_GETLOADAVG, AC_REPLACE_FNMATCH, AC_FUNC_FNMATCH_GNU
92
# Require a file that is not shipped with Autoconf. But it should.
89
95
# AC_INIT includes all the AC_INIT macros. Note that there is an
90
96
# infinite m4 recursion if AC_INIT it used twice.
92
99
# Heavily used by other macros.
93
# - AC_PATH_PROGS?, AC_F77_FUNC
101
# - AC_PATH_PROGS?, AC_F77_FUNC, AC_FC_FUNC, AC_FC_SRCEXT
94
102
# They produce `= val' because $1, the variable used to store the result,
106
# Requires the current language to be Fortran, not C.
96
108
# - AC_TRY, AC_.*_IFELSE, AC_RUN_LOG.
97
109
# Used in many places.
99
112
# Internal macros are used elsewhere.
101
115
# Already tested by `AT_CHECK_MACRO'.
104
120
# - AC_PROG_CC, AC_C_(CONST|INLINE|VOLATILE), AC_PATH_XTRA
105
121
# Checked in semantics.
106
123
# - AC_CYGWIN, AC_CYGWIN32, AC_EMXOS2, AC_MING32, AC_EXEEXT, AC_OBJEXT
107
124
# AU defined to nothing.
109
127
# Checked in semantics.
110
129
# - AC_SYS_RESTARTABLE_SYSCALLS, AC_FUNC_WAIT3
111
130
# Obsolete, checked in semantics.
122
144
^AC_LIST_MEMBER_OF$
124
146
^AC_PATH_(TOOL|PROG)S?$
147
^AC_REPLACE_(FNMATCH|FUNCS)$
127
149
^(AC_TRY.*|AC_RUN_LOG)$
130
^(AC_(PROG_CC|C_CONST|C_INLINE|C_VOLATILE))$
151
^(AC_(PROG_CC|C_CONST|C_INLINE|C_RESTRICT|C_VOLATILE))$
131
152
^AC_(CYGWIN|CYGWIN32|EMXOS2|MING32|EXEEXT|OBJEXT)$
133
154
^AC_SYS_RESTARTABLE_SYSCALLS$
138
158
# ac_exclude_egrep
139
159
# ----------------
140
# Build a single egrep pattern out of filter_macros_list.
141
# Sed is used to get rid of the trailing `|' coming from the trailing
143
ac_exclude_egrep=`echo "$exclude_list$ac_exclude_list" | tr '
144
' '|' | sed 's/.$//'`
160
# Build a single extended regular expression out of filter_macros_list.
161
ac_exclude_egrep=$exclude_list$ac_exclude_list
147
164
# au_exclude_list
152
169
# need arguments and are tested elsewhere.
153
170
# AC_INIT and AC_OUTPUT
154
171
# are already in `configure.ac'.
172
# AC_C_CROSS and AC_PROG_CC_STDC
155
174
# AC_CYGWIN, AC_MINGW32, AC_EMXOS2
156
175
# are using AC_REQUIRE.
157
176
au_exclude_list='^AC_LANG_RESTORE$
158
177
^AC_LINK_FILES|AC_PREREQ$
159
178
^AC_(INIT|OUTPUT)$
179
^AC_C_CROSS|AC_PROG_CC_STDC$
160
180
^AC_(CYGWIN|MINGW32|EMXOS2)$'
163
183
# au_exclude_egrep
164
184
# ----------------
165
# Build a single egrep pattern out of filter_macros_list.
166
# Sed is used to get rid of the trailing `|' coming from the trailing
168
au_exclude_egrep=`echo "$exclude_list$au_exclude_list" | tr '
169
' '|' | sed 's/.$//'`
185
# Build a single extended regular expression out of filter_macros_list.
186
au_exclude_egrep=$exclude_list$au_exclude_list
191
if echo a | (grep -E '(a|b)') >/dev/null 2>&1
173
197
## ------------------------- ##
187
211
# Watch out we are `set -e': don't fail.
188
( egrep -v "$ac_exclude_egrep" || true) >acdefuns
212
($egrep -v "$ac_exclude_egrep" || true) >acdefuns
190
214
# Get the list of macros which are defined in Autoupdate level.
192
216
sed -n 's/^AU_DEFUN(\[*\([a-zA-Z][a-zA-Z0-9_]*\).*$/\1/p' |
195
( egrep -v "$au_exclude_egrep" || true) > audefuns
219
($egrep -v "$au_exclude_egrep" || true) > audefuns
197
221
# Filter out required macros.
199
223
sed 's/^ *//' <<MK_EOF
200
# Generated by $as_me, do not edit by hand. -*- Autotest -*-
201
# Copyright 2000, 2001 Free Software Foundation, Inc.
224
# Generated by $as_me. -*- Autotest -*-
226
## --------------------- ##
227
## Do not edit by hand. ##
228
## --------------------- ##
230
# Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
203
232
AT_BANNER([Testing autoconf/$base macros.])
207
236
echo "# Modern macros."
208
237
for macro in `cat acdefuns`; do
209
if fgrep "$macro" requires >/dev/null 2>&1; then :; else
238
if grep "$macro" requires >/dev/null 2>&1; then :; else
210
239
echo "AT_CHECK_MACRO([$macro])"
214
243
echo "# Obsolete macros."
215
244
for macro in `cat audefuns`; do
216
if fgrep "$macro" requires >/dev/null 2>&1; then :; else
245
if grep "$macro" requires >/dev/null 2>&1; then :; else
217
246
echo "AT_CHECK_AU_MACRO([$macro])"
222
251
# In one atomic step so that if something above fails, the trap
223
252
# preserves the old version of the file. If there is nothing to
224
253
# check, output /rien du tout/[1].
225
if fgrep AT_CHECK ac$base.tat >/dev/null 2>&1; then
226
mv ac$base.tat ac$base.at
254
if grep AT_CHECK ac$base.tat >/dev/null 2>&1; then
255
mv -f ac$base.tat ac$base.at
256
# Help people not to update these files by hand.
228
259
rm -f ac$base.tat ac$base.at