freebsd-ports/japanese/perl5/files/patch-ad
2003-07-12 17:02:37 +00:00

105 lines
2.2 KiB
Text

--- hints/freebsd.sh.orig Fri Feb 12 09:05:48 1999
+++ hints/freebsd.sh Mon Dec 2 14:43:50 2002
@@ -72,6 +72,7 @@
d_setreuid='define'
d_setegid='undef'
d_seteuid='undef'
+ d_dosuid='define'
test -r ./broken-db.msg && . ./broken-db.msg
;;
#
@@ -85,12 +86,29 @@
d_setreuid='define'
d_setegid='undef'
d_seteuid='undef'
+ d_dosuid='define'
;;
#
# Guesses at what will be needed after 2.2
*) usevfork='true'
usemymalloc='n'
libswanted=`echo $libswanted | sed 's/ malloc / /'`
+ d_setregid='define'
+ d_setreuid='define'
+ d_setegid='undef'
+ d_seteuid='undef'
+ d_dosuid='define'
+ ;;
+esac
+
+#
+# /usr/include/malloc.h is deprecated after 3.0.
+case "$osvers" in
+0.*|1.*|2.*)
+ i_malloc=''
+ ;;
+*)
+ i_malloc='undef'
;;
esac
@@ -99,7 +117,11 @@
case "$osvers" in
0.*|1.0*) ;;
-3.*|4.0*)
+2.*) cccdlflags='-DPIC -fPIC'
+ lddlflags="-Bshareable $lddlflags"
+ ;;
+
+*)
objformat=`/usr/bin/objformat`
if [ x$objformat = xelf ]; then
libpth="/usr/lib /usr/local/lib"
@@ -115,10 +137,6 @@
fi
- cccdlflags='-DPIC -fpic'
+ cccdlflags='-DPIC -fPIC'
;;
-
-*) cccdlflags='-DPIC -fpic'
- lddlflags="-Bshareable $lddlflags"
- ;;
esac
cat <<'EOM' >&4
@@ -166,7 +184,7 @@
$define|true|[yY]*)
lc_r=`/sbin/ldconfig -r|grep ':-lc_r'|awk '{print $NF}'`
case "$osvers" in
- 2.2.8*|3.*|4.*)
+ 2.2.8*)
if [ ! -r "$lc_r" ]; then
cat <<EOM >&4
POSIX threads should be supported by FreeBSD $osvers --
@@ -179,7 +197,7 @@
fi
ldflags="-pthread $ldflags"
;;
- 2.2*)
+ 0.*|1.*|2.0*|2.1*|2.2*)
cat <<EOM >&4
POSIX threads are not supported well by FreeBSD $osvers.
@@ -192,12 +210,17 @@
EOM
exit 1
;;
- *) cat <<EOM >&4
-I did not know that FreeBSD $osvers supports POSIX threads.
+ *) if [ ! -r "$lc_r" ]; then
+ cat <<EOM >&4
+POSIX threads should be supported by FreeBSD $osvers --
+but your system is missing the shared libc_r.
+(/sbin/ldconfig -r doesn't find any).
-Feel free to tell perlbug@perl.com otherwise.
+Consider using the latest STABLE release.
EOM
- exit 1
+ exit 1
+ fi
+ ldflags="-pthread $ldflags"
;;
esac