mySQL integration and GUI
[tomato.git] / release / src / router / php / ext / mysqlnd / config9.m4
blob09aca5af8a559fc9f53fea21777dbb13459d0d4c
1 dnl
2 dnl $Id$
3 dnl config.m4 for mysqlnd driver
5 PHP_ARG_ENABLE(mysqlnd, whether to enable mysqlnd,
6   [  --enable-mysqlnd        Enable mysqlnd explicitly, will be done implicitly
7                           when required by other extensions], no, yes)
9 PHP_ARG_ENABLE(mysqlnd_compression_support, whether to disable compressed protocol support in mysqlnd,
10 [  --disable-mysqlnd-compression-support
11                           Disable support for the MySQL compressed protocol in mysqlnd], yes, no)
13 if test -z "$PHP_ZLIB_DIR"; then
14   PHP_ARG_WITH(zlib-dir, for the location of libz,
15   [  --with-zlib-dir[=DIR]     mysqlnd: Set the path to libz install prefix], no, no)
18 dnl If some extension uses mysqlnd it will get compiled in PHP core
19 if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes"; then
20   mysqlnd_ps_sources="mysqlnd_ps.c mysqlnd_ps_codec.c"
21   mysqlnd_base_sources="mysqlnd.c mysqlnd_alloc.c mysqlnd_bt.c mysqlnd_charset.c mysqlnd_wireprotocol.c \
22                    mysqlnd_loaddata.c mysqlnd_reverse_api.c mysqlnd_net.c \
23                    mysqlnd_statistics.c mysqlnd_driver.c mysqlnd_ext_plugin.c mysqlnd_auth.c \
24                                    mysqlnd_result.c mysqlnd_result_meta.c mysqlnd_debug.c\
25                                    mysqlnd_block_alloc.c mysqlnd_plugin.c php_mysqlnd.c"
28   if test "$PHP_MYSQLND_COMPRESSION_SUPPORT" != "no"; then
29     AC_DEFINE([MYSQLND_COMPRESSION_WANTED], 1, [Enable compressed protocol support])
30   fi
32   AC_DEFINE([MYSQLND_SSL_SUPPORTED], 1, [Enable core mysqlnd SSL code])
34   test -z "$PHP_OPENSSL" && PHP_OPENSSL=no
36   if test "$PHP_OPENSSL" != "no" || test "$PHP_OPENSSL_DIR" != "no"; then
37     AC_CHECK_LIB(ssl, DSA_get_default_method, AC_DEFINE(HAVE_DSA_DEFAULT_METHOD, 1, [OpenSSL 0.9.7 or later]))
38     AC_CHECK_LIB(crypto, X509_free, AC_DEFINE(HAVE_DSA_DEFAULT_METHOD, 1, [OpenSSL 0.9.7 or later]))
40     PHP_SETUP_OPENSSL(MYSQLND_SHARED_LIBADD, [AC_DEFINE(MYSQLND_HAVE_SSL,1,[Enable mysqlnd code that uses OpenSSL directly])])
41   fi
43   mysqlnd_sources="$mysqlnd_base_sources $mysqlnd_ps_sources"
44   PHP_NEW_EXTENSION(mysqlnd, $mysqlnd_sources, $ext_shared)
45   PHP_ADD_BUILD_DIR([ext/mysqlnd], 1)
46   PHP_INSTALL_HEADERS([ext/mysqlnd/])
49 if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes" || test "$PHP_MYSQLI" != "no"; then
50   PHP_ADD_BUILD_DIR([ext/mysqlnd], 1)
52   dnl This creates a file so it has to be after above macros
53   PHP_CHECK_TYPES([int8 uint8 int16 uint16 int32 uint32 uchar ulong int8_t uint8_t int16_t uint16_t int32_t uint32_t int64_t uint64_t], [
54     ext/mysqlnd/php_mysqlnd_config.h
55   ],[
56 #ifdef HAVE_SYS_TYPES_H
57 #include <sys/types.h>
58 #endif
59 #ifdef HAVE_STDINT_H
60 #include <stdint.h>
61 #endif
62   ])