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_embedded.c " + 16 "mysqli_exception.c " + 17 "mysqli_fe.c " + 18 "mysqli_nonapi.c " + 19 "mysqli_prop.c " + 20 "mysqli_result_iterator.c " + 21 "mysqli_report.c " + 22 "mysqli_warning.c"; 23 24 if (PHP_MYSQLI == "yes" || PHP_MYSQLI == "mysqlnd") { 25 EXTENSION("mysqli", mysqli_source, PHP_MYSQLI_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"); 26 AC_DEFINE('MYSQLI_USE_MYSQLND', 1, 'Using MySQL native driver'); 27 AC_DEFINE('HAVE_MYSQLILIB', 1, 'Have MySQLi library'); 28 ADD_EXTENSION_DEP('mysqli', 'mysqlnd', true); 29 MESSAGE("\tmysqlnd build"); 30 PHP_INSTALL_HEADERS("ext/mysqli", "php_mysqli_structs.h"); 31 } else { 32 if (CHECK_LIB("libmysql.lib", "mysqli", PHP_MYSQLI) && 33 CHECK_HEADER_ADD_INCLUDE("mysql.h", "CFLAGS_MYSQLI", PHP_MYSQLI + 34 "\\include;" + PHP_PHP_BUILD + 35 "\\include\\mysql;" + PHP_MYSQLI)) { 36 EXTENSION("mysqli", mysqli_source, PHP_MYSQLI_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"); 37 AC_DEFINE('HAVE_MYSQLILIB', 1, 'Have MySQLi library'); 38 MESSAGE("\tlibmysql build"); 39 PHP_INSTALL_HEADERS("ext/mysqli", "php_mysqli_structs.h"); 40 } else { 41 WARNING("mysqli not enabled; libraries and headers not found"); 42 PHP_MYSQLI = "no" 43 } 44 } 45} 46