From 85cce2121de3ab8993ee35c1f8d8b8f7c696fd3d Mon Sep 17 00:00:00 2001 From: Jan Ehrhardt Date: Thu, 31 Oct 2019 12:47:31 +0100 Subject: [PATCH] Config.w32 chack for both instances of event.h Fixes https://github.com/m6w6/ext-http/issues/97 when the libevent2 headers are not installed in the main include dir, for instance in c:/php-snap-build/dep-aux/vc15/x64/libevent/include --- config.w32 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config.w32 b/config.w32 index e7f265d..c37c61b 100644 --- a/config.w32 +++ b/config.w32 @@ -144,7 +144,8 @@ if (PHP_HTTP != "no") { AC_DEFINE("PHP_HAVE_CURL_MULTI_TIMEOUT", 1, ""); ADD_FLAG("CFLAGS_HTTP", "/I" + configure_module_dirname + " "); - if (CHECK_HEADER_ADD_INCLUDE("event2/event.h", "CFLAGS_HTTP") && + if (CHECK_HEADER_ADD_INCLUDE("event.h", "CFLAGS_HTTP") && + CHECK_HEADER_ADD_INCLUDE("event2/event.h", "CFLAGS_HTTP") && CHECK_LIB("libevent.lib", "http", PHP_HTTP) && CHECK_LIB("libevent_core.lib", "http", PHP_HTTP) && CHECK_LIB("libevent_extras.lib", "http", PHP_HTTP)) { @@ -152,6 +153,8 @@ if (PHP_HTTP != "no") { AC_DEFINE("PHP_HTTP_HAVE_LIBEVENT", 1); AC_DEFINE("PHP_HTTP_HAVE_LIBEVENT2", 1); AC_DEFINE("PHP_HTTP_LIBEVENT_VERSION", "2.0.21 or greater"); + } else { + WARNING("http module: libevent not enabled; libraries or headers not found"); } } else { WARNING("curl convenience functions not enabled; libraries and headers not found"); -- 2.30.2