Commit | Line | Data |
---|---|---|
43051805 GS |
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 | # | |
c347f277 TM |
7 | # To build with distribution paths, use: |
8 | # ./Configure -des -Dopenbsd_distribution | |
9 | # | |
43051805 GS |
10 | |
11 | # OpenBSD has a better malloc than perl... | |
12 | test "$usemymalloc" || usemymalloc='n' | |
13 | ||
14 | # Currently, vfork(2) is not a real win over fork(2) but this will | |
15 | # change in a future release. | |
16 | usevfork='true' | |
17 | ||
18 | # setre?[ug]id() have been replaced by the _POSIX_SAVED_IDS versions | |
19 | # in 4.4BSD. Configure will find these but they are just emulated | |
20 | # and do not have the same semantics as in 4.3BSD. | |
1528c3db TM |
21 | d_setregid=$undef |
22 | d_setreuid=$undef | |
23 | d_setrgid=$undef | |
24 | d_setruid=$undef | |
43051805 GS |
25 | |
26 | # | |
27 | # Not all platforms support shared libs... | |
28 | # | |
29 | case `uname -m` in | |
30 | alpha|mips|powerpc|vax) | |
31 | d_dlopen=$undef | |
32 | ;; | |
33 | *) | |
34 | d_dlopen=$define | |
35 | d_dlerror=$define | |
36 | # we use -fPIC here because -fpic is *NOT* enough for some of the | |
37 | # extensions like Tk on some OpenBSD platforms (ie: sparc) | |
38 | cccdlflags="-DPIC -fPIC $cccdlflags" | |
39 | lddlflags="-Bforcearchive -Bshareable $lddlflags" | |
40 | ;; | |
41 | esac | |
42 | ||
1528c3db TM |
43 | # |
44 | # Tweaks for various versions of OpenBSD | |
45 | # | |
46 | case "$osvers" in | |
47 | 2.5) | |
48 | # OpenBSD 2.5 has broken odbm support | |
49 | i_dbm=$undef | |
50 | ;; | |
51 | esac | |
52 | ||
43051805 GS |
53 | # OpenBSD doesn't need libcrypt but many folks keep a stub lib |
54 | # around for old NetBSD binaries. | |
55 | libswanted=`echo $libswanted | sed 's/ crypt / /'` | |
56 | ||
43051805 | 57 | # Configure can't figure this out non-interactively |
1528c3db | 58 | d_suidsafe=$define |
43051805 GS |
59 | |
60 | # cc is gcc so we can do better than -O | |
61 | # Allow a command-line override, such as -Doptimize=-g | |
62 | test "$optimize" || optimize='-O2' | |
63 | ||
619ffc2b JH |
64 | # This script UU/usethreads.cbu will get 'called-back' by Configure |
65 | # after it has prompted the user for whether to use threads. | |
66 | cat > UU/usethreads.cbu <<'EOCBU' | |
67 | case "$usethreads" in | |
68 | $define|true|[yY]*) | |
69 | # any openbsd version dependencies with pthreads? | |
70 | libswanted="$libswanted pthread" | |
71 | esac | |
72 | EOCBU | |
73 | ||
c347f277 TM |
74 | # When building in the OpenBSD tree we use different paths |
75 | # This is only part of the story, the rest comes from config.over | |
76 | case "$openbsd_distribution" in | |
77 | ''|$undef|false|[nN]*) ;; | |
78 | *) | |
79 | # We put things in /usr, not /usr/local | |
80 | prefix='/usr' | |
81 | prefixexp='/usr' | |
82 | sysman='/usr/share/man/man1' | |
83 | # Never look for things in /usr/local | |
84 | glibpth='/usr/lib' | |
85 | libpth='/usr/lib' | |
86 | locincpth='' | |
87 | loclibpth='' | |
88 | ;; | |
89 | esac | |
90 | ||
43051805 | 91 | # end |