1#!/bin/sh
2
3LC_ALL=C
4export LC_ALL
5
6test -z "$srcdir" && srcdir=.
7stat=0
8
9test "x$HBHEADERS" = x && HBHEADERS=`cd "$srcdir"; find . -maxdepth 1 -name 'hb*.h'`
10test "x$HBSOURCES" = x && HBSOURCES=`cd "$srcdir"; find . -maxdepth 1 -name 'hb*.h'`
11
12
13for x in $HBHEADERS; do
14	test -f $srcdir/$x && x=$srcdir/$x
15	if ! grep -q HB_BEGIN_DECLS "$x" || ! grep -q HB_END_DECLS "$x"; then
16		echo "Ouch, file $x does not have HB_BEGIN_DECLS / HB_END_DECLS, but it should"
17		stat=1
18	fi
19done
20for x in $HBSOURCES; do
21	test -f $srcdir/$x && x=$srcdir/$x
22	if grep -q HB_BEGIN_DECLS "$x" || grep -q HB_END_DECLS "$x"; then
23		echo "Ouch, file $x has HB_BEGIN_DECLS / HB_END_DECLS, but it shouldn't"
24		stat=1
25	fi
26done
27
28exit $stat
29