be defensive about setting {host,group,pass}cat (from Andy Dougherty)
[p5sagit/p5-mst-13.2.git] / hints / openbsd.sh
CommitLineData
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#
c347f277 7# To build with distribution paths, use:
8# ./Configure -des -Dopenbsd_distribution
9#
43051805 10
11# OpenBSD has a better malloc than perl...
12test "$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.
16usevfork='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 21d_setregid=$undef
22d_setreuid=$undef
23d_setrgid=$undef
24d_setruid=$undef
43051805 25
26#
27# Not all platforms support shared libs...
28#
29case `uname -m` in
30alpha|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 ;;
41esac
42
1528c3db 43#
44# Tweaks for various versions of OpenBSD
45#
46case "$osvers" in
472.5)
48 # OpenBSD 2.5 has broken odbm support
49 i_dbm=$undef
50 ;;
51esac
52
43051805 53# OpenBSD doesn't need libcrypt but many folks keep a stub lib
54# around for old NetBSD binaries.
55libswanted=`echo $libswanted | sed 's/ crypt / /'`
56
43051805 57# Configure can't figure this out non-interactively
1528c3db 58d_suidsafe=$define
43051805 59
60# cc is gcc so we can do better than -O
61# Allow a command-line override, such as -Doptimize=-g
62test "$optimize" || optimize='-O2'
63
619ffc2b 64# This script UU/usethreads.cbu will get 'called-back' by Configure
65# after it has prompted the user for whether to use threads.
66cat > UU/usethreads.cbu <<'EOCBU'
67case "$usethreads" in
68$define|true|[yY]*)
69 # any openbsd version dependencies with pthreads?
70 libswanted="$libswanted pthread"
71esac
72EOCBU
73
c347f277 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
76case "$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 ;;
89esac
90
43051805 91# end