The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
diff -rc perl5.005_03.orig/Configure perl5.005_03/Configure
*** perl5.005_03.orig/Configure	Sun Mar 28 17:12:57 1999
--- perl5.005_03/Configure	Sun Sep 17 22:19:16 2000
***************
*** 208,213 ****
--- 208,214 ----
  nm=''
  nroff=''
  perl=''
+ perllibs=''
  pg=''
  pmake=''
  pr=''
***************
*** 11642,11647 ****
--- 11643,11656 ----
  shift
  extensions="$*"
  
+ : Remove libraries needed only for extensions
+ : The appropriate ext/Foo/Makefile.PL will add them back in, if
+ : necessary.
+ set X `echo " $libs " | 
+   sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'` 
+ shift
+ perllibs="$*"
+ 
  : Remove build directory name from cppstdin so it can be used from
  : either the present location or the final installed location.
  echo " "
***************
*** 12183,12188 ****
--- 12192,12198 ----
  patchlevel='$patchlevel'
  path_sep='$path_sep'
  perl='$perl'
+ perllibs='$perllibs'
  perladmin='$perladmin'
  perlpath='$perlpath'
  pg='$pg'
diff -rc perl5.005_03.orig/Makefile.SH perl5.005_03/Makefile.SH
*** perl5.005_03.orig/Makefile.SH	Thu Mar  4 02:35:25 1999
--- perl5.005_03/Makefile.SH	Sun Sep 17 22:21:01 2000
***************
*** 58,67 ****
  		shrpldflags="-H512 -T512 -bhalt:4 -bM:SRE -bE:perl.exp"
  		case "$osvers" in
  		3*)
! 			shrpldflags="$shrpldflags -e _nostart $ldflags $libs $cryptlib"
  			;;
  		*)
! 			shrpldflags="$shrpldflags -b noentry $ldflags $libs $cryptlib"
  			;;
  		esac
  		aixinstdir=`pwd | sed 's/\/UU$//'`
--- 58,67 ----
  		shrpldflags="-H512 -T512 -bhalt:4 -bM:SRE -bE:perl.exp"
  		case "$osvers" in
  		3*)
! 			shrpldflags="$shrpldflags -e _nostart $ldflags $perllibs $cryptlib"
  			;;
  		*)
! 			shrpldflags="$shrpldflags -b noentry $ldflags $perllibs $cryptlib"
  			;;
  		esac
  		aixinstdir=`pwd | sed 's/\/UU$//'`
***************
*** 155,161 ****
  ext = \$(dynamic_ext) \$(static_ext) \$(nonxs_ext)
  DYNALOADER = lib/auto/DynaLoader/DynaLoader\$(LIB_EXT)
  
! libs = $libs $cryptlib
  
  public = perl $suidperl utilities translators
  
--- 155,161 ----
  ext = \$(dynamic_ext) \$(static_ext) \$(nonxs_ext)
  DYNALOADER = lib/auto/DynaLoader/DynaLoader\$(LIB_EXT)
  
! libs = $perllibs $cryptlib
  
  public = perl $suidperl utilities translators
  
diff -rc perl5.005_03.orig/lib/ExtUtils/Embed.pm perl5.005_03/lib/ExtUtils/Embed.pm
*** perl5.005_03.orig/lib/ExtUtils/Embed.pm	Wed Jan  6 02:17:50 1999
--- perl5.005_03/lib/ExtUtils/Embed.pm	Sun Sep 17 22:19:16 2000
***************
*** 194,200 ****
      @path = $path ? split(/:/, $path) : @INC;
  
      push(@potential_libs, @link_args)    if scalar @link_args;
!     push(@potential_libs, $Config{libs}) if defined $std;
  
      push(@mods, static_ext()) if $std;
  
--- 194,200 ----
      @path = $path ? split(/:/, $path) : @INC;
  
      push(@potential_libs, @link_args)    if scalar @link_args;
!     push(@potential_libs, $Config{perllibs}) if defined $std;
  
      push(@mods, static_ext()) if $std;
  
diff -rc perl5.005_03.orig/lib/ExtUtils/Liblist.pm perl5.005_03/lib/ExtUtils/Liblist.pm
*** perl5.005_03.orig/lib/ExtUtils/Liblist.pm	Wed Jan  6 02:17:47 1999
--- perl5.005_03/lib/ExtUtils/Liblist.pm	Sun Sep 17 22:19:16 2000
***************
*** 16,33 ****
  
  sub _unix_os2_ext {
      my($self,$potential_libs, $verbose) = @_;
!     if ($^O =~ 'os2' and $Config{libs}) { 
  	# Dynamic libraries are not transitive, so we may need including
  	# the libraries linked against perl.dll again.
  
  	$potential_libs .= " " if $potential_libs;
! 	$potential_libs .= $Config{libs};
      }
      return ("", "", "", "") unless $potential_libs;
      warn "Potential libraries are '$potential_libs':\n" if $verbose;
  
      my($so)   = $Config{'so'};
!     my($libs) = $Config{'libs'};
      my $Config_libext = $Config{lib_ext} || ".a";
  
  
--- 16,33 ----
  
  sub _unix_os2_ext {
      my($self,$potential_libs, $verbose) = @_;
!     if ($^O =~ 'os2' and $Config{perllibs}) { 
  	# Dynamic libraries are not transitive, so we may need including
  	# the libraries linked against perl.dll again.
  
  	$potential_libs .= " " if $potential_libs;
! 	$potential_libs .= $Config{perllibs};
      }
      return ("", "", "", "") unless $potential_libs;
      warn "Potential libraries are '$potential_libs':\n" if $verbose;
  
      my($so)   = $Config{'so'};
!     my($libs) = $Config{'perllibs'};
      my $Config_libext = $Config{lib_ext} || ".a";
  
  
***************
*** 196,202 ****
      my $BC		= 1 if $cc =~ /^bcc/i;
      my $GC		= 1 if $cc =~ /^gcc/i;
      my $so		= $Config{'so'};
!     my $libs		= $Config{'libs'};
      my $libpth		= $Config{'libpth'};
      my $libext		= $Config{'lib_ext'} || ".lib";
  
--- 196,202 ----
      my $BC		= 1 if $cc =~ /^bcc/i;
      my $GC		= 1 if $cc =~ /^gcc/i;
      my $so		= $Config{'so'};
!     my $libs		= $Config{'perllibs'};
      my $libpth		= $Config{'libpth'};
      my $libext		= $Config{'lib_ext'} || ".lib";
  
***************
*** 336,342 ****
                   $self->{CCFLAS}   || $Config{'ccflags'};
    @crtls = ( ($dbgqual =~ m-/Debug-i ? $Config{'dbgprefix'} : '')
                . 'PerlShr/Share' );
!   push(@crtls, grep { not /\(/ } split /\s+/, $Config{'libs'});
    push(@crtls, grep { not /\(/ } split /\s+/, $Config{'libc'});
    # In general, we pass through the basic libraries from %Config unchanged.
    # The one exception is that if we're building in the Perl source tree, and
--- 336,342 ----
                   $self->{CCFLAS}   || $Config{'ccflags'};
    @crtls = ( ($dbgqual =~ m-/Debug-i ? $Config{'dbgprefix'} : '')
                . 'PerlShr/Share' );
!   push(@crtls, grep { not /\(/ } split /\s+/, $Config{'perllibs'});
    push(@crtls, grep { not /\(/ } split /\s+/, $Config{'libc'});
    # In general, we pass through the basic libraries from %Config unchanged.
    # The one exception is that if we're building in the Perl source tree, and
***************
*** 626,632 ****
  =item *
  
  If C<$potential_libs> is empty, the return value will be empty.
! Otherwise, the libraries specified by C<$Config{libs}> (see Config.pm)
  will be appended to the list of C<$potential_libs>.  The libraries
  will be searched for in the directories specified in C<$potential_libs>,
  C<$Config{libpth}>, and in C<$Config{installarchlib}/CORE>.
--- 626,632 ----
  =item *
  
  If C<$potential_libs> is empty, the return value will be empty.
! Otherwise, the libraries specified by C<$Config{perllibs}> (see Config.pm)
  will be appended to the list of C<$potential_libs>.  The libraries
  will be searched for in the directories specified in C<$potential_libs>,
  C<$Config{libpth}>, and in C<$Config{installarchlib}/CORE>.
***************
*** 670,676 ****
  alphanumeric characters are treated as flags.  Unknown flags will be ignored.
  
  An entry that matches C</:nodefault/i> disables the appending of default
! libraries found in C<$Config{libs}> (this should be only needed very rarely).
  
  An entry that matches C</:nosearch/i> disables all searching for
  the libraries specified after it.  Translation of C<-Lfoo> and
--- 670,676 ----
  alphanumeric characters are treated as flags.  Unknown flags will be ignored.
  
  An entry that matches C</:nodefault/i> disables the appending of default
! libraries found in C<$Config{perllibs}> (this should be only needed very rarely).
  
  An entry that matches C</:nosearch/i> disables all searching for
  the libraries specified after it.  Translation of C<-Lfoo> and
***************
*** 680,686 ****
  
  An entry that matches C</:search/i> reenables searching for
  the libraries specified after it.  You can put it at the end to
! enable searching for default libraries specified by C<$Config{libs}>.
  
  =item *
  
--- 680,686 ----
  
  An entry that matches C</:search/i> reenables searching for
  the libraries specified after it.  You can put it at the end to
! enable searching for default libraries specified by C<$Config{perllibs}>.
  
  =item *
  
diff -rc perl5.005_03.orig/lib/ExtUtils/MM_Unix.pm perl5.005_03/lib/ExtUtils/MM_Unix.pm
*** perl5.005_03.orig/lib/ExtUtils/MM_Unix.pm	Fri Mar  5 00:34:20 1999
--- perl5.005_03/lib/ExtUtils/MM_Unix.pm	Sun Sep 17 22:19:16 2000
***************
*** 2284,2290 ****
  MAP_STATIC    = ",
  join(" \\\n\t", reverse sort keys %static), "
  
! MAP_PRELIBS   = $Config::Config{libs} $Config::Config{cryptlib}
  ";
  
      if (defined $libperl) {
--- 2284,2290 ----
  MAP_STATIC    = ",
  join(" \\\n\t", reverse sort keys %static), "
  
! MAP_PRELIBS   = $Config::Config{perllibs} $Config::Config{cryptlib}
  ";
  
      if (defined $libperl) {