Commit | Line | Data |
43051805 |
1 | # hints/openbsd.sh |
2 | # |
3 | # hints file for OpenBSD; Todd Miller <millert@openbsd.org> |
4 | # Edited to allow Configure command-line overrides by |
5 | # Andy Dougherty <doughera@lafcol.lafayette.edu> |
6 | # |
7 | |
8 | # OpenBSD has a better malloc than perl... |
9 | test "$usemymalloc" || usemymalloc='n' |
10 | |
11 | # Currently, vfork(2) is not a real win over fork(2) but this will |
12 | # change in a future release. |
13 | usevfork='true' |
14 | |
15 | # setre?[ug]id() have been replaced by the _POSIX_SAVED_IDS versions |
16 | # in 4.4BSD. Configure will find these but they are just emulated |
17 | # and do not have the same semantics as in 4.3BSD. |
1528c3db |
18 | d_setregid=$undef |
19 | d_setreuid=$undef |
20 | d_setrgid=$undef |
21 | d_setruid=$undef |
43051805 |
22 | |
23 | # |
24 | # Not all platforms support shared libs... |
25 | # |
26 | case `uname -m` in |
27 | alpha|mips|powerpc|vax) |
28 | d_dlopen=$undef |
29 | ;; |
30 | *) |
31 | d_dlopen=$define |
32 | d_dlerror=$define |
33 | # we use -fPIC here because -fpic is *NOT* enough for some of the |
34 | # extensions like Tk on some OpenBSD platforms (ie: sparc) |
35 | cccdlflags="-DPIC -fPIC $cccdlflags" |
36 | lddlflags="-Bforcearchive -Bshareable $lddlflags" |
37 | ;; |
38 | esac |
39 | |
1528c3db |
40 | # |
41 | # Tweaks for various versions of OpenBSD |
42 | # |
43 | case "$osvers" in |
44 | 2.5) |
45 | # OpenBSD 2.5 has broken odbm support |
46 | i_dbm=$undef |
47 | ;; |
48 | esac |
49 | |
43051805 |
50 | # OpenBSD doesn't need libcrypt but many folks keep a stub lib |
51 | # around for old NetBSD binaries. |
52 | libswanted=`echo $libswanted | sed 's/ crypt / /'` |
53 | |
43051805 |
54 | # Configure can't figure this out non-interactively |
1528c3db |
55 | d_suidsafe=$define |
43051805 |
56 | |
57 | # cc is gcc so we can do better than -O |
58 | # Allow a command-line override, such as -Doptimize=-g |
59 | test "$optimize" || optimize='-O2' |
60 | |
619ffc2b |
61 | # This script UU/usethreads.cbu will get 'called-back' by Configure |
62 | # after it has prompted the user for whether to use threads. |
63 | cat > UU/usethreads.cbu <<'EOCBU' |
64 | case "$usethreads" in |
65 | $define|true|[yY]*) |
66 | # any openbsd version dependencies with pthreads? |
67 | libswanted="$libswanted pthread" |
68 | esac |
69 | EOCBU |
70 | |
43051805 |
71 | # end |