1995-05-09 02:36:12 -07:00
|
|
|
#!/bin/sh
|
|
|
|
|
1996-02-13 08:29:09 -08:00
|
|
|
opts=""
|
|
|
|
libs="$cclibs"
|
1999-11-30 08:07:38 -08:00
|
|
|
args=$*
|
1995-05-09 02:36:12 -07:00
|
|
|
rm -f hasgot.c
|
|
|
|
while : ; do
|
|
|
|
case "$1" in
|
2000-02-29 08:14:33 -08:00
|
|
|
-i) echo "#include <$2>" >> hasgot.c; shift;;
|
1999-12-17 04:42:01 -08:00
|
|
|
-t) echo "$2 the_$2;" >> hasgot.c; shift;;
|
1996-04-02 00:40:39 -08:00
|
|
|
-l*|-L*) libs="$libs $1";;
|
1996-02-13 08:29:09 -08:00
|
|
|
-*) opts="$opts $1";;
|
1995-05-09 02:36:12 -07:00
|
|
|
*) break;;
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
1999-11-30 08:07:38 -08:00
|
|
|
|
1995-05-09 02:36:12 -07:00
|
|
|
(echo "main() {"
|
|
|
|
for f in $*; do echo " $f();"; done
|
|
|
|
echo "}") >> hasgot.c
|
1999-11-30 08:07:38 -08:00
|
|
|
|
|
|
|
if test "$verbose" = yes; then
|
|
|
|
echo "hasgot $args: $cc $opts -o tst hasgot.c $libs" >&2
|
|
|
|
exec $cc $opts -o tst hasgot.c $libs > /dev/null
|
|
|
|
else
|
|
|
|
exec $cc $opts -o tst hasgot.c $libs > /dev/null 2>/dev/null
|
|
|
|
fi
|