xref: /PHP-8.0/ext/mysqli/config.w32 (revision 928b25cd)
1// vim:ft=javascript
2
3// Note: The extension name is "mysqli", you enable it with "--with-mysqli".
4// Passing value "mysqlnd" to it enables the bundled
5// client library to connect to the MySQL server, i.e. no external MySQL
6// client library is needed to perform the build.
7
8ARG_WITH("mysqli", "MySQLi support", "no");
9
10if (PHP_MYSQLI != "no") {
11	mysqli_source =
12		"mysqli.c " +
13		"mysqli_api.c " +
14		"mysqli_driver.c " +
15		"mysqli_exception.c " +
16		"mysqli_nonapi.c " +
17		"mysqli_prop.c " +
18		"mysqli_result_iterator.c " +
19		"mysqli_report.c " +
20		"mysqli_warning.c";
21
22	if (PHP_MYSQLI == "yes" || PHP_MYSQLI == "mysqlnd") {
23		EXTENSION("mysqli", mysqli_source, PHP_MYSQLI_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
24		AC_DEFINE('MYSQLI_USE_MYSQLND', 1, 'Using MySQL native driver');
25		AC_DEFINE('HAVE_MYSQLILIB', 1, 'Have MySQLi library');
26		ADD_EXTENSION_DEP('mysqli', 'mysqlnd', true);
27		MESSAGE("\tmysqlnd build");
28		PHP_INSTALL_HEADERS("ext/mysqli", "php_mysqli_structs.h");
29	} else {
30		if (CHECK_LIB("libmysql.lib", "mysqli", PHP_MYSQLI) &&
31			CHECK_HEADER_ADD_INCLUDE("mysql.h", "CFLAGS_MYSQLI", PHP_MYSQLI +
32										"\\include;" + PHP_PHP_BUILD +
33										"\\include\\mysql;" + PHP_MYSQLI)) {
34			EXTENSION("mysqli", mysqli_source, PHP_MYSQLI_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
35			AC_DEFINE('HAVE_MYSQLILIB', 1, 'Have MySQLi library');
36			MESSAGE("\tlibmysql build");
37			PHP_INSTALL_HEADERS("ext/mysqli", "php_mysqli_structs.h");
38		} else {
39			WARNING("mysqli not enabled; libraries and headers not found");
40			PHP_MYSQLI = "no"
41		}
42	}
43}
44