summaryrefslogtreecommitdiff
path: root/japanese/perl5/files/patch-ad
blob: be532df9909aece14023bb17050c6994bd11fb24 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
--- hints/freebsd.sh.orig	Fri Jul 24 13:00:19 1998
+++ hints/freebsd.sh	Wed Feb 10 15:22:47 1999
@@ -68,6 +68,7 @@
 	d_setreuid='define'
 	d_setegid='undef'
 	d_seteuid='undef'
+	d_dosuid='define'
 	test -r ./broken-db.msg && . ./broken-db.msg
 	;;
 #
@@ -81,12 +82,18 @@
 	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
 
@@ -95,17 +102,25 @@
 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'
+2.*)	cccdlflags='-DPIC -fpic'
 	lddlflags="-Bshareable $lddlflags"
 	;;
+
+*)	objformat=`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'
+        ;;
 esac
 
 cat <<'EOM' >&4
@@ -125,7 +140,11 @@
 case "$usethreads" in
 $define)
     case "$osvers" in  
-        3.0*) ldflags="-pthread $ldflags"
+         0.*|1.*|2.0*|2.1*)   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
               ;;
         2.2*) if [ ! -r /usr/lib/libc_r ]; then
                 cat <<'EOM' >&4
@@ -142,11 +161,7 @@
               # 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
+        *) ldflags="-pthread $ldflags"
               ;;
     esac
     ;;