summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorDavid Golden <dagolden@cpan.org>2009-01-21 12:42:57 +0000
committerSteve Hay <SteveHay@planit.com>2009-01-21 12:43:48 +0000
commit5079785043e4c6884f73006b0d2ec276d2121a4a (patch)
tree1ba497300755d5cb56b4d5ef9f90368a2f605313 /ext
parentdef18e4c9fd5eb589bbb50de256bb350e973ea47 (diff)
downloadperl-5079785043e4c6884f73006b0d2ec276d2121a4a.tar.gz
Make DB_File use -ldb on MSWin32 with a gcc compiler
DB_File was forcing "-llibdb" for all MSWin32 builds. That's an MSVC thing, so this patch makes it use "-ldb" if the compiler is gcc (e.g. for Strawberry Perl and friends). Paul Marquess suggested I send a patch to p5p and will update the source on CPAN when he has a dev box again. Message-Id: <1232541093-2247-1-git-send-email-dagolden@cpan.org> Plus: bump $VERSION.
Diffstat (limited to 'ext')
-rw-r--r--ext/DB_File/DB_File.pm2
-rw-r--r--ext/DB_File/Makefile.PL4
2 files changed, 4 insertions, 2 deletions
diff --git a/ext/DB_File/DB_File.pm b/ext/DB_File/DB_File.pm
index 58c34eff83..6bf139f14f 100644
--- a/ext/DB_File/DB_File.pm
+++ b/ext/DB_File/DB_File.pm
@@ -165,7 +165,7 @@ our ($db_version, $use_XSLoader, $splice_end_array, $Error);
use Carp;
-$VERSION = "1.817" ;
+$VERSION = "1.817_01" ;
$VERSION = eval $VERSION; # needed for dev releases
{
diff --git a/ext/DB_File/Makefile.PL b/ext/DB_File/Makefile.PL
index 93f3895da2..07007f475e 100644
--- a/ext/DB_File/Makefile.PL
+++ b/ext/DB_File/Makefile.PL
@@ -10,7 +10,9 @@ my $OS2 = "-DOS2" if $Config{'osname'} eq 'os2' ;
my $LIB = "-ldb" ;
# so is win32
-$LIB = "-llibdb" if $^O eq 'MSWin32' ;
+if ( $^O eq 'MSWin32' ) {
+ $LIB = $Config{cc} =~ /gcc/ ? "-ldb" : "-llibdb";
+}
WriteMakefile(
NAME => 'DB_File',