xref: /PHP-5.3/ext/pdo_sqlite/config.w32 (revision cd5e3b16)
1// $Id$
2// vim:ft=javascript
3
4ARG_WITH("pdo-sqlite", "for pdo_sqlite support", "no");
5
6if (PHP_PDO_SQLITE != "no") {
7	EXTENSION("pdo_sqlite", "pdo_sqlite.c sqlite_driver.c sqlite_statement.c", null, "/DSQLITE_THREADSAFE=" + (PHP_ZTS == "yes" ? "1" : "0") + " /D SQLITE_ENABLE_FTS3=1 /D SQLITE_ENABLE_COLUMN_METADATA=1 /D SQLITE_CORE=1 /I" + configure_module_dirname + "/../sqlite3/libsqlite /I" + configure_module_dirname);
8
9	ADD_EXTENSION_DEP('pdo_sqlite', 'pdo');
10	// If pdo_sqlite is static, and sqlite3 is also static, then we don't add a second copy of the sqlite3 libs
11	if (PHP_PDO_SQLITE_SHARED || PHP_SQLITE3_SHARED || PHP_SQLITE3 == 'no') {
12		ADD_SOURCES(configure_module_dirname + "/../sqlite3/libsqlite", "sqlite3.c", "pdo_sqlite");
13	}
14}
15
16ARG_WITH("pdo-sqlite-external", "for pdo_sqlite support from an external dll", "no");
17if (PHP_PDO_SQLITE_EXTERNAL != "no") {
18	if (CHECK_HEADER_ADD_INCLUDE("sqlite3.h", "CFLAGS_PDO_SQLITE_EXTERNAL", PHP_PDO_SQLITE_EXTERNAL + ";" + PHP_PHP_BUILD + "\\include\\sqlite3") &&
19	CHECK_LIB("sqlite3-import.lib", "pdo_sqlite_external", PHP_PDO_SQLITE_EXTERNAL + ";" + PHP_PHP_BUILD + "\\lib")
20	&& ADD_EXTENSION_DEP('pdo_sqlite_external', 'pdo') ) {
21		EXTENSION("pdo_sqlite_external", "pdo_sqlite.c sqlite_driver.c sqlite_statement.c", null, "/I" + configure_module_dirname, null, "ext\\pdo_sqlite_external");
22	} else {
23		WARNING("pdo-sqlite-external support can't be enabled, libraries or headers are missing")
24		PHP_PDO_SQLITE_EXTERNAL = "no"
25	}
26}
27