From: Perl 5 Porters Date: Mon, 24 Jun 1996 03:49:28 +0000 (+0000) Subject: perl 5.003: hints/bsdos.sh X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d84bea6a560458ec6168f312a9ed7883007af513;p=p5sagit%2Fp5-mst-13.2.git perl 5.003: hints/bsdos.sh Distinguish between 2.0.x and 2.1.x, and use dynamic linking in the latter --- diff --git a/hints/bsdos.sh b/hints/bsdos.sh index 2c858a6..aedf4b6 100644 --- a/hints/bsdos.sh +++ b/hints/bsdos.sh @@ -49,27 +49,7 @@ case "$osvers" in '') cc='gcc2' ;; esac ;; -2.*) - case "$osvers" in - 2.1*) # dlopen() is supported in 2.1 - usedl='true' - d_dlopen='define' - cccdlflags='none' - # pre-link against the shared C library - lddlflags='-r -lc_s.2.1.0' - - # BSD/OS 2.1 doesn't (yet) support `true' dynamic linking - # so we `preload' the shared libraries by linking - # against them; even though we don't pull in any symbols. - libswanted="Xpm Xaw Xmu Xt SM ICE Xext X11 $libswanted" - libswanted="rpc curses termcap $libswanted" - - # Use the system malloc or else you'll have dualing mallocs! - d_mymalloc='undef' - usemymalloc='n' - ;; - esac - +2.0*) # default to GCC 2.X w/shared libraries case "$cc" in '') cc='shlicc2' ;; @@ -88,4 +68,32 @@ case "$osvers" in d_setrgid='undef' d_setruid='undef' ;; +2.1*) + # Use 2.1's shlicc2 for dynamic linking + # Since cc -o is linking, use it for compiling too. + # I'm not sure whether Configure is careful about + # distinguishing between the two. + + case "$cc" in + '') cc='shlicc2' + cccdlflags=' ' ;; # Avoid the dreaded -fpic + esac + + # Link with shared libraries in 2.1 + # Turns out that shlicc2 will automatically use the + # shared libs, so don't explicitly specify -lc_s.2.1.* + case "$ld" in + '') ld='shlicc2' + lddlflags='-r' ;; # this one is necessary + esac + + # setre?[ug]id() have been replaced by the _POSIX_SAVED_IDS stuff + # in 4.4BSD-based systems (including BSD/OS 2.0 and later). + # See http://www.bsdi.com/bsdi-man?setuid(2) + # This stuff may or may not be right, but it works. + d_setregid='undef' + d_setreuid='undef' + d_setrgid='undef' + d_setruid='undef' + ;; esac