1 | # -*- TCL -*-
|
---|
2 | # Check for a 1-1 correspondence between acconfig.h and acspecific.m4.
|
---|
3 | # Copyright (C) 1994 Free Software Foundation, Inc.
|
---|
4 |
|
---|
5 | # This program is free software; you can redistribute it and/or modify
|
---|
6 | # it under the terms of the GNU General Public License as published by
|
---|
7 | # the Free Software Foundation; either version 2 of the License, or
|
---|
8 | # (at your option) any later version.
|
---|
9 | #
|
---|
10 | # This program is distributed in the hope that it will be useful,
|
---|
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
13 | # GNU General Public License for more details.
|
---|
14 | #
|
---|
15 | # You should have received a copy of the GNU General Public License
|
---|
16 | # along with this program; if not, write to the Free Software
|
---|
17 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
18 |
|
---|
19 | # Adapted by David MacKenzie from a shell script by Paul Eggert.
|
---|
20 | |
---|
21 |
|
---|
22 | set top_srcdir "$srcdir/.."
|
---|
23 |
|
---|
24 | set uscript {s/^#undef[ ]*\([^ ]*\).*/\1/p}
|
---|
25 | set undefs [exec sed -n $uscript $top_srcdir/acconfig.h]
|
---|
26 |
|
---|
27 | set dscript {s/.*AC_DEFINE[A-Z_]*(\([^$,)]*\).*/\1/p; s/.*AC_CHECK_TYPE(\([^$,)]*\).*/\1/p}
|
---|
28 | set defines [exec sed -n $dscript $top_srcdir/acspecific.m4]
|
---|
29 |
|
---|
30 | send_user "Checking acspecific.m4 for definitions of symbols in acconfig.h...\n"
|
---|
31 |
|
---|
32 | foreach u $undefs {
|
---|
33 | send_user "$u\n"
|
---|
34 | if {[lsearch -exact $defines $u] != -1} {
|
---|
35 | pass "$u"
|
---|
36 | } else {
|
---|
37 | fail "$u, not defined"
|
---|
38 | }
|
---|
39 | }
|
---|
40 |
|
---|
41 | send_user "Checking acconfig.h for symbols defined in acspecific.m4...\n"
|
---|
42 |
|
---|
43 | foreach d $defines {
|
---|
44 | send_user "$d\n"
|
---|
45 | if {[lsearch -exact $undefs $d] != -1} {
|
---|
46 | pass "$d"
|
---|
47 | } else {
|
---|
48 | fail "$d, no entry"
|
---|
49 | }
|
---|
50 | }
|
---|