From 5079785043e4c6884f73006b0d2ec276d2121a4a Mon Sep 17 00:00:00 2001 From: David Golden Date: Wed, 21 Jan 2009 12:42:57 +0000 Subject: 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. --- ext/DB_File/DB_File.pm | 2 +- ext/DB_File/Makefile.PL | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'ext') 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', -- cgit v1.2.1