home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / perl560.zip / hints / openbsd.sh < prev    next >
Text File  |  2000-03-22  |  3KB  |  102 lines

  1. # hints/openbsd.sh
  2. #
  3. # hints file for OpenBSD; Todd Miller <millert@openbsd.org>
  4. # Edited to allow Configure command-line overrides by
  5. #  Andy Dougherty <doughera@lafcol.lafayette.edu>
  6. #
  7. # To build with distribution paths, use:
  8. #    ./Configure -des -Dopenbsd_distribution=defined
  9. #
  10.  
  11. # OpenBSD has a better malloc than perl...
  12. test "$usemymalloc" || usemymalloc='n'
  13.  
  14. # Currently, vfork(2) is not a real win over fork(2) but this will
  15. # change starting with OpenBSD 2.7.
  16. usevfork='true'
  17.  
  18. # setre?[ug]id() have been replaced by the _POSIX_SAVED_IDS versions
  19. # in 4.4BSD.  Configure will find these but they are just emulated
  20. # and do not have the same semantics as in 4.3BSD.
  21. d_setregid=$undef
  22. d_setreuid=$undef
  23. d_setrgid=$undef
  24. d_setruid=$undef
  25.  
  26. #
  27. # Not all platforms support dynamic loading...
  28. #
  29. case `arch` in
  30. OpenBSD.alpha|OpenBSD.mips|OpenBSD.powerpc|OpenBSD.vax)
  31.     usedl=$undef
  32.     ;;
  33. *)
  34.     usedl=$define
  35.     d_dlopen=$define
  36.     d_dlerror=$define
  37.     # we use -fPIC here because -fpic is *NOT* enough for some of the
  38.     # extensions like Tk on some OpenBSD platforms (ie: sparc)
  39.     cccdlflags="-DPIC -fPIC $cccdlflags"
  40.     lddlflags="-Bshareable $lddlflags"
  41.     ;;
  42. esac
  43.  
  44. #
  45. # Tweaks for various versions of OpenBSD
  46. #
  47. case "$osvers" in
  48. 2.5)
  49.     # OpenBSD 2.5 has broken odbm support
  50.     i_dbm=$undef
  51.     ;;
  52. esac
  53.  
  54. # OpenBSD doesn't need libcrypt but many folks keep a stub lib
  55. # around for old NetBSD binaries.
  56. libswanted=`echo $libswanted | sed 's/ crypt / /'`
  57.  
  58. # Configure can't figure this out non-interactively
  59. d_suidsafe=$define
  60.  
  61. # cc is gcc so we can do better than -O
  62. # Allow a command-line override, such as -Doptimize=-g
  63. test "$optimize" || optimize='-O2'
  64.  
  65. # This script UU/usethreads.cbu will get 'called-back' by Configure 
  66. # after it has prompted the user for whether to use threads.
  67. cat > UU/usethreads.cbu <<'EOCBU'
  68. case "$usethreads" in
  69. $define|true|[yY]*)
  70.     # any openbsd version dependencies with pthreads?
  71.     ccflags="-pthread $ccflags"
  72.     ldflags="-pthread $ldflags"
  73.     libswanted="$libswanted pthread"
  74.     # This is strange.
  75.     usevfork="$undef"
  76. esac
  77. EOCBU
  78.  
  79. # When building in the OpenBSD tree we use different paths
  80. # This is only part of the story, the rest comes from config.over
  81. case "$openbsd_distribution" in
  82. ''|$undef|false) ;;
  83. *)
  84.     # We put things in /usr, not /usr/local
  85.     prefix='/usr'
  86.     prefixexp='/usr'
  87.     sysman='/usr/share/man/man1'
  88.     libpth='/usr/lib'
  89.     glibpth='/usr/lib'
  90.     # Ports installs non-std libs in /usr/local/lib so look there too
  91.     locincpth='/usr/local/include'
  92.     loclibpth='/usr/local/lib'
  93.     # Link perl with shared libperl
  94.     if [ "$usedl" = "$define" -a -r shlib_version ]; then
  95.         useshrplib=true
  96.         libperl=`. ./shlib_version; echo libperl.so.${major}.${minor}`
  97.     fi
  98.     ;;
  99. esac
  100.  
  101. # end
  102.