X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=hints%2Firix_6.sh;h=72cc2c61dbc6d46012b773ddfafa4ca3f945a0d6;hb=7e3be867c805de9df8b4e2ab54f88f956419821c;hp=060d97274819f5bf4599c5e6a828ac78ad5add1e;hpb=ba51d756f9ffaa3939ada6861397f27ce3967220;p=p5sagit%2Fp5-mst-13.2.git diff --git a/hints/irix_6.sh b/hints/irix_6.sh index 060d972..72cc2c6 100644 --- a/hints/irix_6.sh +++ b/hints/irix_6.sh @@ -20,6 +20,9 @@ # Tweaked by Chip Salzenberg on 5/13/97 # - don't assume 'cc -n32' if the n32 libm.so is missing +# Threaded by Jarkko Hietaniemi on 11/18/97 +# - POSIX threads knowledge by IRIX version + # Use sh Configure -Dcc='cc -n32' to try compiling with -n32. # or -Dcc='cc -n32 -mips3' (or -mips4) to force (non)portability # Don't bother with -n32 unless you have the 7.1 or later compilers. @@ -63,6 +66,10 @@ case "$cc" in ld=ld ldflags=' -L/usr/local/lib -L/usr/lib32 -L/lib32' cccdlflags=' ' + # From: David Billinghurst + # If you get complaints about so_locations then change the following + # line to something like: + # lddlflags="-n32 -shared -check_registry /usr/lib32/so_locations" lddlflags="-n32 -shared" libc='/usr/lib32/libc.so' plibpth='/usr/lib32 /lib32 /usr/ccs/lib' @@ -108,3 +115,55 @@ libswanted="$*" set `echo X "$libswanted "|sed -e 's/ sun / /' -e 's/ crypt / /' -e 's/ bsd / /' -e 's/ PW / /'` shift libswanted="$*" + +if [ "X$usethreads" != "X" ]; then + if test ! -f /usr/include/pthread.h -o ! -f /usr/lib/libpthread.so; then + uname_r=`uname -r` + case "`uname -r`" in + 6.0|6.1) + echo >&4 "IRIX $uname_r does not have the POSIX threads." + echo >&4 "You should upgrade to at least IRIX 6.3." + echo >&4 "Cannot continue, aborting." + exit 1 + ;; + 6.2) + echo >&4 "" +cat >&4 <&4 "IRIX $uname_r should have the POSIX threads." + echo >&4 "But somehow you do not seem to have them installed." + echo >&4 "Cannot continue, aborting." + exit 1 + ;; + esac + unset uname-r + fi + ccflags="-DUSE_THREADS $ccflags" + cppflags="-DUSE_THREADS $cppflags" + # -lpthread needs to come before -lc but after other libraries such + # as -lgdbm and such like. We assume here that -lc is present in + # libswanted. If that fails to be true in future, then this can be + # changed to add pthread to the very end of libswanted. + set `echo X "$libswanted "| sed -e 's/ c / pthread /'` + ld="cc" + shift + libswanted="$*" +fi