xref: /PHP-5.3/ext/mysqlnd/config9.m4 (revision f115235a)
1dnl
2dnl $Id$
3dnl config.m4 for mysqlnd driver
4
5PHP_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)
8
9PHP_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)
12
13if 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)
16fi
17
18dnl If some extension uses mysqlnd it will get compiled in PHP core
19if 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_charset.c mysqlnd_wireprotocol.c \
22                   mysqlnd_loaddata.c mysqlnd_net.c mysqlnd_statistics.c \
23				   mysqlnd_result.c mysqlnd_result_meta.c mysqlnd_debug.c\
24				   mysqlnd_block_alloc.c php_mysqlnd.c"
25
26
27  if test "$PHP_MYSQLND_COMPRESSION_SUPPORT" != "no"; then
28    AC_DEFINE([MYSQLND_COMPRESSION_WANTED], 1, [Enable compressed protocol support])
29  fi
30  AC_DEFINE([MYSQLND_SSL_SUPPORTED], 1, [Enable SSL support])
31
32  mysqlnd_sources="$mysqlnd_base_sources $mysqlnd_ps_sources"
33  PHP_NEW_EXTENSION(mysqlnd, $mysqlnd_sources, $ext_shared)
34  PHP_ADD_BUILD_DIR([ext/mysqlnd], 1)
35  PHP_INSTALL_HEADERS([ext/mysqlnd/])
36fi
37
38if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes" || test "$PHP_MYSQLI" != "no"; then
39  PHP_ADD_BUILD_DIR([ext/mysqlnd], 1)
40
41  dnl This creates a file so it has to be after above macros
42  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], [
43    ext/mysqlnd/php_mysqlnd_config.h
44  ],[
45#ifdef HAVE_SYS_TYPES_H
46#include <sys/types.h>
47#endif
48#ifdef HAVE_STDINT_H
49#include <stdint.h>
50#endif
51  ])
52fi
53