X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=config.w32;h=7b6366499d94b49b833061a719d7fe9a70f55c25;hp=6d1db0fb33d00f5fe7261f81f86a76d671175488;hb=74e7358add4c74d212b91d23e8600ef3c10d081e;hpb=a19a05825d04d634834f7898ec1a5247fdd6095c diff --git a/config.w32 b/config.w32 index 6d1db0f..7b63664 100644 --- a/config.w32 +++ b/config.w32 @@ -3,17 +3,129 @@ ARG_ENABLE("http", "whether to enable extended HTTP support", "no"); +function check_for_main_ext(ext, header) +{ + if (!header) { + header = "php_"+ ext +".h"; + } + + /* When in configure, we're always in the root of PHP source */ + var ext_path = "ext\\" + ext; + + STDOUT.Write("Checking for ext/"+ ext +" ... "); + + if (FSO.FileExists(ext_path + "\\" + header)) { + STDOUT.WriteLine(ext_path); + return ext_path; + } + + STDOUT.WriteLine(""); + return false; +} + +function check_for_pecl_ext(ext, header) +{ + if (!header) { + header = "php_"+ ext +".h"; + } + + var g; + var s = ext +"\\"+ header; + + STDOUT.Write("Checking for pecl/"+ ext +" ... "); + if ( (g = glob(configure_module_dirname +"\\..\\"+ s)) || + (g = glob(configure_module_dirname +"\\..\\..\\..\\pecl\\"+ s))) { + var f = g[0].substr(0, g[0].length - header.length - 1); + STDOUT.WriteLine(f); + return f; + } + STDOUT.WriteLine(""); + return false; +} + if (PHP_HTTP != "no") { - EXTENSION("http", "http.c http_functions.c http_methods.c http_api.c http_curl_api.c") - AC_DEFINE("HAVE_HTTP", 1, "Have extended HTTP support") - if (CHECK_LIB("libcurl.lib", "http", PHP_HTTP) && - CHECK_HEADER_ADD_INCLUDE("curl/easy.h", "CFLAGS_HTTP") && - CHECK_LIB("ssleay32.lib", "http", PHP_HTTP) && - CHECK_LIB("libeay32.lib", "http", PHP_HTTP) && - CHECK_LIB("zlib.lib", "http", PHP_HTTP) && - CHECK_LIB("winmm.lib", "http", PHP_HTTP)) { - AC_DEFINE("HTTP_HAVE_CURL", 1, "Have CURL library"); - } else { - WARNING("curl convenience functions not enabled; libraries and headers not found"); - } + + var PHP_HTTP_SRC_ARRAY = glob(configure_module_dirname + "/src/*.c"); + var PHP_HTTP_SOURCES=""; + for (var i=0; i