adjust searchdict.t for EBCDIC (still needs documenting)
[p5sagit/p5-mst-13.2.git] / hints / freebsd.sh
index 6ce5fa7..0f2a5a5 100644 (file)
 # Additional 2.2 defines from
 # Mark Murray <mark@grondar.za>
 # Date: Wed, 6 Nov 1996 09:44:58 +0200 (MET)
-# 
+#
+# Modified to ensure we replace -lc with -lc_r, and
+# to put in place-holders for various specific hints.
+# Andy Dougherty <doughera@lafcol.lafayette.edu>
+# Date: Tue Mar 10 16:07:00 EST 1998
+#
 # The two flags "-fpic -DPIC" are used to indicate a
 # will-be-shared object.  Configure will guess the -fpic, (and the
 # -DPIC is not used by perl proper) but the full define is included to 
@@ -89,15 +94,20 @@ esac
 # out here to avoid duplicating them everywhere.
 case "$osvers" in
 0.*|1.0*) ;;
+
+3.0*)   if [ -e /usr/lib/aout ]; then
+            libpth="/usr/lib/aout /usr/local/lib /usr/lib"
+            glibpth="/usr/lib/aout /usr/local/lib /usr/lib"
+        fi
+        cccdlflags='-DPIC -fpic'
+        lddlflags='-Bshareable'
+        ;;
+
 *)     cccdlflags='-DPIC -fpic'
        lddlflags="-Bshareable $lddlflags"
        ;;
 esac
 
-# Avoid telldir prototype conflict in pp_sys.c  (FreeBSD uses const DIR *)
-# Configure should test for this.  Volunteers?
-pp_sys_cflags='ccflags="$ccflags -DHAS_TELLDIR_PROTOTYPE"'
-
 cat <<'EOM' >&4
 
 Some users have reported that Configure halts when testing for
@@ -108,3 +118,38 @@ problem.  Try
 
 EOM
 
+# XXX EXPERIMENTAL  A.D.  03/09/1998
+# XXX This script UU/usethreads.cbu will get 'called-back' by Configure
+# XXX after it has prompted the user for whether to use threads.
+cat > UU/usethreads.cbu <<'EOSH'
+case "$usethreads" in
+$define)
+    case "$osvers" in  
+        3.0*) ldflags="-pthread $ldflags"
+              ;;
+        2.2*) if [ ! -r /usr/lib/libc_r ]; then
+                cat <<'EOM' >&4
+POSIX threads are not supported by default on FreeBSD $uname_r.  Follow the
+instructions in 'man pthread' to build and install the needed libraries.
+EOM
+                 exit 1
+              fi
+              set `echo X "$libswanted "| sed -e 's/ c / c_r /'`
+              shift
+              libswanted="$*"
+              # Configure will probably pick the wrong libc to use for nm
+              # scan.
+              # The safest quick-fix is just to not use nm at all.
+              usenm=false
+              ;;
+         *)   cat <<'EOM' >&4
+It is not known if FreeBSD $uname_r supports POSIX threads or not.  Consider
+upgrading to the latest STABLE release.
+EOM
+              exit 1
+              ;;
+    esac
+    ;;
+esac
+EOSH
+# XXX EXPERIMENTAL  --end of call-back