johannes                                 Tue, 06 Sep 2011 16:38:22 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=316281

Log:
- Fix bug #55609 (mysqlnd cannot be built shared)

# This adds an option --enable-mysqlnd to explicitly built mysqlnd, like any
# other extension it can be used with =shared to build mysqlnd shared;
# mysqlnd will implicitly enabled when requested from another extension

Bug: https://bugs.php.net/55609 (Assigned) mysqlnd cannot be built shared
      
Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/ext/mysqlnd/config9.m4
    U   php/php-src/branches/PHP_5_3/ext/mysqlnd/php_mysqlnd.c
    U   php/php-src/branches/PHP_5_4/ext/mysqlnd/config9.m4
    U   php/php-src/branches/PHP_5_4/ext/mysqlnd/php_mysqlnd.c
    U   php/php-src/trunk/ext/mysqlnd/config9.m4
    U   php/php-src/trunk/ext/mysqlnd/php_mysqlnd.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS   2011-09-06 16:37:45 UTC (rev 316280)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-09-06 16:38:22 UTC (rev 316281)
@@ -23,6 +23,7 @@
   mysqlnd is used). (Andrey)

 - mysqlnd
+  . Fixed bug #55609 (mysqlnd cannot be built shared). (Johannes)
   . Fixed bug #55067 (MySQL doesn't support compression - wrong config option).
     (Andrey)


Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/config9.m4
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/config9.m4 2011-09-06 16:37:45 UTC 
(rev 316280)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/config9.m4 2011-09-06 16:38:22 UTC 
(rev 316281)
@@ -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 disable 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_charset.c mysqlnd_wireprotocol.c \
                    mysqlnd_loaddata.c mysqlnd_net.c mysqlnd_statistics.c \
@@ -27,12 +30,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

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/php_mysqlnd.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/php_mysqlnd.c      2011-09-06 
16:37:45 UTC (rev 316280)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/php_mysqlnd.c      2011-09-06 
16:38:22 UTC (rev 316281)
@@ -299,6 +299,11 @@
 };
 /* }}} */

+/* {{{ COMPILE_DL_MYSQLND */
+#ifdef COMPILE_DL_MYSQLND
+ZEND_GET_MODULE(mysqlnd)
+#endif
+/* }}} */

 /*
  * Local variables:

Modified: php/php-src/branches/PHP_5_4/ext/mysqlnd/config9.m4
===================================================================
--- php/php-src/branches/PHP_5_4/ext/mysqlnd/config9.m4 2011-09-06 16:37:45 UTC 
(rev 316280)
+++ php/php-src/branches/PHP_5_4/ext/mysqlnd/config9.m4 2011-09-06 16:38:22 UTC 
(rev 316281)
@@ -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 disable 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

Modified: php/php-src/branches/PHP_5_4/ext/mysqlnd/php_mysqlnd.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/mysqlnd/php_mysqlnd.c      2011-09-06 
16:37:45 UTC (rev 316280)
+++ php/php-src/branches/PHP_5_4/ext/mysqlnd/php_mysqlnd.c      2011-09-06 
16:38:22 UTC (rev 316281)
@@ -366,6 +366,11 @@
 };
 /* }}} */

+/* {{{ COMPILE_DL_MYSQLND */
+#ifdef COMPILE_DL_MYSQLND
+ZEND_GET_MODULE(mysqlnd)
+#endif
+/* }}} */

 /*
  * Local variables:

Modified: php/php-src/trunk/ext/mysqlnd/config9.m4
===================================================================
--- php/php-src/trunk/ext/mysqlnd/config9.m4    2011-09-06 16:37:45 UTC (rev 
316280)
+++ php/php-src/trunk/ext/mysqlnd/config9.m4    2011-09-06 16:38:22 UTC (rev 
316281)
@@ -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 disable 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

Modified: php/php-src/trunk/ext/mysqlnd/php_mysqlnd.c
===================================================================
--- php/php-src/trunk/ext/mysqlnd/php_mysqlnd.c 2011-09-06 16:37:45 UTC (rev 
316280)
+++ php/php-src/trunk/ext/mysqlnd/php_mysqlnd.c 2011-09-06 16:38:22 UTC (rev 
316281)
@@ -366,6 +366,11 @@
 };
 /* }}} */

+/* {{{ COMPILE_DL_MYSQLND */
+#ifdef COMPILE_DL_MYSQLND
+ZEND_GET_MODULE(mysqlnd)
+#endif
+/* }}} */

 /*
  * Local variables:

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to