php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #55609
Patch mysqlnd_build_shared.diff revision 2011-09-05 18:25 UTC by johannes@php.net
revision 2011-09-05 18:23 UTC by johannes@php.net
revision 2011-09-05 16:46 UTC by johannes@php.net

Patch mysqlnd_build_shared.diff for MySQL related Bug #55609

Patch version 2011-09-05 18:25 UTC

Return to Bug #55609 | Download this patch
Patch Revisions:

Developer: johannes@php.net

Index: ext/mysqlnd/php_mysqlnd.c
===================================================================
--- ext/mysqlnd/php_mysqlnd.c	(revision 315975)
+++ ext/mysqlnd/php_mysqlnd.c	(working copy)
@@ -366,6 +366,11 @@
 };
 /* }}} */
 
+/* {{{ COMPILE_DL_MYSQLND */
+#ifdef COMPILE_DL_MYSQLND
+ZEND_GET_MODULE(mysqlnd)
+#endif
+/* }}} */
 
 /*
  * Local variables:
Index: ext/mysqlnd/config9.m4
===================================================================
--- ext/mysqlnd/config9.m4	(revision 315929)
+++ ext/mysqlnd/config9.m4	(working copy)
@@ -2,6 +2,9 @@
 dnl $Id$
 dnl config.m4 for mysqlnd driver
 
+PHP_ARG_ENABLE(mysqlnd, whether to enable mysqlnd,
+  [  --enable-mysqlnd       Enable mysqlnd expliciely, will be done implicitly
+                         when required by other extensions], no, yes)
 
 PHP_ARG_ENABLE(mysqlnd_compression_support, whether to enable compressed protocol support in mysqlnd,
 [  --disable-mysqlnd-compression-support
@@ -13,7 +16,7 @@
 fi
 
 dnl If some extension uses mysqlnd it will get compiled in PHP core
-if test "$PHP_MYSQLND_ENABLED" = "yes"; then
+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_bt.c mysqlnd_charset.c mysqlnd_wireprotocol.c \
                    mysqlnd_loaddata.c mysqlnd_net.c \
@@ -28,12 +31,12 @@
   AC_DEFINE([MYSQLND_SSL_SUPPORTED], 1, [Enable SSL support])
 
   mysqlnd_sources="$mysqlnd_base_sources $mysqlnd_ps_sources"
-  PHP_NEW_EXTENSION(mysqlnd, $mysqlnd_sources, no)
+  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_ENABLED" = "yes" || test "$PHP_MYSQLI" != "no"; then
+if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes" || test "$PHP_MYSQLI" != "no"; then
   PHP_ADD_BUILD_DIR([ext/mysqlnd], 1)
 
   dnl This creates a file so it has to be after above macros
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Fri Apr 18 15:02:26 2014 UTC