[win32] integrate mainline
[p5sagit/p5-mst-13.2.git] / hints / irix_6.sh
index 6d22d52..40d4291 100644 (file)
@@ -23,6 +23,8 @@
 # Threaded by Jarkko Hietaniemi <jhi@iki.fi> on 11/18/97
 #    - POSIX threads knowledge by IRIX version
 
+# gcc-enabled by Kurt Starsinic <kstar@isinet.com> on 3/24/1998
+
 # 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.
@@ -76,6 +78,11 @@ case "$cc" in
        nm_opt='-p'
        nm_so_opt='-p'
        ;;
+*gcc*)
+       ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -D_POSIX_C_SOURCE"
+       optimize="-O3"
+       usenm='undef'
+       ;;
 *)
        # this is needed to force the old-32 paths
        #  since the system default can be changed.
@@ -84,9 +91,6 @@ case "$cc" in
        ;;
 esac
 
-# This should be a Configure thing, but not for now...
-pp_sys_cflags='ccflags="$ccflags -DHAS_TELLDIR_PROTOTYPE"'
-
 # We don't want these libraries.  Anyone know why?
 set `echo X "$libswanted "|sed -e 's/ socket / /' -e 's/ nsl / /' -e 's/ dl / /'`
 shift
@@ -120,7 +124,7 @@ libswanted="$*"
 # makes IRIX 6.2 cc to emit bad code.
 pp_ctl_cflags='optimize=-O'
 
-if [ "X$usethreads" != "X" ]; then
+if [ "X$usethreads" = "X$define" ]; then
     if test ! -f /usr/include/pthread.h -o ! -f /usr/lib/libpthread.so; then
        uname_r=`uname -r`
        case "`uname -r`" in
@@ -160,14 +164,12 @@ EOF
        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"
+    ld="${cc:-cc}"
     shift
     libswanted="$*"
     usemymalloc='n'