Introduce $Config{ldlibpthname} which contains
[p5sagit/p5-mst-13.2.git] / Makefile.SH
index af2703d..79953c7 100644 (file)
@@ -29,29 +29,20 @@ ldlibpth=''
 case "$useshrplib" in
 true)
        # Prefix all runs of 'miniperl' and 'perl' with 
-       # $ldlibpth so that ./perl finds *this* libperl.so.
+       # $ldlibpth so that ./perl finds *this* shared libperl.
        ldlibpth="LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH"
 
        pldlflags="$cccdlflags"
-       # NeXT-4 specific stuff.  Can't we do this in the hint file?
        case "${osname}${osvers}" in
        next4*)
                ld=libtool
                lddlflags="-dynamic -undefined warning -framework System \
                -compatibility_version 1 -current_version $patchlevel \
                -prebind -seg1addr 0x27000000 -install_name \$(shrpdir)/\$@"
-               # NeXT uses a different name.
-               ldlibpth="DYLD_LIBRARY_PATH=`pwd`:$DYLD_LIBRARY_PATH"
                ;;
-       rhapsody*)
-               ldlibpth="DYLD_LIBRARY_PATH=`pwd`/Perl:$DYLD_LIBRARY_PATH"
-               ;;
-       cygwin*)        ldlibpth="PATH='`pwd`:$PATH'"
+       cygwin*)
                linklibperl="-lperl"
                ;;
-       os2*)   # OS/2 doesn't need anything special for LD_LIBRARY_PATH.
-               ldlibpth=''
-               ;;
        sunos*)
                linklibperl="-lperl"
                ;;
@@ -68,15 +59,27 @@ true)
                esac
                shrpldflags="$shrpldflags $ldflags $libs $cryptlib"
                linklibperl="-L $archlibexp/CORE -L `pwd | sed 's/\/UU$//'` -lperl"
-               ldlibpth="LIBPATH=`pwd`:${LIBPATH}"
                ;;
        hpux*)
                linklibperl="-L `pwd | sed 's/\/UU$//'` -Wl,+s -Wl,+b$archlibexp/CORE -lperl"
-               ldlibpth="SHLIB_PATH=`pwd`:${SHLIB_PATH}"
-               ;;
-       beos*)  ldlibpth="LIBRARY_PATH=`pwd`:$LIBRARY_PATH"
                ;;
        esac
+       case "$ldlibpthname" in
+       '') ;;
+       *)
+           case "$osname" in
+           os2)
+               ldlibpth=''
+               ;;
+           rhapsody)
+               eval "ldlibpth=\"$ldlibpthname=`pwd`/Perl:\$$ldlibpthname\""
+               ;;
+           *)
+               eval "ldlibpth=\"$ldlibpthname=`pwd`:\$$ldlibpthname\""
+               ;;
+           esac
+           ;;
+        esac
        ;;
 *)     pldlflags=''
        ;;
@@ -152,7 +155,7 @@ LLIBPERL= $linklibperl
 SHRPENV = $shrpenv
 
 # The following is used to include the current directory in
-# LD_LIBRARY_PATH if you are building a shared libperl.so.
+# the dynamic loader path you are building a shared libperl.
 LDLIBPTH = $ldlibpth
 
 dynamic_ext = $dynamic_list
@@ -311,6 +314,10 @@ case "$osname" in
 aix)
        $spitshell >>Makefile <<!GROK!THIS!
 LIBS                   = $libs
+# In AIX we need to change this for building Perl itself from
+# its earlier definition (which is for building external
+# extensions *after* Perl has been built and installed)
+CCDLFLAGS              = `echo $ccdlflags|sed -e 's@-bE:.*/perl\.exp@-bE:perl.exp@'`
 
 !GROK!THIS!
        case "$useshrplib" in