This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #116785] libc_r was removed from recent versions of MidnightBSD and older versi...
[perl5.git] / hints / midnightbsd.sh
1 usevfork='true'
2 case "$usemymalloc" in
3     "") usemymalloc='n'
4         ;;
5 esac
6 libswanted=`echo $libswanted | sed 's/ malloc / /'`
7
8 objformat=`/usr/bin/objformat`
9 if [ x$objformat = xelf ]; then
10     libpth="/usr/lib /usr/local/lib"
11     glibpth="/usr/lib /usr/local/lib"
12     ldflags="-Wl,-E "
13     lddlflags="-shared "
14 else
15     if [ -e /usr/lib/aout ]; then
16         libpth="/usr/lib/aout /usr/local/lib /usr/lib"
17         glibpth="/usr/lib/aout /usr/local/lib /usr/lib"
18     fi
19     lddlflags='-Bshareable'
20 fi
21 cccdlflags='-DPIC -fPIC'
22
23 ccflags="${ccflags} -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H"
24 if /usr/bin/file -L /usr/lib/libc.so | /usr/bin/grep -vq "not stripped" ; then
25     usenm=false
26 fi
27
28 signal_t='void'
29 d_voidsig='define'
30
31 # This script UU/usethreads.cbu will get 'called-back' by Configure 
32 # after it has prompted the user for whether to use threads.
33 cat > UU/usethreads.cbu <<'EOCBU'
34 case "$usethreads" in
35 $define|true|[yY]*)
36         ldflags="-pthread $ldflags"
37         set `echo X "$libswanted "| sed -e 's/ c //'`
38         shift
39         libswanted="$*"
40         # Configure will probably pick the wrong libc to use for nm scan.
41         # The safest quick-fix is just to not use nm at all...
42         usenm=false
43
44         unset lc_r
45
46         # Even with the malloc mutexes the Perl malloc does not
47         # seem to be threadsafe in MidnightBSD?
48         case "$usemymalloc" in
49         '') usemymalloc=n ;;
50         esac
51 esac
52 EOCBU
53
54 # malloc wrap works
55 case "$usemallocwrap" in
56 '') usemallocwrap='define' ;;
57 esac