Re: Re: Window Build Patch - Check for grep and sed
| From: | Steph Fox | Date: | Wed, 28 Feb 2007 12:30:10 +0000 |
| Subject: | Re: Re: Window Build Patch - Check for grep and sed | ||
| References: | 1 2 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-3741@lists.php.net to get a copy of this message | ||
I don't see any point in this one. We only had ZTS before, and we're about to lose it anyway, no?
----- Original Message ----- From: "Elizabeth Smith" <emsmith@elizabethmariesmith.com>
To: <php-gtk-dev@lists.php.net>
Sent: Wednesday, February 28, 2007 1:41 AM
Subject: [PHP-GTK-DEV] Re: Window Build Patch - Check for grep and sed
I'll just keep these all in one thread I think - round two This patch allows php-gtk to build be built both thread safe and non-thread safe on windows - it includes adding a configure option, changing the output dirs to match php's standard of Release_TS, Release, Debug_TS, Debug, and changes the php library that the gtk extension looks for.--------------------------------------------------------------------------------
Index: ext/gtk+/config.w32 =================================================================== RCS file: /repository/php-gtk/ext/gtk+/config.w32,v retrieving revision 1.5 diff -u -r1.5 config.w32 --- ext/gtk+/config.w32 24 Oct 2006 12:46:14 -0000 1.5 +++ ext/gtk+/config.w32 28 Feb 2007 01:35:15 -0000 @@ -1,5 +1,5 @@ -if (CHECK_HEADER("main/php.h") && CHECK_LIB(PHP_GTK_DEBUG != "no" ? "php5ts_debug.lib" : "php5ts.lib", "php-gtk") && +if (CHECK_HEADER("main/php.h") && CHECK_LIB(PHP_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: win32/config.w32.in =================================================================== RCS file: /repository/php-gtk/win32/config.w32.in,v retrieving revision 1.12 diff -u -r1.12 config.w32.in --- win32/config.w32.in 17 Jun 2006 14:47:08 -0000 1.12 +++ win32/config.w32.in 28 Feb 2007 01:37:22 -0000 @@ -45,6 +45,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', ''); @@ -57,13 +58,6 @@ ARG_ENABLE('debug', 'Compile with debugging symbols', "no"); -// Set some debug-specific options -if (PHP_GTK_DEBUG == "yes") { - DEFINE("BUILD_DIR", PHP_GTK_OBJECT_OUT_DIR + "Debug"); -} else { - DEFINE("BUILD_DIR", PHP_GTK_OBJECT_OUT_DIR + "Release"); -} - ARG_IS('all', 'Configure all available extensions', 'no'); DEFINE("PHPGTKDLL", "php-gtk2.dll"); @@ -81,11 +75,28 @@ 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"); +} + +// Set some debug-specific options +if (PHP_GTK_DEBUG == "yes" && PHP_GTK_ZTS == "yes") { + DEFINE("BUILD_DIR", PHP_GTK_OBJECT_OUT_DIR + "Debug_TS"); + ADD_FLAG("CFLAGS", "/D ZTS=1"); + PHP_LIB = "php5ts_debug.lib"; +} else if (PHP_GTK_DEBUG == "yes") { + DEFINE("BUILD_DIR", PHP_GTK_OBJECT_OUT_DIR + "Debug"); + PHP_LIB = "php5_debug.lib"; +} else if (PHP_GTK_ZTS == "yes") { + DEFINE("BUILD_DIR", PHP_GTK_OBJECT_OUT_DIR + "Release_TS"); + ADD_FLAG("CFLAGS", "/D ZTS=1"); + PHP_LIB = "php5ts.lib"; +} else { + DEFINE("BUILD_DIR", PHP_GTK_OBJECT_OUT_DIR + "Release"); + PHP_LIB = "php5.lib"; } if (VCVERS < 14) {--------------------------------------------------------------------------------
-- PHP-GTK Development Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php