summaryrefslogtreecommitdiff
path: root/hints/midnightbsd.sh
diff options
context:
space:
mode:
authorLucas Holt <unknown>2006-08-25 13:16:40 -0700
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-09-04 16:54:36 +0000
commit7145db399bea60e9f2e625350c9081d1b1f3b08e (patch)
treecfaa5b60361bd06c9a75168f4e5e16cd62a0c30a /hints/midnightbsd.sh
parent07b7e4bc0b0de0ebe3e12073f5809d73b6646970 (diff)
downloadperl-7145db399bea60e9f2e625350c9081d1b1f3b08e.tar.gz
[perl #40239] New hints file for MidnightBSD
From: Lucas Holt (via RT) <perlbug-followup@perl.org> Message-ID: <rt-3.5.HEAD-31263-1156562199-1390.40239-75-0@perl.org> p4raw-id: //depot/perl@28783
Diffstat (limited to 'hints/midnightbsd.sh')
-rw-r--r--hints/midnightbsd.sh61
1 files changed, 61 insertions, 0 deletions
diff --git a/hints/midnightbsd.sh b/hints/midnightbsd.sh
new file mode 100644
index 0000000000..b5ef050a36
--- /dev/null
+++ b/hints/midnightbsd.sh
@@ -0,0 +1,61 @@
+usevfork='true'
+case "$usemymalloc" in
+ "") usemymalloc='n'
+ ;;
+esac
+libswanted=`echo $libswanted | sed 's/ malloc / /'`
+
+objformat=`/usr/bin/objformat`
+if [ x$objformat = xelf ]; then
+ libpth="/usr/lib /usr/local/lib"
+ glibpth="/usr/lib /usr/local/lib"
+ ldflags="-Wl,-E "
+ lddlflags="-shared "
+else
+ 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
+ lddlflags='-Bshareable'
+fi
+cccdlflags='-DPIC -fPIC'
+
+ccflags="${ccflags} -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H"
+if /usr/bin/file -L /usr/lib/libc.so | /usr/bin/grep -vq "not stripped" ; then
+ usenm=false
+fi
+
+signal_t='void'
+d_voidsig='define'
+
+# This script UU/usethreads.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use threads.
+cat > UU/usethreads.cbu <<'EOCBU'
+case "$usethreads" in
+$define|true|[yY]*)
+ lc_r=`/sbin/ldconfig -r|grep ':-lc_r'|awk '{print $NF}'|sed -n '$p'`
+ ldflags="-pthread $ldflags"
+ d_gethostbyaddr_r="undef"
+ d_gethostbyaddr_r_proto="0"
+
+ 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
+
+ unset lc_r
+
+ # Even with the malloc mutexes the Perl malloc does not
+ # seem to be threadsafe in MidnightBSD?
+ case "$usemymalloc" in
+ '') usemymalloc=n ;;
+ esac
+esac
+EOCBU
+
+# malloc wrap works
+case "$usemallocwrap" in
+'') usemallocwrap='define' ;;
+esac