mirror of
https://github.com/php/php-src.git
synced 2024-12-20 07:20:33 +08:00
603e3ddfc0
* PHP-5.6: Update NEWS Fix another failing test Add NEWS Fix failing tests Patch for bug #67839 (mysqli does not handle 4-byte floats correctly)
78 lines
3.0 KiB
Plaintext
78 lines
3.0 KiB
Plaintext
dnl
|
|
dnl $Id$
|
|
dnl config.m4 for mysqlnd driver
|
|
|
|
PHP_ARG_ENABLE(mysqlnd, whether to enable mysqlnd,
|
|
[ --enable-mysqlnd Enable mysqlnd explicitly, will be done implicitly
|
|
when required by other extensions], no, yes)
|
|
|
|
PHP_ARG_ENABLE(mysqlnd_compression_support, whether to disable compressed protocol support in mysqlnd,
|
|
[ --disable-mysqlnd-compression-support
|
|
Disable support for the MySQL compressed protocol in mysqlnd], yes, no)
|
|
|
|
if test -z "$PHP_ZLIB_DIR"; then
|
|
PHP_ARG_WITH(zlib-dir, for the location of libz,
|
|
[ --with-zlib-dir[=DIR] mysqlnd: Set the path to libz install prefix], no, no)
|
|
fi
|
|
|
|
dnl If some extension uses mysqlnd it will get compiled in PHP core
|
|
if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes"; then
|
|
mysqlnd_ps_sources="mysqlnd_ps.c mysqlnd_ps_codec.c"
|
|
mysqlnd_base_sources="mysqlnd.c mysqlnd_alloc.c mysqlnd_charset.c mysqlnd_wireprotocol.c \
|
|
mysqlnd_loaddata.c mysqlnd_reverse_api.c mysqlnd_net.c \
|
|
mysqlnd_statistics.c mysqlnd_driver.c mysqlnd_ext_plugin.c mysqlnd_auth.c \
|
|
mysqlnd_result.c mysqlnd_result_meta.c mysqlnd_debug.c\
|
|
mysqlnd_block_alloc.c mysqlnd_plugin.c php_mysqlnd.c"
|
|
|
|
|
|
if test "$PHP_MYSQLND_COMPRESSION_SUPPORT" != "no"; then
|
|
AC_DEFINE([MYSQLND_COMPRESSION_WANTED], 1, [Enable compressed protocol support])
|
|
fi
|
|
|
|
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
|
|
AC_CHECK_LIB(ssl, DSA_get_default_method, AC_DEFINE(HAVE_DSA_DEFAULT_METHOD, 1, [OpenSSL 0.9.7 or later]))
|
|
AC_CHECK_LIB(crypto, X509_free, AC_DEFINE(HAVE_DSA_DEFAULT_METHOD, 1, [OpenSSL 0.9.7 or later]))
|
|
|
|
PHP_SETUP_OPENSSL(MYSQLND_SHARED_LIBADD, [AC_DEFINE(MYSQLND_HAVE_SSL,1,[Enable mysqlnd code that uses OpenSSL directly])])
|
|
fi
|
|
|
|
mysqlnd_sources="$mysqlnd_base_sources $mysqlnd_ps_sources"
|
|
PHP_NEW_EXTENSION(mysqlnd, $mysqlnd_sources, $ext_shared)
|
|
PHP_ADD_BUILD_DIR([ext/mysqlnd], 1)
|
|
PHP_INSTALL_HEADERS([ext/mysqlnd/])
|
|
fi
|
|
|
|
if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes" || test "$PHP_MYSQLI" != "no"; then
|
|
PHP_ADD_BUILD_DIR([ext/mysqlnd], 1)
|
|
fi
|
|
|
|
dnl
|
|
dnl Check if the compiler supports Decimal32/64/128 types from the IEEE-754 2008 version
|
|
dnl References: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1657.pdf
|
|
dnl http://speleotrove.com/decimal/
|
|
dnl
|
|
AC_CACHE_CHECK([whether whether compiler supports Decimal32/64/128 types], ac_cv_decimal_fp_supported,[
|
|
AC_TRY_RUN( [
|
|
#include <stdio.h>
|
|
|
|
int main(int argc, char **argv) {
|
|
typedef float dec32 __attribute__((mode(SD)));
|
|
dec32 k = 99.49f;
|
|
double d2 = (double)k;
|
|
return 0;
|
|
}
|
|
],[
|
|
ac_cv_decimal_fp_supported=yes
|
|
],[
|
|
ac_cv_decimal_fp_supported=no
|
|
],[
|
|
ac_cv_decimal_fp_supported=no
|
|
])])
|
|
if test "$ac_cv_decimal_fp_supported" = "yes"; then
|
|
AC_DEFINE(HAVE_DECIMAL_FP_SUPPORT, 1, [Define if the compiler supports Decimal32/64/128 types.])
|
|
fi
|