X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=hints%2Fbeos.sh;h=a83b4af6dd6d77a6063be499434057a806729905;hb=2440f57eb96c4329967f5d7bc390ffabf1449b9c;hp=47e724b2a5e024a715c5ef204539ad506e00524c;hpb=dbc1d98621f53e4a3938cf011ae90a189e72f69f;p=p5sagit%2Fp5-mst-13.2.git diff --git a/hints/beos.sh b/hints/beos.sh index 47e724b..a83b4af 100644 --- a/hints/beos.sh +++ b/hints/beos.sh @@ -48,9 +48,27 @@ if [ ! -f /boot/develop/headers/be/bone/sys/socket.h ]; then libs='-lnet' fi -# We provide a flock() emulation. -d_flock='define' -d_flockproto='define' +# There's a third party flock() emulation. Check, if it is available. +echo "#include " > try.c +if cc -E $CFLAGS try.c 2> /dev/null | grep "flock.*("; then + d_flock='define' + d_flockproto='define' + libs="$libs -lflock" + ldflags="$ldflags -L/boot/home/config/lib" +else + cat << 'EOM' >&4 + +I couldn't find a header defining a flock() prototype. That header +comes with the flock server package (available on BeBits). You have to add +the path to the directory containing the header via the environment variable +CFLAGS (should contain -I). Perl will be compiled +without flock() support, if the flock server package is not installed or the +header not found. + +EOM + +fi +rm try.c ld='gcc'