Index: DBD-SQLite-1.13/Makefile.PL --- DBD-SQLite-1.13/Makefile.PL.orig 2006-09-08 05:45:13 +0200 +++ DBD-SQLite-1.13/Makefile.PL 2007-01-08 19:32:01 +0100 @@ -10,34 +10,6 @@ } use Config; use strict; -eval { - require DBD::SQLite; - if ($DBD::SQLite::VERSION < 1.0) { - print < 1.42 ? '' : '-Dno_last_insert_id'; -my $libs = ''; -$libs .= "-L$sqlite_lib " if ($sqlite_lib); -$libs .= "-lsqlite3 " unless ($force_local); +my $inc = `@l_prefix@/bin/pkg-config sqlite3 --cflags-only-I`; +$inc =~ s/\r?\n$//s; +my $libs = `@l_prefix@/bin/pkg-config sqlite3 --libs`; +$libs =~ s/\r?\n$//s; WriteMakefile( 'NAME' => 'DBD::SQLite', 'VERSION_FROM' => 'lib/DBD/SQLite.pm', # finds $VERSION 'PREREQ_PM' => {DBI => 1.21}, # e.g., Module::Name => 1.1 'OBJECT' => ($force_local) ? '$(O_FILES)' : 'SQLite.o dbdimp.o', - 'INC' => '-I. -I$(DBI_INSTARCH_DIR)' . + 'INC' => $inc . ' -I. -I$(DBI_INSTARCH_DIR)' . (($sqlite_inc) ? " -I$sqlite_inc" : ''), - $libs ? ('LIBS' => $libs) : (), + 'LIBS' => [ $libs ], 'OPTIMIZE' => "-O2", 'DEFINE' => "-DNDEBUG=1 -DSQLITE_PTR_SZ=$Config{ptrsize}" . ( ($Config{d_usleep} || Index: DBD-SQLite-1.13/dbdimp.c --- DBD-SQLite-1.13/dbdimp.c.orig 2006-09-08 06:50:50 +0200 +++ DBD-SQLite-1.13/dbdimp.c 2007-01-08 19:32:01 +0100 @@ -394,14 +394,17 @@ sqlite_trace(3, "Execute returned %d cols\n", DBIc_NUM_FIELDS(imp_sth)); if (DBIc_NUM_FIELDS(imp_sth) == 0) { + char *defererr = strdup((char*)sqlite3_errmsg(imp_dbh->db)); while ((retval = sqlite3_step(imp_sth->stmt)) != SQLITE_DONE) { if (retval == SQLITE_ROW) { continue; } sqlite3_finalize(imp_sth->stmt); - sqlite_error(sth, (imp_xxh_t*)imp_sth, retval, (char*)sqlite3_errmsg(imp_dbh->db)); + sqlite_error(sth, (imp_xxh_t*)imp_sth, retval, defererr); + free(defererr); return -5; } + free(defererr); /* warn("Finalize\n"); */ sqlite3_reset(imp_sth->stmt); imp_sth->nrow = sqlite3_changes(imp_dbh->db); Index: DBD-SQLite-1.13/dbdimp.h --- DBD-SQLite-1.13/dbdimp.h.orig 2006-09-08 06:50:50 +0200 +++ DBD-SQLite-1.13/dbdimp.h 2007-01-08 19:32:01 +0100 @@ -4,7 +4,7 @@ #define _DBDIMP_H 1 #include "SQLiteXS.h" -#include "sqliteInt.h" +#include "sqlite3.h" /* 30 second timeout by default */ #define SQL_TIMEOUT 30000 Index: DBD-mysql-4.003/dbdimp.h --- DBD-mysql-4.003/dbdimp.h.orig 2007-01-06 20:00:08 +0100 +++ DBD-mysql-4.003/dbdimp.h 2007-01-08 19:32:01 +0100 @@ -19,6 +19,7 @@ * Header files we use */ #include /* installed by the DBI module */ +#include #include /* Comes with MySQL-devel */ #include /* Comes MySQL */ #include /* Comes with MySQL-devel */