AC_MSG_WARN([continuing without libevent support])
else
AC_MSG_RESULT([found in $EVENT_DIR])
+
+ AC_MSG_CHECKING([for libevent version, roughly])
+ EVENT_VER="1.1b or lower"
+ if test -f "$EVENT_DIR/include/evhttp.h" && test -f "$EVENT_DIR/include/evdns.h"; then
+ if test -f "$EVENT_DIR/include/evrpc.h"; then
+ EVENT_VER="1.4 or greater"
+ else
+ EVENT_VER="1.2 or greater"
+ fi
+ fi
+ AC_DEFINE_UNQUOTED([HTTP_EVENT_VERSION], ["$EVENT_VER"], [ ])
+ AC_MSG_RESULT([$EVENT_VER])
+
AC_MSG_CHECKING([for libcurl version >= 7.16.0])
AC_MSG_RESULT([$CURL_VERSION])
if test `echo $CURL_VERSION | $SED -e 's/[[^0-9]]/ /g' | $AWK '{print $1*10000 + $2*100 + $3}'` -lt 71600; then
#else
php_info_print_table_row(2, "libcurl", "disabled", "disabled");
#endif
+#ifdef HTTP_HAVE_EVENT
+ php_info_print_table_row(3, "libevent", HTTP_EVENT_VERSION, event_get_version());
+#else
+ php_info_print_table_row(3, "libevent", "disabled", "disabled");
+#endif
#ifdef HTTP_HAVE_ZLIB
php_info_print_table_row(3, "libz", ZLIB_VERSION, zlibVersion());
#else
HTTP_LONG_CONSTANT("HTTP_SUPPORT_MAGICMIME", HTTP_SUPPORT_MAGICMIME);
HTTP_LONG_CONSTANT("HTTP_SUPPORT_ENCODINGS", HTTP_SUPPORT_ENCODINGS);
HTTP_LONG_CONSTANT("HTTP_SUPPORT_SSLREQUESTS", HTTP_SUPPORT_SSLREQUESTS);
+ HTTP_LONG_CONSTANT("HTTP_SUPPORT_EVENTS", HTTP_SUPPORT_EVENTS);
HTTP_LONG_CONSTANT("HTTP_PARAMS_ALLOW_COMMA", HTTP_PARAMS_ALLOW_COMMA);
HTTP_LONG_CONSTANT("HTTP_PARAMS_ALLOW_FAILURE", HTTP_PARAMS_ALLOW_FAILURE);
# ifdef HTTP_HAVE_SSL
support |= HTTP_SUPPORT_SSLREQUESTS;
# endif
+# ifdef HTTP_HAVE_EVENT
+ support |= HTTP_SUPPORT_EVENTS;
+# endif
#endif
#ifdef HTTP_HAVE_MAGIC
support |= HTTP_SUPPORT_MAGICMIME;
#define HTTP_SUPPORT_ENCODINGS 0x08L
#define HTTP_SUPPORT_SSLREQUESTS 0x20L
#define HTTP_SUPPORT_PERSISTENCE 0x40L
+#define HTTP_SUPPORT_EVENTS 0x80L
#define HTTP_PARAMS_ALLOW_COMMA 0x01
#define HTTP_PARAMS_ALLOW_FAILURE 0x02
include 'skip.inc';
checkcls('HttpRequest');
checkcls('HttpRequestPool');
-$pool = new RequestPool;
-skipif(!@$pool->enableEvents(), "need libevent support");
+skipif(!http_support(HTTP_SUPPORT_EVENTS), "need libevent support");
?>
--FILE--
<?php