1 # $MirOS: src/gnu/usr.bin/perl/hints/mirbsd.sh,v 1.3 2007/05/07 20:32:09 tg Exp $
4 # based upon hints for OpenBSD
6 [ -z "$cc" ] && cc="${CC:-mgcc}"
8 # MirOS has a better malloc than perl...
12 loclibpth="/usr/mpkg/lib /usr/local/lib"
13 locincpath="/usr/mpkg/include /usr/local/include"
14 ccflags="$ccflags -fhonour-copts -I/usr/mpkg/include"
15 cppflags="$cppflags -fhonour-copts -I/usr/mpkg/include"
17 # Currently, vfork(2) is not a real win over fork(2).
20 test -z "$usedl" && usedl=$define
21 # We use -fPIC here because -fpic is *NOT* enough for some of the
22 # extensions like Tk on some platforms (ie: sparc)
23 cccdlflags="-DPIC -fPIC $cccdlflags"
25 lddlflags="-shared -fPIC $lddlflags"
26 libswanted=$(echo $libswanted | sed 's/ dl / /')
28 # We need to force ld to export symbols on ELF platforms.
29 # Without this, dlopen() is crippled. All platforms are ELF.
30 ldflags="-Wl,-E $ldflags"
33 case "$usemallocwrap" in
34 '') usemallocwrap='define' ;;
37 # MirOS doesn't need libcrypt
38 libswanted=$(echo $libswanted | sed 's/ crypt / /')
40 # Configure can't figure this out non-interactively
43 # cc is gcc so we can do better than -O
44 # Allow a command-line override, such as -Doptimize=-g
45 test "$optimize" || optimize='-O2'
47 # This script UU/usethreads.cbu will get 'called-back' by Configure
48 # after it has prompted the user for whether to use threads.
49 cat > UU/usethreads.cbu <<'EOCBU'
52 ccflags="-pthread $ccflags"
53 ldflags="-pthread $ldflags"
57 # When building in the MirOS tree we use different paths
58 # This is only part of the story, the rest comes from config.over
59 case "$mirbsd_distribution" in
62 # We put things in /usr, not /usr/local
65 sysman='/usr/share/man/man1'
68 # Local things, however, do go in /usr/local
69 siteprefix='/usr/local'
70 siteprefixexp='/usr/local'
71 # Ports installs non-std libs in /usr/local/lib so look there too
72 locincpth='/usr/local/include'
73 loclibpth='/usr/local/lib'
74 # Link perl with shared libperl
75 if [ "$usedl" = "$define" -a -r shlib_version ]; then
77 libperl=$(. ./shlib_version; echo libperl.so.${major}.${minor})