2019-03-03 23:44:16 +08:00
|
|
|
PHP_ARG_ENABLE([mysqlnd],
|
|
|
|
[whether to enable mysqlnd],
|
|
|
|
[AS_HELP_STRING([--enable-mysqlnd],
|
|
|
|
[Enable mysqlnd explicitly, will be done implicitly when required by other
|
|
|
|
extensions])],
|
|
|
|
[no],
|
|
|
|
[yes])
|
2009-11-20 16:12:14 +08:00
|
|
|
|
2019-03-03 23:44:16 +08:00
|
|
|
PHP_ARG_ENABLE([mysqlnd_compression_support],
|
|
|
|
[whether to disable compressed protocol support in mysqlnd],
|
|
|
|
[AS_HELP_STRING([--disable-mysqlnd-compression-support],
|
|
|
|
[Disable support for the MySQL compressed protocol in mysqlnd])],
|
|
|
|
[yes],
|
|
|
|
[no])
|
2009-11-20 16:12:14 +08:00
|
|
|
|
2007-07-26 07:47:33 +08:00
|
|
|
dnl If some extension uses mysqlnd it will get compiled in PHP core
|
2011-09-07 00:38:22 +08:00
|
|
|
if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes"; then
|
2011-03-24 01:14:28 +08:00
|
|
|
mysqlnd_ps_sources="mysqlnd_ps.c mysqlnd_ps_codec.c"
|
2015-11-12 20:04:58 +08:00
|
|
|
mysqlnd_base_sources="mysqlnd_connection.c mysqlnd_alloc.c mysqlnd_charset.c mysqlnd_wireprotocol.c \
|
2015-11-10 18:53:19 +08:00
|
|
|
mysqlnd_loaddata.c mysqlnd_reverse_api.c mysqlnd_vio.c mysqlnd_protocol_frame_codec.c \
|
2011-10-21 23:28:58 +08:00
|
|
|
mysqlnd_statistics.c mysqlnd_driver.c mysqlnd_ext_plugin.c mysqlnd_auth.c \
|
2015-11-10 20:14:39 +08:00
|
|
|
mysqlnd_result.c mysqlnd_result_meta.c mysqlnd_debug.c mysqlnd_commands.c \
|
2015-11-17 19:31:30 +08:00
|
|
|
mysqlnd_block_alloc.c mysqlnd_read_buffer.c mysqlnd_plugin.c php_mysqlnd.c"
|
2007-07-26 07:47:33 +08:00
|
|
|
|
2009-11-20 16:12:14 +08:00
|
|
|
|
|
|
|
if test "$PHP_MYSQLND_COMPRESSION_SUPPORT" != "no"; then
|
2019-11-26 06:54:49 +08:00
|
|
|
PKG_CHECK_MODULES([ZLIB], [zlib])
|
|
|
|
PHP_EVAL_LIBLINE($ZLIB_LIBS, MYSQLND_SHARED_LIBADD)
|
|
|
|
PHP_EVAL_INCLINE($ZLIB_CFLAGS)
|
2011-03-24 01:14:28 +08:00
|
|
|
AC_DEFINE([MYSQLND_COMPRESSION_WANTED], 1, [Enable compressed protocol support])
|
2009-11-20 16:12:14 +08:00
|
|
|
fi
|
2012-09-25 20:04:36 +08:00
|
|
|
|
|
|
|
AC_DEFINE([MYSQLND_SSL_SUPPORTED], 1, [Enable core mysqlnd SSL code])
|
|
|
|
|
|
|
|
test -z "$PHP_OPENSSL" && PHP_OPENSSL=no
|
|
|
|
|
|
|
|
if test "$PHP_OPENSSL" != "no" || test "$PHP_OPENSSL_DIR" != "no"; then
|
|
|
|
PHP_SETUP_OPENSSL(MYSQLND_SHARED_LIBADD, [AC_DEFINE(MYSQLND_HAVE_SSL,1,[Enable mysqlnd code that uses OpenSSL directly])])
|
|
|
|
fi
|
2011-03-24 01:14:28 +08:00
|
|
|
|
|
|
|
mysqlnd_sources="$mysqlnd_base_sources $mysqlnd_ps_sources"
|
2014-10-15 18:08:25 +08:00
|
|
|
PHP_NEW_EXTENSION(mysqlnd, $mysqlnd_sources, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
|
2011-03-24 01:14:28 +08:00
|
|
|
PHP_ADD_BUILD_DIR([ext/mysqlnd], 1)
|
|
|
|
PHP_INSTALL_HEADERS([ext/mysqlnd/])
|
2009-09-22 22:43:37 +08:00
|
|
|
fi
|
2009-09-25 02:01:17 +08:00
|
|
|
|
2011-09-07 00:38:22 +08:00
|
|
|
if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes" || test "$PHP_MYSQLI" != "no"; then
|
2009-09-25 02:01:17 +08:00
|
|
|
PHP_ADD_BUILD_DIR([ext/mysqlnd], 1)
|
|
|
|
fi
|