Commits

Ruslan Osmanov committed b144305

Hack for distroes installing sockets separately

  • Participants
  • Parent commits f4809f1

Comments (0)

Files changed (4)

   PHP_ADD_INCLUDE($ext_builddir/src)
   PHP_ADD_INCLUDE($ext_builddir/classes)
   PHP_ADD_INCLUDE($ext_builddir)
+  PHP_SUBST(EVENT_SHARED_LIBADD)
+  PHP_SUBST(CFLAGS)
+  PHP_SUBST(LDLAGS)
+  PHP_SUBST(LIBS)
+
+  dnl This works with static building only
+  dnl test -z $PHP_SOCKETS && PHP_SOCKETS="no"
 
   if test "$PHP_EVENT_SOCKETS" != "no"; then
+    AC_CHECK_HEADERS([$phpincludedir/ext/sockets/php_sockets.h], ,
+      [
+        AC_MSG_ERROR([Couldn't find $phpincludedir/sockets/php_sockets.h. Please check if sockets extension installed])
+      ]
+    )
     PHP_ADD_EXTENSION_DEP(event, sockets)
-    AC_DEFINE(PHP_EVENT_SOCKETS, 1, [Sockets extension is required])
+    AC_DEFINE(PHP_EVENT_SOCKETS, 1, [Whether sockets extension is required])
+    dnl Hack for distroes installing sockets separately
+    AC_DEFINE(HAVE_SOCKETS, 1, [Whether sockets extension is enabled])
   fi
 
-  PHP_SUBST(EVENT_SHARED_LIBADD)
-  PHP_SUBST(CFLAGS)
-  PHP_SUBST(LDLAGS)
-  PHP_SUBST(LIBS)
+  PHP_ADD_MAKEFILE_FRAGMENT
 fi
 
 dnl vim: ft=m4.sh fdm=marker cms=dnl\ %s
     <email>osmanov@php.net</email>
     <active>yes</active>
   </lead>
-  <date>2013-09-07</date>
+  <date>2013-09-08</date>
   <!--{{{ Current version -->
   <version>
-    <release>1.7.6</release>
+    <release>1.7.7</release>
     <api>1.7.0</api>
   </version>
   <stability>
   </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 off this requirement explicitly with --disable-event-sockets configure
-  option
+  Fix: incorrect handling of sockets extension dependency
+  (a hack for distros installing sockets separately)
   ]]></notes>
   <!--}}}-->
   <!--{{{ Contents -->
   </extsrcrelease>
   <!--{{{ changelog-->
   <changelog>
+    <!--{{{ 1.7.7 -->
+    <release>
+      <version>
+        <release>1.7.7</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[
+  Fix: incorrect handling of sockets extension dependency
+  (a hack for distros installing sockets separately)
+  ]]></notes>
+    </release>
+    <!--}}}-->
     <!--{{{ 1.7.6 -->
     <release>
       <version>
 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}
 };
 #ifndef PHP_EVENT_H
 #define PHP_EVENT_H
 
-#define PHP_EVENT_VERSION "1.7.6"
+#define PHP_EVENT_VERSION "1.7.7"
 
 #define PHP_EVENT_SUN_PREFIX "unix:"