I swear this is the last one for awhile (I'll be busy with the
phpthrowdown) - quick patch to allow building against nts php on windows
- the speedup is noticeable :)
I thought it might be :)
Thanks!
- Steph
--------------------------------------------------------------------------------
Index: config.w32
===================================================================
RCS file: /repository/php-gtk/ext/gtk+/config.w32,v
retrieving revision 1.5
diff -u -r1.5 config.w32
--- config.w32 24 Oct 2006 12:46:14 -0000 1.5
+++ config.w32 26 Jan 2007 22:19:05 -0000
@@ -1,5 +1,21 @@
-
-if (CHECK_HEADER("main/php.h") && CHECK_LIB(PHP_GTK_DEBUG != "no" ? "php5ts_debug.lib" : "php5ts.lib", "php-gtk") &&
+var check_lib;
+if(PHP_GTK_DEBUG == 'yes' && PHP_GTK_ZTS == 'yes')
+{
+ check_lib = "php5ts_debug.lib";
+}
+else if(PHP_GTK_DEBUG == 'yes')
+{
+ check_lib = "php5_debug.lib";
+}
+else if(PHP_GTK_ZTS == 'yes')
+{
+ check_lib = "php5ts.lib";
+}
+else
+{
+ check_lib = "php5.lib";
+}
+if (CHECK_HEADER("main/php.h") && CHECK_LIB(check_lib, "php-gtk") &&
CHECK_HEADER("iconv.h") && CHECK_LIB("iconv.lib", "php-gtk") &&
CHECK_HEADER("libintl.h") && CHECK_LIB("intl.lib", "php-gtk") &&
CHECK_HEADER("atk/atk.h") && CHECK_LIB("atk-1.0.lib", "php-gtk") &&
--------------------------------------------------------------------------------
Index: config.w32.in
===================================================================
RCS file: /repository/php-gtk/win32/config.w32.in,v
retrieving revision 1.12
diff -u -r1.12 config.w32.in
--- config.w32.in 17 Jun 2006 14:47:08 -0000 1.12
+++ config.w32.in 26 Jan 2007 22:14:34 -0000
@@ -46,6 +46,7 @@
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');
ARG_WITH('cygwin', 'Path to cygwin utilities on your system', '\\cygwin');
+ARG_ENABLE('zts', 'Thread safety', 'yes');
// stick objects somewhere outside of the source tree
ARG_ENABLE('object-out-dir', 'Alternative location for binary objects during build', '');
if (PHP_GTK_OBJECT_OUT_DIR.length) {
@@ -81,11 +82,11 @@
DEFINE("LIBS", "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib");
if (PHP_GTK_DEBUG == "yes") {
- DEFINE("CFLAGS", "/nologo /LDd /MDd /Gm /ZI /GZ /I . /I ..\\ /I ..\\.. /I main /I ..\\main /I ext /I ..\\ext /I ..\\php5\\main /I ..\\php5\\Zend /I ..\\php5\\TSRM /D ZEND_WIN32 /D ZTS=1 /D ZEND_DEBUG=1 /D PHP_WIN32 /D WIN32 /D _DEBUG /D _WINDOWS /D _MBCS /D _USRDLL");
+ DEFINE("CFLAGS", "/nologo /LDd /MDd /Gm /ZI /GZ /I . /I ..\\ /I ..\\.. /I main /I ..\\main /I ext /I ..\\ext /I ..\\php5\\main /I ..\\php5\\Zend /I ..\\php5\\TSRM /D ZEND_WIN32 /D ZEND_DEBUG=1 /D PHP_WIN32 /D WIN32 /D _DEBUG /D _WINDOWS /D _MBCS /D _USRDLL");
ADD_FLAG("LDFLAGS", "/debug");
} else {
- DEFINE("CFLAGS", "/nologo /MD /W3 /GX /O2 /I . /I ..\\ /I ..\\.. /I main /I ..\\main /I ext /I ..\\ext /I ..\\php5\\main /I ..\\php5\\Zend /I ..\\php5\\TSRM /D ZEND_WIN32 /D ZTS=1 /D ZEND_DEBUG=0 /D PHP_WIN32 /D WIN32 /D NDEBUG /D _WINDOWS /D _MBCS /D _USRDLL");
+ DEFINE("CFLAGS", "/nologo /MD /W3 /GX /O2 /I . /I ..\\ /I ..\\.. /I main /I ..\\main /I ext /I ..\\ext /I ..\\php5\\main /I ..\\php5\\Zend /I ..\\php5\\TSRM /D ZEND_WIN32 /D ZEND_DEBUG=0 /D PHP_WIN32 /D WIN32 /D NDEBUG /D _WINDOWS /D _MBCS /D _USRDLL");
}
if (VCVERS < 14) {
@@ -99,6 +100,10 @@
ADD_FLAG('CFLAGS', '/GS /wd4996 ');
}
+if (PHP_GTK_ZTS == "yes") {
+ ADD_FLAG("CFLAGS", "/D ZTS=1");
+}
+
if (PHP_GTK_PHP_BUILD == 'no') {
if (FSO.FolderExists("..\\php_build")) {
PHP_GTK_PHP_BUILD = "..\\php_build";
--------------------------------------------------------------------------------
-- PHP-GTK Development Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php