| 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... |
| 9 | usemymalloc='n' |
| 10 | |
| 11 | # Added by bingos. |
| 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" |
| 16 | |
| 17 | # Currently, vfork(2) is not a real win over fork(2). |
| 18 | usevfork="$undef" |
| 19 | |
| 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" |
| 24 | ld=$cc |
| 25 | lddlflags="-shared -fPIC $lddlflags" |
| 26 | libswanted=$(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. |
| 30 | ldflags="-Wl,-E $ldflags" |
| 31 | |
| 32 | # malloc wrap works |
| 33 | case "$usemallocwrap" in |
| 34 | '') usemallocwrap='define' ;; |
| 35 | esac |
| 36 | |
| 37 | # MirOS doesn't need libcrypt |
| 38 | libswanted=$(echo $libswanted | sed 's/ crypt / /') |
| 39 | |
| 40 | # Configure can't figure this out non-interactively |
| 41 | d_suidsafe=$define |
| 42 | |
| 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' |
| 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. |
| 49 | cat > UU/usethreads.cbu <<'EOCBU' |
| 50 | case "$usethreads" in |
| 51 | $define|true|[yY]*) |
| 52 | ccflags="-pthread $ccflags" |
| 53 | ldflags="-pthread $ldflags" |
| 54 | esac |
| 55 | EOCBU |
| 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 |
| 59 | case "$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 | ;; |
| 80 | esac |
| 81 | |
| 82 | # end |