From: David Golden Date: Wed, 21 Jan 2009 12:42:57 +0000 (+0000) Subject: Make DB_File use -ldb on MSWin32 with a gcc compiler X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5079785043e4c6884f73006b0d2ec276d2121a4a;p=p5sagit%2Fp5-mst-13.2.git 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. --- diff --git a/ext/DB_File/DB_File.pm b/ext/DB_File/DB_File.pm index 58c34ef..6bf139f 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 93f3895..07007f4 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',