[revert some function caching changes]
[p5sagit/p5-mst-13.2.git] / hints / sco.sh
index 307e27e..72c3d1c 100644 (file)
@@ -1,15 +1,35 @@
-# sco_3.sh 
-# Courtesy of Joel Rosi-Schwartz <joel@ftechne.co.uk>
+# sco.sh 
+# Courtesy of Joel Rosi-Schwartz <j.schwartz@agonet.it>
+
 # Additional SCO version info from
 # Peter Wolfe  <wolfe@teloseng.com>
 # Last revised 
-# Tue Feb 13 09:09:10 EST 1996
+# Fri Jul 19 14:54:25 EDT 1996
+# by Andy Dougherty  <doughera@lafcol.lafayette.edu>
 
 # To use gcc, use     sh Configure -Dcc=gcc
+# But gcc will *not* do dynamic laoding on 3.2.5,
+# for that use        sh Configure -Dcc=icc
+# See below for more details.
 
-# figure out what SCO version we are:
-case `uname -X | egrep '^Release'` in
-*3.2v4.2) scorls=3 ;;
+# figure out what SCO version we are. The output of uname -X is
+# something like:
+#      System = SCO_SV
+#      Node = xxxxx
+#      Release = 3.2v5.0.0
+#      KernelID = 95/08/08
+#      Machine = Pentium  
+#      BusType = ISA
+#      Serial = xxxxx
+#      Users = 5-user
+#      OEM# = 0
+#      Origin# = 1
+#      NumCPU = 1 
+# Use /bin/uname (because Gnu may be first on the path and
+# it does not support -X) to figure out what SCO version we are:
+case `/bin/uname -X | egrep '^Release'` in
+*3.2v4.*) scorls=3 ;;   # I don't know why this is 3 instead of 4 :-)
 *3.2v5.*) scorls=5 ;;
 *) scorls=3 ;; # this probabaly shouldn't happen
 esac
@@ -30,13 +50,37 @@ glibpth=`echo $glibpth | sed -e 's! /usr/lib/386 ! !' -e 's! /lib/386 ! !'`
 xlibpth=''
 
 case "$cc" in
-gcc)
-       ccflags="$ccflags -U M_XENIX"
+*gcc*) ccflags="$ccflags -U M_XENIX"
        optimize="$optimize -O2"
        ;;
 scocc) ;;
 
-*)     # Apparently, SCO's cc gives rather verbose warnings
+# On SCO 3.2v5 both cc and icc can build dynamic load, but cc core
+# dumps if optimised, so I am only setting this up for icc.
+# It is possible that some 3.2v4.2 system have icc, I seem to
+# recall it was available as a seperate product but I have no
+# knowledge if it can do dynamic loading and if so how.
+#      Joel Rosi-Schwartz
+icc)# Apparently, SCO's cc gives rather verbose warnings
+       # Set -w0 to turn them off.
+       case $scorls in
+       3) ccflags="$ccflags -W0 -quiet -U M_XENIX" ;;
+       5) ccflags="$ccflags -belf -w0 -U M_XENIX"
+          optimize="-O1" # -g -O1 will not work
+       lddlflags='-G -L/usr/local/lib'
+       ldflags=' -W l,-Bexport -L/usr/local/lib'
+       dlext='so'
+       dlsrc='dl_dlopen.xs'
+       usedl='define'
+          ;;
+       esac
+       ;;
+
+*)     # Apparently, miniperl core dumps if -O is used.
+       case "$optimize" in
+       '') optimize=none ;;
+       esac
+       # Apparently, SCO's cc gives rather verbose warnings
        # Set -w0 to turn them off.
        case $scorls in
        3) ccflags="$ccflags -W0 -quiet -U M_XENIX" ;;
@@ -88,3 +132,8 @@ libswanted=`echo " $libswanted " | sed -e 's/ dl / /'`
 set X $libswanted
 shift
 libswanted="$*"
+
+# Perl 5.003_05 and later try to include both <time.h> and <sys/select.h>
+# in pp_sys.c, but that fails due to a redefinition of struct timeval.
+# This will generate a WHOA THERE.  Accept the default.
+i_sysselct=$undef