summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeon Brocard <acme@astray.com>2004-01-05 21:33:04 +0000
committerLeon Brocard <acme@astray.com>2004-01-05 21:33:04 +0000
commit51222f03f4d0b66a415082bbe916a7338ba2ea90 (patch)
tree465a38f98023809d8711e7bbcdb70d8a6297fe94
parent32da5aa632b2a1aa286b0b53dff5004fc3e73541 (diff)
downloadperl-51222f03f4d0b66a415082bbe916a7338ba2ea90.tar.gz
Work around bug where Linux libc's have Berekeley DB 2 in them
Patch by Paul Marquess <Paul.Marquess@btinternet.com>, DB_File's maintainer. His description: The patch is to work around a problem where some versions of Linux have a C library with Berkeley DB version 2 embedded in it. This makes life difficult if you want to build with a version of Berkeley DB other than the one embedded in libc. This problem is compounded by the way Perl used to *always* include the Berkeley DB library when it was being built. The DB_File patches solves the latter problem, by retrofitting the fix to Configure et al that was included from perl 5.6 on. I think your best course of action is to just apply the 5.00503 patch to the 5.00504 source. I just tried applying it and it seems ok. p4raw-id: //depot/maint-5.005/perl@22065
-rwxr-xr-xConfigure10
-rw-r--r--Makefile.SH6
-rw-r--r--lib/ExtUtils/Embed.pm2
-rw-r--r--lib/ExtUtils/Liblist.pm16
-rw-r--r--lib/ExtUtils/MM_Unix.pm2
5 files changed, 23 insertions, 13 deletions
diff --git a/Configure b/Configure
index 5bcdbdaa5c..3991c33002 100755
--- a/Configure
+++ b/Configure
@@ -208,6 +208,7 @@ mv=''
nm=''
nroff=''
perl=''
+perllibs=''
pg=''
pmake=''
pr=''
@@ -11642,6 +11643,14 @@ set X $dynamic_ext $static_ext $nonxs_ext
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,6 +12192,7 @@ passcat='$passcat'
patchlevel='$patchlevel'
path_sep='$path_sep'
perl='$perl'
+perllibs='$perllibs'
perladmin='$perladmin'
perlpath='$perlpath'
pg='$pg'
diff --git a/Makefile.SH b/Makefile.SH
index 61f01b5aee..c545cbf9b5 100644
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -58,10 +58,10 @@ true)
shrpldflags="-H512 -T512 -bhalt:4 -bM:SRE -bE:perl.exp"
case "$osvers" in
3*)
- shrpldflags="$shrpldflags -e _nostart $ldflags $libs $cryptlib"
+ shrpldflags="$shrpldflags -e _nostart $ldflags $perllibs $cryptlib"
;;
*)
- shrpldflags="$shrpldflags -b noentry $ldflags $libs $cryptlib"
+ shrpldflags="$shrpldflags -b noentry $ldflags $perllibs $cryptlib"
;;
esac
aixinstdir=`pwd | sed 's/\/UU$//'`
@@ -155,7 +155,7 @@ nonxs_ext = $nonxs_list
ext = \$(dynamic_ext) \$(static_ext) \$(nonxs_ext)
DYNALOADER = lib/auto/DynaLoader/DynaLoader\$(LIB_EXT)
-libs = $libs $cryptlib
+libs = $perllibs $cryptlib
public = perl $suidperl utilities translators
diff --git a/lib/ExtUtils/Embed.pm b/lib/ExtUtils/Embed.pm
index 4b56e88b26..033323e7a6 100644
--- a/lib/ExtUtils/Embed.pm
+++ b/lib/ExtUtils/Embed.pm
@@ -194,7 +194,7 @@ sub ldopts {
@path = $path ? split(/:/, $path) : @INC;
push(@potential_libs, @link_args) if scalar @link_args;
- push(@potential_libs, $Config{libs}) if defined $std;
+ push(@potential_libs, $Config{perllibs}) if defined $std;
push(@mods, static_ext()) if $std;
diff --git a/lib/ExtUtils/Liblist.pm b/lib/ExtUtils/Liblist.pm
index dae3125d90..f12cde8177 100644
--- a/lib/ExtUtils/Liblist.pm
+++ b/lib/ExtUtils/Liblist.pm
@@ -16,18 +16,18 @@ sub ext {
sub _unix_os2_ext {
my($self,$potential_libs, $verbose) = @_;
- if ($^O =~ 'os2' and $Config{libs}) {
+ 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{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{'libs'};
+ my($libs) = $Config{'perllibs'};
my $Config_libext = $Config{lib_ext} || ".a";
@@ -196,7 +196,7 @@ sub _win32_ext {
my $BC = 1 if $cc =~ /^bcc/i;
my $GC = 1 if $cc =~ /^gcc/i;
my $so = $Config{'so'};
- my $libs = $Config{'libs'};
+ my $libs = $Config{'perllibs'};
my $libpth = $Config{'libpth'};
my $libext = $Config{'lib_ext'} || ".lib";
@@ -336,7 +336,7 @@ sub _vms_ext {
$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{'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,7 +626,7 @@ Unix-OS/2 version in several respects:
=item *
If C<$potential_libs> is empty, the return value will be empty.
-Otherwise, the libraries specified by C<$Config{libs}> (see Config.pm)
+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,7 +670,7 @@ Entries in C<$potential_libs> beginning with a colon and followed by
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).
+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,7 +680,7 @@ valid files or directories.
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}>.
+enable searching for default libraries specified by C<$Config{perllibs}>.
=item *
diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm
index 5b47972a59..56ddc04ab3 100644
--- a/lib/ExtUtils/MM_Unix.pm
+++ b/lib/ExtUtils/MM_Unix.pm
@@ -2297,7 +2297,7 @@ MAP_PERLINC = @{$perlinc || []}
MAP_STATIC = ",
join(" \\\n\t", reverse sort keys %static), "
-MAP_PRELIBS = $Config::Config{libs} $Config::Config{cryptlib}
+MAP_PRELIBS = $Config::Config{perllibs} $Config::Config{cryptlib}
";
if (defined $libperl) {