1dnl config.m4 for mysqlnd driver 2 3PHP_ARG_ENABLE(mysqlnd, whether to enable mysqlnd, 4 [ --enable-mysqlnd Enable mysqlnd explicitly, will be done implicitly 5 when required by other extensions], no, yes) 6 7PHP_ARG_ENABLE(mysqlnd_compression_support, whether to disable compressed protocol support in mysqlnd, 8[ --disable-mysqlnd-compression-support 9 Disable support for the MySQL compressed protocol in mysqlnd], yes, no) 10 11if test -z "$PHP_ZLIB_DIR"; then 12 PHP_ARG_WITH(zlib-dir, for the location of libz, 13 [ --with-zlib-dir[=DIR] mysqlnd: Set the path to libz install prefix], no, no) 14fi 15 16dnl If some extension uses mysqlnd it will get compiled in PHP core 17if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes"; then 18 mysqlnd_ps_sources="mysqlnd_ps.c mysqlnd_ps_codec.c" 19 mysqlnd_base_sources="mysqlnd_connection.c mysqlnd_alloc.c mysqlnd_charset.c mysqlnd_wireprotocol.c \ 20 mysqlnd_loaddata.c mysqlnd_reverse_api.c mysqlnd_vio.c mysqlnd_protocol_frame_codec.c \ 21 mysqlnd_statistics.c mysqlnd_driver.c mysqlnd_ext_plugin.c mysqlnd_auth.c \ 22 mysqlnd_result.c mysqlnd_result_meta.c mysqlnd_debug.c mysqlnd_commands.c \ 23 mysqlnd_block_alloc.c mysqlnd_read_buffer.c mysqlnd_plugin.c php_mysqlnd.c" 24 25 26 if test "$PHP_MYSQLND_COMPRESSION_SUPPORT" != "no"; then 27 AC_DEFINE([MYSQLND_COMPRESSION_WANTED], 1, [Enable compressed protocol support]) 28 fi 29 30 AC_DEFINE([MYSQLND_SSL_SUPPORTED], 1, [Enable core mysqlnd SSL code]) 31 32 test -z "$PHP_OPENSSL" && PHP_OPENSSL=no 33 34 if test "$PHP_OPENSSL" != "no" || test "$PHP_OPENSSL_DIR" != "no"; then 35 AC_CHECK_LIB(ssl, DSA_get_default_method, AC_DEFINE(HAVE_DSA_DEFAULT_METHOD, 1, [OpenSSL 0.9.7 or later])) 36 AC_CHECK_LIB(crypto, X509_free, AC_DEFINE(HAVE_DSA_DEFAULT_METHOD, 1, [OpenSSL 0.9.7 or later])) 37 38 PHP_SETUP_OPENSSL(MYSQLND_SHARED_LIBADD, [AC_DEFINE(MYSQLND_HAVE_SSL,1,[Enable mysqlnd code that uses OpenSSL directly])]) 39 fi 40 41 mysqlnd_sources="$mysqlnd_base_sources $mysqlnd_ps_sources" 42 PHP_NEW_EXTENSION(mysqlnd, $mysqlnd_sources, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) 43 PHP_ADD_BUILD_DIR([ext/mysqlnd], 1) 44 PHP_INSTALL_HEADERS([ext/mysqlnd/]) 45fi 46 47if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes" || test "$PHP_MYSQLI" != "no"; then 48 PHP_ADD_BUILD_DIR([ext/mysqlnd], 1) 49fi 50