;;
esac
+# Original directory.
+ORIGDIR=`${PWDCMD}`
+
# Make sure it exists.
if [ ! -d $LIB ]; then
mkdir $LIB || exit 1
# Extract the definition of SIZE_TYPE, if any.
# (This file must be called something.c).
echo "#include \"tm.h\"
-gobblegobble SIZE_TYPE" > types.c
- foo=`cc -E -I. -I$SRCDIR -I$SRCDIR/config types.c | grep gobblegobble | sed -e "s/gobblegobble[ ]*//"`
- rm -f types.c
+gobblegobble SIZE_TYPE" > ${LIB}/types.c
+ foo=`cc -E -I${ORIGDIR} -I${SRCDIR} -I${SRCDIR}/config ${LIB}/types.c | grep gobblegobble | sed -e "s/gobblegobble[ ]*//"`
+ rm -f ${LIB}/types.c
# Default to our preferred type.
if [ $foo = SIZE_TYPE ]; then foo="unsigned long int"; else true; fi
sed -e "s/typedef[ a-z_]*[ ]size_t/typedef $foo size_t/" ${LIB}/$file > ${LIB}/${file}.sed