wez Wed Dec 3 17:59:48 2003 EDT
Modified files:
/php-src/ext/iconv config.w32
/php-src/win32/build config.w32 confutils.js
Log:
This should solve a few problems with static vs. shared builds for extensions (such
as mssql) that require certain CFLAGS to be defined, but not pull in other flags that
would affect DLL linkage.
Also fix the iconv file; MSVC doesn't seem to like the #include SYMBOL syntax.
Index: php-src/ext/iconv/config.w32
diff -u php-src/ext/iconv/config.w32:1.1 php-src/ext/iconv/config.w32:1.2
--- php-src/ext/iconv/config.w32:1.1 Wed Dec 3 14:46:27 2003
+++ php-src/ext/iconv/config.w32 Wed Dec 3 17:59:47 2003
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.1 2003/12/03 19:46:27 moriyoshi Exp $
+// $Id: config.w32,v 1.2 2003/12/03 22:59:47 wez Exp $
// vim: ft=javascript
ARG_WITH("iconv", "iconv support", "no");
@@ -9,7 +9,6 @@
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");
}
Index: php-src/win32/build/config.w32
diff -u php-src/win32/build/config.w32:1.7 php-src/win32/build/config.w32:1.8
--- php-src/win32/build/config.w32:1.7 Wed Dec 3 13:31:04 2003
+++ php-src/win32/build/config.w32 Wed Dec 3 17:59:48 2003
@@ -1,5 +1,5 @@
// vim:ft=javascript
-// $Id: config.w32,v 1.7 2003/12/03 18:31:04 wez Exp $
+// $Id: config.w32,v 1.8 2003/12/03 22:59:48 wez Exp $
// "Master" config file; think of it as a configure.in
// equivalent.
@@ -25,6 +25,8 @@
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");
Index: php-src/win32/build/confutils.js
diff -u php-src/win32/build/confutils.js:1.8 php-src/win32/build/confutils.js:1.9
--- php-src/win32/build/confutils.js:1.8 Wed Dec 3 13:31:04 2003
+++ php-src/win32/build/confutils.js Wed Dec 3 17:59:48 2003
@@ -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 @@
} 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 @@
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 @@
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 @@
MFO.WriteLine(dllname + ": $(BUILD_DIR)\\" + dllname);
MFO.WriteLine("[EMAIL PROTECTED] 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 @@
}
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 @@
}
sym = target.toUpperCase() + "_GLOBAL_OBJS";
- flags = "CFLAGS_" + target.toUpperCase();
+ flags = "CFLAGS_" + target.toUpperCase() + '_OBJ';
if (configure_subst.Exists(sym)) {
tv = configure_subst.Item(sym);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php