xref: /openbsd/gnu/usr.bin/perl/hints/mirbsd.sh (revision 6fb12b70)
1# $MirOS: src/gnu/usr.bin/perl/hints/mirbsd.sh,v 1.3 2007/05/07 20:32:09 tg Exp $
2#
3# hints file for MirOS by Thorsten Glaser <tg@mirbsd.de>
4# based upon hints for OpenBSD
5
6[ -z "$cc" ] && cc="${CC:-mgcc}"
7
8# MirOS has a better malloc than perl...
9usemymalloc='n'
10
11# Added by bingos.
12loclibpth="/usr/mpkg/lib /usr/local/lib"
13locincpath="/usr/mpkg/include /usr/local/include"
14ccflags="$ccflags -fhonour-copts -I/usr/mpkg/include"
15cppflags="$cppflags -fhonour-copts -I/usr/mpkg/include"
16
17# Currently, vfork(2) is not a real win over fork(2).
18usevfork="$undef"
19
20test -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)
23cccdlflags="-DPIC -fPIC $cccdlflags"
24ld=$cc
25lddlflags="-shared -fPIC $lddlflags"
26libswanted=$(echo $libswanted | sed 's/ dl / /')
27
28# We need to force ld to export symbols on ELF platforms.
29# Without this, dlopen() is crippled. All platforms are ELF.
30ldflags="-Wl,-E $ldflags"
31
32# malloc wrap works
33case "$usemallocwrap" in
34'') usemallocwrap='define' ;;
35esac
36
37# MirOS doesn't need libcrypt
38libswanted=$(echo $libswanted | sed 's/ crypt / /')
39
40# Configure can't figure this out non-interactively
41d_suidsafe=$define
42
43# cc is gcc so we can do better than -O
44# Allow a command-line override, such as -Doptimize=-g
45test "$optimize" || optimize='-O2'
46
47# This script UU/usethreads.cbu will get 'called-back' by Configure
48# after it has prompted the user for whether to use threads.
49cat > UU/usethreads.cbu <<'EOCBU'
50case "$usethreads" in
51$define|true|[yY]*)
52	ccflags="-pthread $ccflags"
53	ldflags="-pthread $ldflags"
54esac
55EOCBU
56
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
59case "$mirbsd_distribution" in
60''|$undef|false) ;;
61*)
62	# We put things in /usr, not /usr/local
63	prefix='/usr'
64	prefixexp='/usr'
65	sysman='/usr/share/man/man1'
66	libpth='/usr/lib'
67	glibpth='/usr/lib'
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
76		useshrplib=true
77		libperl=$(. ./shlib_version; echo libperl.so.${major}.${minor})
78	fi
79	;;
80esac
81
82# end
83