Fw: [PHP-DEV] [PATCH] win32, PDO and the SQLite build

From: Date: Sun, 30 Apr 2006 12:39:30 +0000
Subject: Fw: [PHP-DEV] [PATCH] win32, PDO and the SQLite build
Groups: php.internals 
Request: Send a blank email to internals+get-23050@lists.php.net to get a copy of this message
erm, that should've read if (PHP_SQLITE == "yes") { - Steph
Hi Wez, The attached patch makes it possible to build either php_sqlite.dll without the PDO dependency, or php_pdo_sqlite2.dll with the PDO dependency. If ext/sqlite is built as static it 'just works' (forcing a shared build only if PDO is enabled as shared) but with the same distinctions, i.e. if there's PDO in there it has PDO support, otherwise it doesn't.


Index: ext/sqlite/CREDITS =================================================================== RCS file: /repository/php-src/ext/sqlite/CREDITS,v retrieving revision 1.7 diff -u -r1.7 CREDITS --- ext/sqlite/CREDITS 29 Apr 2004 22:57:23 -0000 1.7 +++ ext/sqlite/CREDITS 30 Apr 2006 11:39:39 -0000 @@ -1,2 +1,2 @@ -SQLite +SQLite 2.x Wez Furlong, Tal Peer, Marcus Boerger, Ilia Alshanetsky Index: ext/sqlite/config.w32 =================================================================== RCS file: /repository/php-src/ext/sqlite/config.w32,v retrieving revision 1.8.2.1 diff -u -r1.8.2.1 config.w32 --- ext/sqlite/config.w32 24 Sep 2005 15:13:13 -0000 1.8.2.1 +++ ext/sqlite/config.w32 30 Apr 2006 12:37:37 -0000 @@ -1,9 +1,9 @@ // $Id: config.w32,v 1.8.2.1 2005/09/24 15:13:13 edink Exp $ // vim:ft=javascript -ARG_WITH("sqlite", "SQLite support", "no"); +ARG_WITH("sqlite", "SQLite 2.x support", "yes"); -if (PHP_SQLITE != "no") { +if (PHP_SQLITE == "yes") { copy_and_subst(configure_module_dirname + "\\libsqlite\\src\\sqlite.h.in", configure_module_dirname + "\\libsqlite\\src\\sqlite.h", new Array( "--VERS--", file_get_contents(configure_module_dirname + "\\libsqlite\\VERSION").replace(new RegExp("[\r\n]+", "g"), ""), @@ -13,18 +13,24 @@ FSO.CopyFile(configure_module_dirname + "\\libsqlite\\src\\sqlite_config.w32.h", configure_module_dirname + "\\libsqlite\\src\\config.h"); - if (FSO.FileExists(configure_module_dirname + "\\..\\pdo\\php_pdo_driver.h")) { - PHP_SQLITE2_PDO_CFLAGS = " /DPHP_SQLITE2_HAVE_PDO=1 /I " + configure_module_dirname + "\\.."; - ADD_EXTENSION_DEP('sqlite', 'pdo') + if (PHP_PDO != "no") { + + if (PHP_PDO_SHARED) { + PHP_SQLITE_SHARED = "shared"; + } + + dllname="php_pdo_sqlite2.dll"; + PHP_SQLITE2_PDO_CFLAGS = " /D PHP_SQLITE2_HAVE_PDO=1 /I " + configure_module_dirname + "\\.."; + ADD_EXTENSION_DEP("sqlite", "pdo") } else { - PHP_SQLITE2_PDO_CFLAGS = ""; + dllname="php_sqlite.dll"; + PHP_SQLITE2_PDO_CFLAGS=""; } - + EXTENSION("sqlite", "sqlite.c sess_sqlite.c pdo_sqlite2.c", null, "/D PHP_SQLITE_EXPORTS /I " + configure_module_dirname + "/libsqlite/src" + - PHP_SQLITE2_PDO_CFLAGS); - - + PHP_SQLITE2_PDO_CFLAGS, dllname); + ADD_SOURCES(configure_module_dirname + "/libsqlite/src", "opcodes.c parse.c encode.c \ auth.c btree.c build.c delete.c expr.c func.c hash.c insert.c \ main.c os.c pager.c printf.c random.c select.c table.c tokenize.c \ @@ -35,5 +41,5 @@ if (!PHP_SQLITE_SHARED) { ADD_DEF_FILE(configure_module_dirname + "\\php_sqlite.def"); } - ADD_EXTENSION_DEP('sqlite', 'spl') + ADD_EXTENSION_DEP("sqlite", "spl") }
« previous php.internals (#23050) next »