]> granicus.if.org Git - php/commitdiff
Some fancy detection for sqlite3 and pdo_sqlite3 - so the two extensions don't depend...
authorElizabeth Marie Smith <auroraeosrose@php.net>
Tue, 5 Aug 2008 20:22:53 +0000 (20:22 +0000)
committerElizabeth Marie Smith <auroraeosrose@php.net>
Tue, 5 Aug 2008 20:22:53 +0000 (20:22 +0000)
ext/pdo_sqlite/config.w32
ext/sqlite3/config.w32

index fdb19b95d6d7f14d9de9fcc758363832d896657a..f9494eee0cfd7c3ef793069385f5c8382db68661 100644 (file)
@@ -5,9 +5,12 @@ ARG_WITH("pdo-sqlite", "for pdo_sqlite support", "no");
 
 if (PHP_PDO_SQLITE != "no") {
        EXTENSION("pdo_sqlite", "pdo_sqlite.c sqlite_driver.c sqlite_statement.c", null, "/DSQLITE_THREADSAFE=1 /I" + configure_module_dirname + "/libsqlite /I" + configure_module_dirname);
-       ADD_SOURCES(configure_module_dirname + "/libsqlite", "sqlite3.c", "pdo_sqlite");
-
+       
        ADD_EXTENSION_DEP('pdo_sqlite', 'pdo');
+       // If pdo_sqlite is static, and sqlite3 is also static, then we don't add a second copy of the sqlite3 libs
+       if (PHP_PDO_SQLITE_SHARED || PHP_SQLITE3_SHARED || PHP_SQLITE3 == 'no') {
+               ADD_SOURCES(configure_module_dirname + "/../sqlite3/libsqlite", "sqlite3.c", "pdo_sqlite");
+       }
 }
 
 ARG_WITH("pdo-sqlite-external", "for pdo_sqlite support from an external dll", "no");
index 81c3c41b16acac1a13aa3e6c2e0a5b07bf2a16cc..8c766f41a96e782f2a60dcc01ca14cc9e4ea397a 100644 (file)
@@ -10,8 +10,4 @@ if (PHP_SQLITE3 != "no") {
        ADD_SOURCES(configure_module_dirname + "/libsqlite", "sqlite3.c", "sqlite3");
 
        AC_DEFINE("HAVE_SQLITE3", 1, "SQLite support");
-
-       if (!PHP_SQLITE3_SHARED) {
-               ADD_DEF_FILE(configure_module_dirname + "\\php_sqlite3.def");
-       }
 }