Subject: | [PATCH] Fix building with DBI installed in local::lib |
DBI migth be installed anywhere in @INC, not just the compiled-in
site/vendor/core directories. So instead of trying to guess the header
files are based on various %Config values, just ask DBI::DBD.
See attached patch.
Subject: | 0001-Fix-building-with-DBI-installed-in-local-lib.patch |
From b9057c10bbab1ec2387732bce232aefbea9fa8f1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= <ilmari@ilmari.org>
Date: Wed, 21 Jan 2015 13:17:01 +0000
Subject: [PATCH] Fix building with DBI installed in local::lib
DBI migth be installed anywhere in @INC, not just the compiled-in
site/vendor/core directories. So instead of trying to guess the header
files are based on various %Config values, just ask DBI::DBD.
---
Makefile.PL | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/Makefile.PL b/Makefile.PL
index cc2e2ae..ea8db56 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -10,7 +10,7 @@ use Getopt::Std;
use Config;
#require 'flush.pl';
-use DBI; # The DBI must be installed before we can build a DBD
+use DBI::DBD; # The DBI must be installed before we can build a DBD
my %opts = (
'NAME' => 'DBD::DB2',
@@ -73,10 +73,8 @@ die "$envvar environment variable ($DB2) not valid.\n" unless -d $DB2;
print qq(Using DB2 in "$DB2"\n);
# --- Setup include paths and libraries
-$opts{INC} .= qq( -I"$DB2/include" -I"$Config{sitearchexp}/auto/DBI" );
-$opts{INC} .= qq(-I"$Config{installarchlib}/auto/DBI" ) if $Config{installarchlib};
-$opts{INC} .= qq(-I"$Config{installvendorarch}/auto/DBI" ) if $Config{installvendorarch};
-$opts{INC} .= qq(-I"$Config{installsitearch}/auto/DBI" ) if $Config{installsitearch};
+my $dbd_dbi_arch_dir = dbd_dbi_arch_dir();
+$opts{INC} .= qq( -I"$DB2/include" -I"$dbd_dbi_arch_dir");
$opts{dynamic_lib} = { OTHERLDFLAGS => '$(COMPOBJS) '};
# libraries required to build DBD::DB2 driver
--
2.2.1