This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/packages/jpl/testenv

31 lines
537 B
Plaintext
Raw Normal View History

2015-10-13 08:17:51 +01:00
#!/bin/sh
# Verify the environment is safe for building this package.
findexe()
{ oldifs="$IFS"
IFS=:
for d in $PATH; do
if [ -x $d/$1 ]; then
IFS="$oldifs"
return 0
fi
done
IFS="$oldifs"
return 1
}
# We should also check various other things:
#
# * javac is from SUN SDK or IBM java
# * javac has same wordsize as Prolog (both 32 or 64 bits)
# * linking libpl.a in a shared object is possible.
#
# How to do this in a portable way? Can we use plld?
if findexe javac; then
exit 0
else
exit 1
fi