Commit | Line | Data |
---|---|---|
a774dfe6 RSG |
1 | # hints/dragonfly.sh |
2 | # | |
3 | # This file is mostly copied from hints/freebsd.sh with the OS version | |
4 | # information taken out and only the FreeBSD-4 information intact. | |
5 | # Please check with Todd Willey <xtoddx@gmail.com> before making | |
6 | # modifications to this file. See http://www.dragonflybsd.org/main/ | |
7 | ||
8 | case "$osvers" in | |
9 | *) usevfork='true' | |
10 | case "$usemymalloc" in | |
11 | "") usemymalloc='n' | |
12 | ;; | |
13 | esac | |
14 | libswanted=`echo $libswanted | sed 's/ malloc / /'` | |
15 | ;; | |
16 | esac | |
17 | ||
18 | # Dynamic Loading flags have not changed much, so they are separated | |
19 | # out here to avoid duplicating them everywhere. | |
20 | case "$osvers" in | |
21 | *) objformat=`/usr/bin/objformat` | |
22 | if [ x$objformat = xelf ]; then | |
23 | libpth="/usr/lib /usr/local/lib" | |
24 | glibpth="/usr/lib /usr/local/lib" | |
25 | ldflags="-Wl,-E " | |
26 | lddlflags="-shared " | |
27 | else | |
28 | if [ -e /usr/lib/aout ]; then | |
29 | libpth="/usr/lib/aout /usr/local/lib /usr/lib" | |
30 | glibpth="/usr/lib/aout /usr/local/lib /usr/lib" | |
31 | fi | |
32 | lddlflags='-Bshareable' | |
33 | fi | |
34 | cccdlflags='-DPIC -fPIC' | |
35 | ;; | |
36 | esac | |
37 | ||
38 | case "$osvers" in | |
39 | *) ccflags="${ccflags} -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H" | |
40 | if /usr/bin/file -L /usr/lib/libc.so | /usr/bin/grep -vq "not stripped" ; then | |
41 | usenm=false | |
42 | fi | |
43 | ;; | |
44 | esac | |
45 | ||
46 | cat <<'EOM' >&4 | |
47 | ||
48 | Some users have reported that Configure halts when testing for | |
49 | the O_NONBLOCK symbol with a syntax error. This is apparently a | |
50 | sh error. Rerunning Configure with ksh apparently fixes the | |
51 | problem. Try | |
52 | ksh Configure [your options] | |
53 | ||
54 | EOM | |
55 | ||
56 | # From: Anton Berezin <tobez@plab.ku.dk> | |
57 | # To: perl5-porters@perl.org | |
58 | # Subject: [PATCH 5.005_54] Configure - hints/freebsd.sh signal handler type | |
59 | # Date: 30 Nov 1998 19:46:24 +0100 | |
60 | # Message-ID: <864srhhvcv.fsf@lion.plab.ku.dk> | |
61 | ||
62 | signal_t='void' | |
63 | d_voidsig='define' | |
64 | ||
65 | # This script UU/usethreads.cbu will get 'called-back' by Configure | |
66 | # after it has prompted the user for whether to use threads. | |
67 | cat > UU/usethreads.cbu <<'EOCBU' | |
68 | case "$usethreads" in | |
69 | $define|true|[yY]*) | |
70 | lc_r=`/sbin/ldconfig -r|grep ':-lc_r'|awk '{print $NF}'|sed -n '$p'` | |
71 | case "$osvers" in | |
72 | *) if [ ! -r "$lc_r" ]; then | |
73 | cat <<EOM >&4 | |
74 | POSIX threads should be supported by FreeBSD $osvers -- | |
75 | but your system is missing the shared libc_r. | |
76 | (/sbin/ldconfig -r doesn't find any). | |
77 | ||
78 | Consider using the latest STABLE release. | |
79 | EOM | |
80 | exit 1 | |
81 | fi | |
82 | case "$osvers" in | |
83 | *) ldflags="-pthread $ldflags" | |
84 | ;; | |
85 | esac | |
86 | # Both in 4.x and 5.x gethostbyaddr_r exists but | |
87 | # it is "Temporary function, not threadsafe"... | |
88 | # Presumably earlier it didn't even exist. | |
89 | d_gethostbyaddr_r="undef" | |
90 | d_gethostbyaddr_r_proto="0" | |
91 | ;; | |
92 | esac | |
93 | ||
94 | set `echo X "$libswanted "| sed -e 's/ c / c_r /'` | |
95 | shift | |
96 | libswanted="$*" | |
97 | # Configure will probably pick the wrong libc to use for nm scan. | |
98 | # The safest quick-fix is just to not use nm at all... | |
99 | usenm=false | |
100 | ||
101 | unset lc_r | |
102 | ||
103 | # Even with the malloc mutexes the Perl malloc does not | |
104 | # seem to be threadsafe in FreeBSD? | |
105 | case "$usemymalloc" in | |
106 | '') usemymalloc=n ;; | |
107 | esac | |
108 | esac | |
109 | EOCBU | |
110 | ||
111 | # malloc wrap works | |
112 | case "$usemallocwrap" in | |
113 | '') usemallocwrap='define' ;; | |
114 | esac |