forked from pool/perl-DBD-SQLite
45 lines
1.7 KiB
Diff
45 lines
1.7 KiB
Diff
--- DBD-SQLite-1.10/Makefile.PL.orig 2005-06-20 14:45:11.000000000 +0200
|
|
+++ DBD-SQLite-1.10/Makefile.PL 2005-12-02 21:01:25.000000000 +0100
|
|
@@ -65,7 +65,7 @@
|
|
|
|
# Now, check for a compatible sqlite3
|
|
unless ($force_local) {
|
|
- my ($dir, $file, $fh, $version);
|
|
+ my ($dir, $file, $fh, $version, $version2);
|
|
print "Checking installed SQLite version...\n";
|
|
if ($sqlite_inc) {
|
|
open($fh, '< ' . File::Spec->catfile($sqlite_inc, 'sqlite3.h'))
|
|
@@ -84,6 +84,12 @@
|
|
next unless (-f $file);
|
|
open($fh, "< $file") or die "Error opening $file: $!";
|
|
while (defined($_ = <$fh>)) {
|
|
+ if (/\#define\s+SQLITE_VERSION\s+"(\d+)\.(\d+).(\d+)"/) {
|
|
+ $version2 = 0+sprintf "%d%03d%03d", $1,$2,$3;
|
|
+ # jw 2005-12-02
|
|
+ # I hate it! sqlite broke their SQLITE_VERSION_NUMBER
|
|
+ # again. They say 3000000 although they are 3.2.7
|
|
+ }
|
|
if (/\#define\s+SQLITE_VERSION_NUMBER\s+(\d+)/) {
|
|
$version = $1;
|
|
last;
|
|
@@ -93,14 +99,18 @@
|
|
last if $version;
|
|
}
|
|
}
|
|
+ $version = $version2 unless defined $version;
|
|
+ $version = $version2 if defined $version2 and $version2 > $version;
|
|
+
|
|
unless ($version && ($version >= 3001003)) {
|
|
+ warn "sqlite3.h found of version $version\n" if $version;
|
|
warn "SQLite version must be at least 3.1.3. No header file at that\n";
|
|
warn "version or higher was found. Using the local version instead.\n";
|
|
$force_local = 1;
|
|
undef $sqlite_lib;
|
|
undef $sqlite_inc;
|
|
} else {
|
|
- print "Looks good\n";
|
|
+ print "Looks good ($version)\n";
|
|
}
|
|
}
|
|
|