X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=config.w32;h=fb5c7f71f2df1b77c6ece03f014e62804da966a9;hp=1c8b589ca42861c76f58ebb5c1fcee0e0f37d607;hb=75323793e113441c79c18cd9a57533dd592d3ff7;hpb=b46d0197c4402e76c2608ba972e1d05db22a321a diff --git a/config.w32 b/config.w32 index 1c8b589..fb5c7f7 100644 --- a/config.w32 +++ b/config.w32 @@ -2,39 +2,133 @@ // $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_HEADERS=glob(configure_module_dirname + "/src/*.h"); + for (var i=0; i