wez Thu Dec 4 21:41:00 2003 EDT Modified files: /php-src/sapi/isapi config.w32 /php-src/sapi/nsapi config.w32 /php-src/win32/build config.w32 confutils.js Log: use /Ox flag for release build (all optimizations on). If no php_build dir is specified, then look for either of the two "standard" things in reasonable locations. Allow CHECK_LIB to search for the "same" library using a ; separated list of alternatives. Tweak nsapi config and remove redundant or unused flags. Add ZTS checks for both isapi and nsapi configs. Index: php-src/sapi/isapi/config.w32 diff -u php-src/sapi/isapi/config.w32:1.2 php-src/sapi/isapi/config.w32:1.3 --- php-src/sapi/isapi/config.w32:1.2 Thu Dec 4 08:38:46 2003 +++ php-src/sapi/isapi/config.w32 Thu Dec 4 21:40:58 2003 @@ -1,9 +1,13 @@ // vim:ft=javascript -// $Id: config.w32,v 1.2 2003/12/04 13:38:46 wez Exp $ +// $Id: config.w32,v 1.3 2003/12/05 02:40:58 wez Exp $ ARG_ENABLE('isapi', 'Build ISAPI version of PHP', 'no'); if (PHP_ISAPI == "yes") { + if (PHP_ZTS == "no") { + ERROR("ISAPI module requires an --enable-zts build of PHP"); + } + SAPI('isapi', 'php4isapi.c', 'php' + PHP_VERSION + 'isapi.dll', '/D PHP4ISAPI_EXPORTS'); ADD_FLAG('LDFLAGS_ISAPI', '/DEF:sapi\\isapi\\php4isapi.def'); } Index: php-src/sapi/nsapi/config.w32 diff -u php-src/sapi/nsapi/config.w32:1.1 php-src/sapi/nsapi/config.w32:1.2 --- php-src/sapi/nsapi/config.w32:1.1 Thu Dec 4 19:00:31 2003 +++ php-src/sapi/nsapi/config.w32 Thu Dec 4 21:40:59 2003 @@ -1,28 +1,26 @@ // vim:ft=javascript -// $Id: config.w32,v 1.1 2003/12/05 00:00:31 thetaphi Exp $ +// $Id: config.w32,v 1.2 2003/12/05 02:40:59 wez Exp $ ARG_ENABLE('nsapi', 'Build NSAPI for Netscape/iPlanet/SunONE webservers', 'no'); ARG_WITH('nsapi-includes', 'Where to find NSAPI headers', null); ARG_WITH('nsapi-libs', 'Where to find NSAPI libraries', null); -if (PHP_NSAPI == "yes") { +if (PHP_NSAPI != "no") { - if (!CHECK_HEADER_ADD_INCLUDE("nsapi.h", "CFLAGS_NSAPI", php_usual_include_suspects + ";" + PHP_NSAPI_INCLUDES)) { + if (PHP_ZTS == "no") { + ERROR("NSAPI module requires an --enable-zts build of PHP"); + } + + if (!CHECK_HEADER_ADD_INCLUDE("nsapi.h", "CFLAGS_NSAPI", + PHP_NSAPI + ';' + PHP_NSAPI_INCLUDES)) { ERROR("Could not find NSAPI headers"); } - if (!CHECK_LIB("ns-httpd40.lib", "nsapi", php_usual_lib_suspects + ";" + PHP_NSAPI_LIBS)) { - if (!CHECK_LIB("ns-httpd36.lib", "nsapi", php_usual_lib_suspects + ";" + PHP_NSAPI_LIBS)) { - if (!CHECK_LIB("ns-httpd35.lib", "nsapi", php_usual_lib_suspects + ";" + PHP_NSAPI_LIBS)) { - if (!CHECK_LIB("ns-httpd30.lib", "nsapi", php_usual_lib_suspects + ";" + PHP_NSAPI_LIBS)) { - ERROR("Could not find NSAPI libraries"); - } - } - } + if (!CHECK_LIB("ns-httpd40.lib;ns-httpd36.lib;ns-httpd35.lib;ns-httpd30.lib", + "nsapi", PHP_NSAPI + ";" + PHP_NSAPI_LIBS)) { + ERROR("Could not find NSAPI libraries"); } - SAPI('nsapi', 'nsapi.c', - 'php' + PHP_VERSION + 'nsapi.dll', - '/D "XP_WIN32" /D "php' + PHP_VERSION + 'nsapi_EXPORTS"'); + SAPI('nsapi', 'nsapi.c', 'php' + PHP_VERSION + 'nsapi.dll', '/D XP_WIN32 '); } Index: php-src/win32/build/config.w32 diff -u php-src/win32/build/config.w32:1.9 php-src/win32/build/config.w32:1.10 --- php-src/win32/build/config.w32:1.9 Wed Dec 3 21:12:36 2003 +++ php-src/win32/build/config.w32 Thu Dec 4 21:41:00 2003 @@ -1,5 +1,5 @@ // vim:ft=javascript -// $Id: config.w32,v 1.9 2003/12/04 02:12:36 wez Exp $ +// $Id: config.w32,v 1.10 2003/12/05 02:41:00 wez Exp $ // "Master" config file; think of it as a configure.in // equivalent. @@ -54,7 +54,7 @@ ADD_FLAG("PHP_LDFLAGS", "/nodefaultlib:msvcrt"); } else { // Equivalent to Release_TSInline build -> best optimization - ADD_FLAG("CFLAGS", "/LD /MD /W3 /O2 /D NDebug /D NDEBUG \ + ADD_FLAG("CFLAGS", "/LD /MD /W3 /Ox /D NDebug /D NDEBUG \ /D ZEND_WIN32_FORCE_INLINE /GB /GF /D ZEND_DEBUG=0"); // if you have VS.Net /GS hardens the binary against buffer overruns // ADD_FLAG("CFLAGS", "/GS"); @@ -90,6 +90,14 @@ // that we need ARG_WITH('php-build', 'Path to where you extracted http://www.php.net/extra/win32build.zip. Assumes that it is a sibling of this source dir (..\\php_build) if not specified', 'no'); +if (PHP_PHP_BUILD == 'no') { + if (FSO.FolderExists("..\\php_build")) { + PHP_PHP_BUILD = "..\\php_build"; + } else if (FSO.FolderExists("..\\win32build")) { + PHP_PHP_BUILD = "..\\win32build"; + } +} + ARG_WITH('extra-includes', 'Extra include path to use when building everything', ''); ARG_WITH('extra-libs', 'Extra library path to use when linking everything', ''); Index: php-src/win32/build/confutils.js diff -u php-src/win32/build/confutils.js:1.16 php-src/win32/build/confutils.js:1.17 --- php-src/win32/build/confutils.js:1.16 Thu Dec 4 12:03:20 2003 +++ php-src/win32/build/confutils.js Thu Dec 4 21:41:00 2003 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -// $Id: confutils.js,v 1.16 2003/12/04 17:03:20 fmk Exp $ +// $Id: confutils.js,v 1.17 2003/12/05 02:41:00 wez Exp $ var STDOUT = WScript.StdOut; var STDERR = WScript.StdErr; @@ -362,33 +362,44 @@ return place; } -function CHECK_LIB(libname, target, path_to_check) +function CHECK_LIB(libnames, target, path_to_check) { if (path_to_check == null) { path_to_check = php_usual_lib_suspects; } else { path_to_check += ";" + php_usual_lib_suspects; } - - var p = search_paths(libname, path_to_check, "LIB"); var have = 0; + var p; + var i; + var libname; - if (typeof(p) == "string") { - ADD_FLAG("LDFLAGS_" + target.toUpperCase(), '/libpath:"' + p + '" '); - ADD_FLAG("LIBS_" + target.toUpperCase(), libname); - have = 1; - } else if (p == true) { - ADD_FLAG("LIBS_" + target.toUpperCase(), libname); - have = 1; - } else { - /* not found in the defaults or the explicit paths, - * so check the general extra libs; if we find - * it here, no need to add another /libpath: for it as we - * already have it covered, but we need to add the lib - * to LIBS_XXX */ - if (false != search_paths(libname, PHP_EXTRA_LIBS, null)) { + libnames = libnames.split(';'); + for (i = 0; i < libnames.length; i++) { + libname = libnames[i]; + p = search_paths(libname, path_to_check, "LIB"); + + if (typeof(p) == "string") { + ADD_FLAG("LDFLAGS_" + target.toUpperCase(), '/libpath:"' + p + '" '); ADD_FLAG("LIBS_" + target.toUpperCase(), libname); have = 1; + } else if (p == true) { + ADD_FLAG("LIBS_" + target.toUpperCase(), libname); + have = 1; + } else { + /* not found in the defaults or the explicit paths, + * so check the general extra libs; if we find + * it here, no need to add another /libpath: for it as we + * already have it covered, but we need to add the lib + * to LIBS_XXX */ + if (false != search_paths(libname, PHP_EXTRA_LIBS, null)) { + ADD_FLAG("LIBS_" + target.toUpperCase(), libname); + have = 1; + } + } + + if (have) { + break; } }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php