31 lines
537 B
Bash
Executable File
31 lines
537 B
Bash
Executable File
#!/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
|