2004-02-21 23:05:52 +08:00
|
|
|
// $Id$
|
|
|
|
// vim:ft=javascript
|
|
|
|
|
2007-10-06 05:23:56 +08:00
|
|
|
// Note: The extension name is "mysqli", you enable it with "--with-mysqli".
|
|
|
|
// Passing value "mysqlnd" to it enables the bundled
|
|
|
|
// client library to connect to the MySQL server, i.e. no external MySQL
|
|
|
|
// client library is needed to perform the build.
|
|
|
|
|
2004-02-21 23:05:52 +08:00
|
|
|
ARG_WITH("mysqli", "MySQLi support", "no");
|
|
|
|
|
|
|
|
if (PHP_MYSQLI != "no") {
|
2007-10-06 05:23:56 +08:00
|
|
|
mysqli_source =
|
|
|
|
"mysqli.c " +
|
|
|
|
"mysqli_api.c " +
|
|
|
|
"mysqli_driver.c " +
|
|
|
|
"mysqli_embedded.c " +
|
|
|
|
"mysqli_exception.c " +
|
|
|
|
"mysqli_fe.c " +
|
|
|
|
"mysqli_nonapi.c " +
|
|
|
|
"mysqli_prop.c " +
|
2010-05-18 18:39:26 +08:00
|
|
|
"mysqli_result_iterator.c " +
|
2007-10-06 05:23:56 +08:00
|
|
|
"mysqli_report.c " +
|
|
|
|
"mysqli_warning.c";
|
|
|
|
|
2008-04-08 15:45:49 +08:00
|
|
|
if (PHP_MYSQLI == "yes" || PHP_MYSQLI == "mysqlnd") {
|
2014-10-15 18:08:25 +08:00
|
|
|
EXTENSION("mysqli", mysqli_source, PHP_MYSQLI_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
|
2008-04-08 15:45:49 +08:00
|
|
|
AC_DEFINE('MYSQLI_USE_MYSQLND', 1, 'Using MySQL native driver');
|
|
|
|
AC_DEFINE('HAVE_MYSQLILIB', 1, 'Have MySQLi library');
|
|
|
|
ADD_EXTENSION_DEP('mysqli', 'mysqlnd', true);
|
2008-06-24 02:40:29 +08:00
|
|
|
MESSAGE("\tmysqlnd build");
|
2010-12-12 06:18:10 +08:00
|
|
|
PHP_INSTALL_HEADERS("ext/mysqli", "php_mysqli_structs.h");
|
2008-04-08 15:45:49 +08:00
|
|
|
} else {
|
2007-10-06 05:23:56 +08:00
|
|
|
if (CHECK_LIB("libmysql.lib", "mysqli", PHP_MYSQLI) &&
|
|
|
|
CHECK_HEADER_ADD_INCLUDE("mysql.h", "CFLAGS_MYSQLI", PHP_MYSQLI +
|
|
|
|
"\\include;" + PHP_PHP_BUILD +
|
|
|
|
"\\include\\mysql;" + PHP_MYSQLI)) {
|
2014-10-15 18:08:25 +08:00
|
|
|
EXTENSION("mysqli", mysqli_source, PHP_MYSQLI_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
|
2007-10-06 05:23:56 +08:00
|
|
|
AC_DEFINE('HAVE_MYSQLILIB', 1, 'Have MySQLi library');
|
2008-06-24 02:40:29 +08:00
|
|
|
MESSAGE("\tlibmysql build");
|
2010-12-12 06:18:10 +08:00
|
|
|
PHP_INSTALL_HEADERS("ext/mysqli", "php_mysqli_structs.h");
|
2007-10-06 05:23:56 +08:00
|
|
|
} else {
|
|
|
|
WARNING("mysqli not enabled; libraries and headers not found");
|
2008-06-24 02:40:29 +08:00
|
|
|
PHP_MYSQLI = "no"
|
2007-10-06 05:23:56 +08:00
|
|
|
}
|
2004-02-21 23:05:52 +08:00
|
|
|
}
|
|
|
|
}
|