X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=hints%2Fbeos.sh;h=a83b4af6dd6d77a6063be499434057a806729905;hb=a4cc96117b620fea7c0739c9e20f017a5fdeeb52;hp=d8d4fd0515db576a6694117805abd0ef057ca0f3;hpb=c4f23d77f4b3486a36335c4460cbfd4e81e37892;p=p5sagit%2Fp5-mst-13.2.git diff --git a/hints/beos.sh b/hints/beos.sh index d8d4fd0..a83b4af 100644 --- a/hints/beos.sh +++ b/hints/beos.sh @@ -1,11 +1,12 @@ # BeOS hints file # $Id: beos.sh,v 1.1 1998/02/16 03:51:45 dogcow Exp $ -if [ ! -f ../beos/nm ]; then mwcc -w all -o ../beos/nm ../beos/nm.c; fi +if [ ! -f beos/nm ]; then mwcc -w all -o beos/nm beos/nm.c 2>/dev/null; fi +# If this fails, that's all right - it's only for PPC. prefix="/boot/home/config" -cpp="mwcc -e" +#cpp="mwcc -e" libpth='/boot/beos/system/lib /boot/home/config/lib' usrinc='/boot/develop/headers/posix' @@ -37,9 +38,46 @@ d_syserrlst='undef' # the array syserrlst[] is useless for the most part. # large negative numbers really kind of suck in arrays. -#d_socket='undef' -# Sockets really don't work with the current version of perl and the -# current BeOS sockets; I suspect that a new module a la GSAR's WIN32 port -# will be required. +# Sockets didn't use to be real sockets but BONE changes this. +if [ ! -f /boot/develop/headers/be/bone/sys/socket.h ]; then + d_socket='undef' + d_gethbyaddr='undef' + d_gethbyname='undef' + d_getsbyname='undef' + + libs='-lnet' +fi + +# 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' export PATH="$PATH:$PWD/beos" + +case "$ldlibpthname" in +'') ldlibpthname=LIBRARY_PATH ;; +esac + +# the waitpid() wrapper (among other things) +archobjs="beos.o" +test -f beos.c || cp beos/beos.c .