#!/bin/sh
d=`pwd`
head -1 $1/configure.in > config-in.tmp
echo "AC_CONFIG_HEADER(fooconfig.h:$d/fooconfig-h.tmp)" >> config-in.tmp
tail +2 $1/configure.in | grep -v AC_CONFIG_HEADER >> config-in.tmp
mv -f config-in.tmp config-in.ac~
if (cd $1 && autoheader --include=$2 $d/config-in.ac~) > /dev/null; then
rm -rf $1/autom4te.cache config-in.ac~
else
rm -rf $1/autom4te.cache
echo autoheader failed, eek
exit 1
fi
awk '/^rm -f fooconfig-h.tmp
awk '/^
comm -23 acsyms.here acsyms.there > acsyms.extra
rm -f acsyms.here acsyms.there
if test -s acsyms.extra; then
echo ERROR: Symbol or symbols defined here but not in `basename $3`: `cat acsyms.extra`
rm -f acsyms.extra
exit 1
fi
rm -f acsyms.extra
exit 0