X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=config.w32;h=7b6366499d94b49b833061a719d7fe9a70f55c25;hp=abb1eb58e600599ab07f2d0ad0892a041d04e270;hb=d5c7f974d81c724c6fad8b54f1c37ce0795119de;hpb=cdbe702a66e68d97885d5305278246c2630c9f10 diff --git a/config.w32 b/config.w32 index abb1eb5..7b63664 100644 --- a/config.w32 +++ b/config.w32 @@ -2,39 +2,130 @@ // $Id$ ARG_ENABLE("http", "whether to enable extended HTTP support", "no"); -ARG_WITH("mhash", "mhash 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") { - if (PHP_MHASH != "no") { - if (CHECK_HEADER_ADD_INCLUDE('mhash.h', 'CFLAGS_HTTP') && - CHECK_LIB('libmhash.lib', 'http')) { - AC_DEFINE('HAVE_LIBMHASH', 1 , "Have mhash library"); - } else { - WARNING("mhash 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