Commits

Ruslan Osmanov committed 1db0ab4

Change: sockets extension is now required(see bug #65597). The user can still turn this requirement explicitly with --disable-event-sockets configure option

Comments (0)

Files changed (5)

 dnl | Author: Ruslan Osmanov <osmanov@php.net>                             |
 dnl +----------------------------------------------------------------------+
 
-PHP_ARG_WITH(event-core, for event core support,
+PHP_ARG_WITH(event-core, for Event core support,
 [  --with-event-core        Include core libevent support])
 
-PHP_ARG_WITH(event-pthreads, for event thread safety support,
-[  --with-event-pthreads    Include libevent's pthreads library and enable thread safety support in event], no, no)
+PHP_ARG_WITH(event-pthreads, for Event thread safety support,
+[  --with-event-pthreads    Include libevent's pthreads library and enable thread safety support in Event], no, no)
 
-PHP_ARG_WITH(event-extra, for event extra functionality support,
+PHP_ARG_WITH(event-extra, for Event extra functionality support,
 [  --with-event-extra       Include libevent protocol-specific functionality support including HTTP, DNS, and RPC], yes, no)
 
 PHP_ARG_WITH(event-openssl, for OpenSSL support in event,
 [  --with-event-libevent-dir[=DIR] Event: libevent installation prefix], no, no)
 
 PHP_ARG_ENABLE(event-debug, whether Event debugging support enabled,
-[  --enable-event-debug     Enable debug support in event], no, no)
+[  --enable-event-debug     Enable debug support in Event], no, no)
+
+PHP_ARG_ENABLE(event-sockets, whether to enable sockets support in Event,
+[  --enable-event-sockets Enable sockets support in Event], no, no)
 
 if test "$PHP_EVENT_CORE" != "no"; then
   dnl {{{ Check for PHP version
   PHP_ADD_INCLUDE($ext_builddir/src)
   PHP_ADD_INCLUDE($ext_builddir/classes)
   PHP_ADD_INCLUDE($ext_builddir)
-  PHP_ADD_EXTENSION_DEP(event, sockets, true)
+
+  if test "$PHP_EVENT_SOCKETS" != "no"; then
+    PHP_ADD_EXTENSION_DEP(event, sockets)
+    AC_DEFINE(PHP_EVENT_SOCKETS, 1, [Sockets extension is required])
+  fi
+
   PHP_SUBST(EVENT_SHARED_LIBADD)
   PHP_SUBST(CFLAGS)
   PHP_SUBST(LDLAGS)
     <email>osmanov@php.net</email>
     <active>yes</active>
   </lead>
-  <date>2013-08-19</date>
+  <date>2013-09-06</date>
   <!--{{{ Current version -->
   <version>
-    <release>1.7.5</release>
+    <release>1.7.6</release>
     <api>1.7.0</api>
   </version>
   <stability>
   </stability>
   <license uri="http://www.php.net/license">PHP</license>
   <notes><![CDATA[
-  Fix: build error with custom libevent installation prefixes like /lib(John Wamer)
+  Change: sockets extension is now required(see bug #65597). The user can still
+  turn this requirement explicitly with --disable-event-sockets configure
+  option
   ]]></notes>
   <!--}}}-->
   <!--{{{ Contents -->
   </dependencies>
   <providesextension>event</providesextension>
   <extsrcrelease>
-    <configureoption default="no" name="enable-event-debug" prompt="Enable internal debugging in event"/>
+    <configureoption default="no" name="enable-event-debug" prompt="Enable internal debugging in Event"/>
+    <configureoption default="yes" name="enable-event-sockets" prompt="Enable sockets support in Event"/>
     <configureoption default="/usr" name="with-event-libevent-dir" prompt="libevent installation prefix"/>
-    <configureoption default="no" name="with-event-pthreads" prompt="Include libevent's pthreads library and enable thread safety support in event"/>
+    <configureoption default="no" name="with-event-pthreads" prompt="Include libevent's pthreads library and enable thread safety support in Event"/>
     <configureoption default="yes" name="with-event-extra" prompt="Include libevent protocol-specific functionality support including HTTP, DNS, and RPC"/>
     <configureoption default="yes" name="with-event-openssl" prompt="Include libevent OpenSSL support"/>
     <configureoption default="no" name="with-openssl-dir" prompt="openssl installation prefix"/>
   </extsrcrelease>
   <!--{{{ changelog-->
   <changelog>
+    <!--{{{ 1.7.6 -->
+    <release>
+      <version>
+        <release>1.7.6</release>
+        <api>1.7.0</api>
+      </version>
+      <stability>
+        <release>stable</release>
+        <api>stable</api>
+      </stability>
+      <license uri="http://www.php.net/license">PHP</license>
+      <notes><![CDATA[
+  Change: sockets extension is now required(see bug #65597). The user can still
+  turn this requirement explicitly with --disable-event-sockets configure
+  option
+  ]]></notes>
+    </release>
+    <!--}}}-->
     <!--{{{ 1.7.5 -->
     <release>
       <version>
 static zend_object_handlers object_handlers;
 
 static const zend_module_dep event_deps[] = {
+#ifdef PHP_EVENT_SOCKETS_SUPPORT
+	ZEND_MOD_REQUIRED("sockets")
+#else
 	ZEND_MOD_OPTIONAL("sockets")
+#endif
 	{NULL, NULL, NULL}
 };
 
 PHP_MINFO_FUNCTION(event)
 {
 	php_info_print_table_start();
-	php_info_print_table_header(2, "event support", "enabled");
+	php_info_print_table_header(2, "Event support", "enabled");
+#ifdef PHP_EVENT_SOCKETS_SUPPORT
+	php_info_print_table_header(2, "Sockets support", "enabled");
+#else
+	php_info_print_table_header(2, "Sockets support", "disabled");
+#endif
 #ifdef PHP_EVENT_DEBUG 
 	php_info_print_table_row(2, "Debug support", "enabled");
 #else
 #ifndef PHP_EVENT_H
 #define PHP_EVENT_H
 
-#define PHP_EVENT_VERSION "1.7.5"
+#define PHP_EVENT_VERSION "1.7.6"
 
 #define PHP_EVENT_SUN_PREFIX "unix:"
 
 
 #include <signal.h>
 
-#if PHP_VERSION_ID >= 50301 && (HAVE_SOCKETS || defined(COMPILE_DL_SOCKETS))
-# include <ext/sockets/php_sockets.h>
-# define PHP_EVENT_SOCKETS_SUPPORT
+#ifdef PHP_EVENT_SOCKETS
+# if PHP_VERSION_ID >= 50301 && (HAVE_SOCKETS || defined(COMPILE_DL_SOCKETS))
+#  include "ext/sockets/php_sockets.h"
+#  define PHP_EVENT_SOCKETS_SUPPORT
+# else
+#  error Sockets extension is required
+# endif
 #endif