Blame testsuite/autoconf.s/defines.exp

Packit 1ca270
# -*- TCL -*-
Packit 1ca270
# Check for a 1-1 correspondence between acconfig.h and acspecific.m4.
Packit 1ca270
# Copyright (C) 1994 Free Software Foundation, Inc.
Packit 1ca270
Packit 1ca270
# This program is free software; you can redistribute it and/or modify
Packit 1ca270
# it under the terms of the GNU General Public License as published by
Packit 1ca270
# the Free Software Foundation; either version 2 of the License, or
Packit 1ca270
# (at your option) any later version.
Packit 1ca270
# 
Packit 1ca270
# This program is distributed in the hope that it will be useful,
Packit 1ca270
# but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 1ca270
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 1ca270
# GNU General Public License for more details.
Packit 1ca270
# 
Packit 1ca270
# You should have received a copy of the GNU General Public License
Packit 1ca270
# along with this program; if not, write to the Free Software
Packit 1ca270
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Packit 1ca270
Packit 1ca270
# Adapted by David MacKenzie from a shell script by Paul Eggert.
Packit 1ca270

Packit 1ca270
set top_srcdir "$srcdir/.."
Packit 1ca270
Packit 1ca270
set uscript {s/^#undef[	 ]*\([^	 ]*\).*/\1/p}
Packit 1ca270
set undefs [exec sed -n $uscript $top_srcdir/acconfig.h]
Packit 1ca270
Packit 1ca270
set dscript {s/.*AC_DEFINE[A-Z_]*(\([^$,)]*\).*/\1/p; s/.*AC_CHECK_TYPE(\([^$,)]*\).*/\1/p}
Packit 1ca270
set defines [exec sed -n $dscript $top_srcdir/acspecific.m4]
Packit 1ca270
Packit 1ca270
send_user "Checking acspecific.m4 for definitions of symbols in acconfig.h...\n"
Packit 1ca270
Packit 1ca270
foreach u $undefs {
Packit 1ca270
    send_user "$u\n"
Packit 1ca270
    if {[lsearch -exact $defines $u] != -1} {
Packit 1ca270
	pass "$u"
Packit 1ca270
    } else {
Packit 1ca270
	fail "$u, not defined"
Packit 1ca270
    }
Packit 1ca270
}
Packit 1ca270
Packit 1ca270
send_user "Checking acconfig.h for symbols defined in acspecific.m4...\n"
Packit 1ca270
Packit 1ca270
foreach d $defines {
Packit 1ca270
    send_user "$d\n"
Packit 1ca270
    if {[lsearch -exact $undefs $d] != -1} {
Packit 1ca270
	pass "$d"
Packit 1ca270
    } else {
Packit 1ca270
	fail "$d, no entry"
Packit 1ca270
    }
Packit 1ca270
}