diff options
| -rw-r--r-- | ext/iconv/config.w32 | 1 | ||||
| -rw-r--r-- | win32/build/config.w32 | 2 | ||||
| -rw-r--r-- | win32/build/confutils.js | 29 |
3 files changed, 26 insertions, 6 deletions
diff --git a/ext/iconv/config.w32 b/ext/iconv/config.w32 index 8e48c89c68..067707558a 100644 --- a/ext/iconv/config.w32 +++ b/ext/iconv/config.w32 @@ -9,7 +9,6 @@ if (PHP_ICONV == "yes") { AC_DEFINE("HAVE_LIBICONV", 1, "Define if libiconv is available"); AC_DEFINE("PHP_ICONV_IMPL", "\"libiconv\"", "Which iconv implementation to use"); AC_DEFINE("ICONV_SUPPORTS_ERRNO", 1, "Whether iconv supports errno or not"); - AC_DEFINE("PHP_ICONV_H_PATH", "<iconv.h>", "Path to iconv.h"); CHECK_LIB("iconv.lib", "iconv"); CHECK_HEADER_ADD_INCLUDE("iconv.h", "CFLAGS"); } diff --git a/win32/build/config.w32 b/win32/build/config.w32 index 107d6882de..369317eb64 100644 --- a/win32/build/config.w32 +++ b/win32/build/config.w32 @@ -25,6 +25,8 @@ DEFINE("BASE_INCLUDES", "/I . /I main /I regex /I Zend /I TSRM "); DEFINE("CFLAGS_PHP", "/D _USRDLL /D PHP4DLLTS_EXPORTS /D PHP_EXPORTS \ /D LIBZEND_EXPORTS /D TSRM_EXPORTS /D SAPI_EXPORTS /D WINVER=0x400"); +DEFINE('CFLAGS_PHP_OBJ', '$(CFLAGS_PHP) $(STATIC_EXT_CFLAGS)'); + // General CFLAGS for building objects DEFINE("CFLAGS", "/nologo /YX /FD $(BASE_INCLUDES) /D _WINDOWS \ /D ZEND_WIN32=1 /D PHP_WIN32=1 /D WIN32 /D _MBCS"); diff --git a/win32/build/confutils.js b/win32/build/confutils.js index 786dab16cd..4ae5e46b2b 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -// $Id: confutils.js,v 1.8 2003-12-03 18:31:04 wez Exp $ +// $Id: confutils.js,v 1.9 2003-12-03 22:59:48 wez Exp $ var STDOUT = WScript.StdOut; var STDERR = WScript.StdErr; @@ -362,6 +362,16 @@ function CHECK_LIB(libname, target, path_to_check) } 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(header_name, PHP_EXTRA_LIBS, null)) { + ADD_FLAG("LIBS_" + target.toUpperCase(), libname); + have = 1; + } } // AC_DEFINE("HAVE_" + header_name.toUpperCase().replace(new RegExp("/\\\\-\.", "g"), "_"), have); @@ -389,6 +399,12 @@ function CHECK_HEADER_ADD_INCLUDE(header_name, flag_name, path_to_check, use_env if (typeof(p) == "string") { ADD_FLAG(flag_name, '/I "' + p + '" '); have = 1; + } else if (p == false) { + /* not found in the defaults or the explicit paths, + * so check the general extra includes; if we find + * it here, no need to add another /I for it as we + * already have it covered */ + p = search_paths(header_name, PHP_EXTRA_INCLUDES, null); } sym = header_name.toUpperCase(); @@ -430,6 +446,7 @@ function SAPI(sapiname, file_list, makefiletarget, cflags) MFO.WriteLine("\t$(LD) /nologo /out:$(BUILD_DIR)\\" + makefiletarget + " " + ldflags + " $(" + SAPI + "_GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(LDFLAGS_" + SAPI + ") $(LIBS_" + SAPI + ")"); + DEFINE('CFLAGS_' + SAPI + '_OBJ', '$(CFLAGS_' + SAPI + ')'); ADD_FLAG("SAPI_TARGETS", makefiletarget); MFO.WriteBlankLines(1); } @@ -483,11 +500,13 @@ function EXTENSION(extname, file_list, shared, cflags) MFO.WriteLine(dllname + ": $(BUILD_DIR)\\" + dllname); MFO.WriteLine("\t@echo EXT " + extname + " build complete"); MFO.WriteBlankLines(1); + + DEFINE('CFLAGS_' + EXT + '_OBJ', '$(CFLAGS_' + EXT + ')'); } else { ADD_FLAG("STATIC_EXT_OBJS", "$(" + EXT + "_GLOBAL_OBJS)"); ADD_FLAG("STATIC_EXT_LIBS", "$(LIBS_" + EXT + ")"); ADD_FLAG("STATIC_EXT_LDFLAGS", "$(LDFLAGS_" + EXT + ")"); - ADD_FLAG("CFLAGS_" + EXT, "$(CFLAGS_PHP)"); + ADD_FLAG("STATIC_EXT_CFLAGS", "$(CFLAGS_" + EXT + ")"); /* find the header that declars the module pointer, * so we can include it in internal_functions.c */ @@ -506,8 +525,8 @@ function EXTENSION(extname, file_list, shared, cflags) } extension_module_ptrs += '\tphpext_' + extname + '_ptr,\r\n'; - - cflags = "$(CFLAGS_PHP) " + cflags; + + DEFINE('CFLAGS_' + EXT + '_OBJ', '$(CFLAGS_PHP) $(CFLAGS_' + EXT + ')'); } ADD_FLAG("CFLAGS_" + EXT, cflags); } @@ -523,7 +542,7 @@ function ADD_SOURCES(dir, file_list, target) } sym = target.toUpperCase() + "_GLOBAL_OBJS"; - flags = "CFLAGS_" + target.toUpperCase(); + flags = "CFLAGS_" + target.toUpperCase() + '_OBJ'; if (configure_subst.Exists(sym)) { tv = configure_subst.Item(sym); |
