| 1 | # hints/bsdos.sh
|
|---|
| 2 | #
|
|---|
| 3 | # hints file for BSD/OS (adapted from bsd386.sh)
|
|---|
| 4 | # Original by Neil Bowers <neilb@khoros.unm.edu>; Tue Oct 4 12:01:34 EDT 1994
|
|---|
| 5 | # Updated by Tony Sanders <sanders@bsdi.com>; Sat Aug 23 12:47:45 MDT 1997
|
|---|
| 6 | # Added 3.1 with ELF dynamic libraries (NOT in 3.1 yet.
|
|---|
| 7 | # Estimated for 4.0) SYSV IPC tested Ok so I re-enabled.
|
|---|
| 8 | #
|
|---|
| 9 | # Updated to work in post-4.0 by Todd C. Miller <millert@openbsd.org>
|
|---|
| 10 | #
|
|---|
| 11 | # Updated for threads by "Timur I. Bakeyev" <bsdi@listserv.bat.ru>
|
|---|
| 12 | #
|
|---|
| 13 | # To override the compiler on the command line:
|
|---|
| 14 | # ./Configure -Dcc=gcc2
|
|---|
| 15 | #
|
|---|
| 16 | # The BSD/OS distribution is built with:
|
|---|
| 17 | # ./Configure -des -Dbsdos_distribution=defined
|
|---|
| 18 |
|
|---|
| 19 | signal_t='void'
|
|---|
| 20 | d_voidsig='define'
|
|---|
| 21 |
|
|---|
| 22 | usemymalloc='n'
|
|---|
| 23 |
|
|---|
| 24 | # malloc wrap works
|
|---|
| 25 | case "$usemallocwrap" in
|
|---|
| 26 | '') usemallocwrap='define' ;;
|
|---|
| 27 | esac
|
|---|
| 28 |
|
|---|
| 29 | # setre?[ug]id() have been replaced by the _POSIX_SAVED_IDS versions.
|
|---|
| 30 | # See <A HREF="http://www.bsdi.com/bsdi-man?setuid">http://www.bsdi.com/bsdi-man?setuid</A>(2)
|
|---|
| 31 | d_setregid='undef'
|
|---|
| 32 | d_setreuid='undef'
|
|---|
| 33 | d_setrgid='undef'
|
|---|
| 34 | d_setruid='undef'
|
|---|
| 35 |
|
|---|
| 36 | # we don't want to use -lnm, since exp() is busted (in 1.1 anyway)
|
|---|
| 37 | set `echo X "$libswanted "| sed -e 's/ nm / /'`
|
|---|
| 38 | shift
|
|---|
| 39 | libswanted="$*"
|
|---|
| 40 |
|
|---|
| 41 | # X libraries are in their own tree
|
|---|
| 42 | glibpth="$glibpth /usr/X11/lib"
|
|---|
| 43 | ldflags="$ldflags -L/usr/X11/lib"
|
|---|
| 44 |
|
|---|
| 45 | case "$optimize" in
|
|---|
| 46 | '') optimize='-O2' ;;
|
|---|
| 47 | esac
|
|---|
| 48 |
|
|---|
| 49 | case "$bsdos_distribution" in
|
|---|
| 50 | ''|undef|false) ;;
|
|---|
| 51 | *)
|
|---|
| 52 | d_dosuid='define'
|
|---|
| 53 | d_portable='undef'
|
|---|
| 54 | prefix='/usr/contrib'
|
|---|
| 55 | perlpath='/usr/bin/perl5'
|
|---|
| 56 | startperl='#!/usr/bin/perl5'
|
|---|
| 57 | scriptdir='/usr/contrib/bin'
|
|---|
| 58 | privlib='/usr/libdata/perl5'
|
|---|
| 59 | man1dir='/usr/contrib/man/man1'
|
|---|
| 60 | man3dir='/usr/contrib/man/man3'
|
|---|
| 61 | # phlib added by BSDI -- we share the *.ph include dir with perl4
|
|---|
| 62 | phlib="/usr/libdata/perl5/site_perl/$(arch)-$osname/include"
|
|---|
| 63 | phlibexp="/usr/libdata/perl5/site_perl/$(arch)-$osname/include"
|
|---|
| 64 | ;;
|
|---|
| 65 | esac
|
|---|
| 66 |
|
|---|
| 67 | case "$osvers" in
|
|---|
| 68 | 1.0*)
|
|---|
| 69 | # Avoid problems with HUGE_VAL in POSIX in 1.0's cc.
|
|---|
| 70 | POSIX_cflags='ccflags="$ccflags -UHUGE_VAL"'
|
|---|
| 71 | ;;
|
|---|
| 72 | 1.1*)
|
|---|
| 73 | # Use gcc2
|
|---|
| 74 | case "$cc" in
|
|---|
| 75 | '') cc='gcc2' ;;
|
|---|
| 76 | esac
|
|---|
| 77 | ;;
|
|---|
| 78 | 2.0*|2.1*|3.0*|3.1*)
|
|---|
| 79 | so='o'
|
|---|
| 80 |
|
|---|
| 81 | # default to GCC 2.X w/shared libraries
|
|---|
| 82 | case "$cc" in
|
|---|
| 83 | '') cc='shlicc2'
|
|---|
| 84 | cccdlflags=' ' ;; # Avoid the dreaded -fpic
|
|---|
| 85 | esac
|
|---|
| 86 |
|
|---|
| 87 | # default ld to shared library linker
|
|---|
| 88 | case "$ld" in
|
|---|
| 89 | '') ld='shlicc2'
|
|---|
| 90 | lddlflags='-r' ;; # this one is necessary
|
|---|
| 91 | esac
|
|---|
| 92 |
|
|---|
| 93 | # Must preload the static shared libraries.
|
|---|
| 94 | libswanted="Xpm Xaw Xmu Xt SM ICE Xext X11 $libswanted"
|
|---|
| 95 | libswanted="rpc curses termcap $libswanted"
|
|---|
| 96 | ;;
|
|---|
| 97 | 4.*)
|
|---|
| 98 | # ELF dynamic link libraries starting in 4.0
|
|---|
| 99 | useshrplib='true'
|
|---|
| 100 | so='so'
|
|---|
| 101 | dlext='so'
|
|---|
| 102 |
|
|---|
| 103 | case "$cc" in
|
|---|
| 104 | '') cc='cc' # cc is gcc2 in 4.0
|
|---|
| 105 | cccdlflags="-fPIC"
|
|---|
| 106 | ;;
|
|---|
| 107 | esac
|
|---|
| 108 |
|
|---|
| 109 | case "$ld" in
|
|---|
| 110 | '') ld='ld'
|
|---|
| 111 | lddlflags="-shared -x $lddlflags" ;;
|
|---|
| 112 | esac
|
|---|
| 113 | # Due usage of static pointer from crt.o
|
|---|
| 114 | libswanted="util $libswanted" ;;
|
|---|
| 115 | esac
|
|---|
| 116 |
|
|---|
| 117 | # This script UU/usethreads.cbu will get 'called-back' by Configure
|
|---|
| 118 | # after it has prompted the user for whether to use threads.
|
|---|
| 119 | cat > UU/usethreads.cbu <<'EOCBU'
|
|---|
| 120 | case "$usethreads" in
|
|---|
| 121 | $define|true|[yY]*)
|
|---|
| 122 | case "$osvers" in
|
|---|
| 123 | 3.*|4.*) ccflags="-D_REENTRANT $ccflags"
|
|---|
| 124 | ;;
|
|---|
| 125 | *) cat <<EOM >&4
|
|---|
| 126 | I did not know that BSD/OS $osvers supports POSIX threads.
|
|---|
| 127 |
|
|---|
| 128 | Feel free to tell perlbug@perl.org otherwise.
|
|---|
| 129 | EOM
|
|---|
| 130 | exit 1
|
|---|
| 131 | ;;
|
|---|
| 132 | esac
|
|---|
| 133 | ;;
|
|---|
| 134 | esac
|
|---|
| 135 | EOCBU
|
|---|