wez Thu Dec 4 08:38:48 2003 EDT
Modified files:
/php-src/ext/libxml config.w32
/php-src/sapi/apache config.w32
/php-src/sapi/isapi config.w32
/php-src/win32/build buildconf.js confutils.js template.rc
Log:
Fix libxml to use static lib if found.
Disable apache and isapi by default.
Add some smarts so that we can really build extensions and SAPI found in
php-src/pecl and/or php-src/../pecl.
Only include a logo in the resources if we are building an .exe.
Index: php-src/ext/libxml/config.w32
diff -u php-src/ext/libxml/config.w32:1.3 php-src/ext/libxml/config.w32:1.4
--- php-src/ext/libxml/config.w32:1.3 Wed Dec 3 09:29:42 2003
+++ php-src/ext/libxml/config.w32 Thu Dec 4 08:38:45 2003
@@ -1,16 +1,17 @@
-// $Id: config.w32,v 1.3 2003/12/03 14:29:42 wez Exp $
+// $Id: config.w32,v 1.4 2003/12/04 13:38:45 wez Exp $
// vim:ft=javascript
ARG_WITH("libxml", "LibXML support", "yes");
if (PHP_LIBXML == "yes") {
- EXTENSION("libxml", "libxml.c", false /* never shared */);
- AC_DEFINE("HAVE_LIBXML", 1, "LibXML support");
- CHECK_LIB("iconv.lib", "libxml");
- CHECK_LIB("libxml2.lib", "libxml");
- CHECK_HEADER_ADD_INCLUDE("libxml/parser.h", "CFLAGS");
- ADD_FLAG("CFLAGS", "/D LIBXML_THREAD_ENABLED");
+ if ((CHECK_LIB("libxml2_a.lib", "libxml") || CHECK_LIB("libxml2.lib",
"libxml")) &&
+ CHECK_LIB("iconv.lib", "libxml") &&
+ CHECK_HEADER_ADD_INCLUDE("libxml/parser.h", "CFLAGS")) {
+ EXTENSION("libxml", "libxml.c", false /* never shared */);
+ AC_DEFINE("HAVE_LIBXML", 1, "LibXML support");
+ ADD_FLAG("CFLAGS", "/D LIBXML_THREAD_ENABLED");
+ }
}
Index: php-src/sapi/apache/config.w32
diff -u php-src/sapi/apache/config.w32:1.4 php-src/sapi/apache/config.w32:1.5
--- php-src/sapi/apache/config.w32:1.4 Wed Dec 3 09:29:44 2003
+++ php-src/sapi/apache/config.w32 Thu Dec 4 08:38:45 2003
@@ -1,7 +1,7 @@
// vim:ft=javascript
-// $Id: config.w32,v 1.4 2003/12/03 14:29:44 wez Exp $
+// $Id: config.w32,v 1.5 2003/12/04 13:38:45 wez Exp $
-ARG_ENABLE('apache', 'Build Apache 1.3.x version of PHP', 'yes');
+ARG_ENABLE('apache', 'Build Apache 1.3.x version of PHP', 'no');
ARG_WITH('apache-includes', 'Where to find Apache 1.3 headers', null);
ARG_WITH('apache-libs', 'Where to find Apache 1.3 libraries', null);
Index: php-src/sapi/isapi/config.w32
diff -u php-src/sapi/isapi/config.w32:1.1 php-src/sapi/isapi/config.w32:1.2
--- php-src/sapi/isapi/config.w32:1.1 Tue Dec 2 18:17:04 2003
+++ php-src/sapi/isapi/config.w32 Thu Dec 4 08:38:46 2003
@@ -1,7 +1,7 @@
// vim:ft=javascript
-// $Id: config.w32,v 1.1 2003/12/02 23:17:04 wez Exp $
+// $Id: config.w32,v 1.2 2003/12/04 13:38:46 wez Exp $
-ARG_ENABLE('isapi', 'Build ISAPI version of PHP', 'yes');
+ARG_ENABLE('isapi', 'Build ISAPI version of PHP', 'no');
if (PHP_ISAPI == "yes") {
SAPI('isapi', 'php4isapi.c', 'php' + PHP_VERSION + 'isapi.dll', '/D
PHP4ISAPI_EXPORTS');
Index: php-src/win32/build/buildconf.js
diff -u php-src/win32/build/buildconf.js:1.4 php-src/win32/build/buildconf.js:1.5
--- php-src/win32/build/buildconf.js:1.4 Wed Dec 3 20:59:46 2003
+++ php-src/win32/build/buildconf.js Thu Dec 4 08:38:47 2003
@@ -1,4 +1,4 @@
-// $Id: buildconf.js,v 1.4 2003/12/04 01:59:46 wez Exp $
+// $Id: buildconf.js,v 1.5 2003/12/04 13:38:47 wez Exp $
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: buildconf.js,v 1.4 2003/12/04 01:59:46 wez Exp $ */
+/* $Id: buildconf.js,v 1.5 2003/12/04 13:38:47 wez Exp $ */
// This generates a configure script for win32 build
WScript.StdOut.WriteLine("Rebuilding configure.js");
@@ -25,6 +25,7 @@
var C = FSO.CreateTextFile("configure.js", true);
var modules = "";
+var seen = new Array();
function file_get_contents(filename)
{
@@ -42,12 +43,34 @@
var f = FSO.GetFolder(dirname);
var fc = new Enumerator(f.SubFolders);
- var c;
+ var c, i, ok, n;
for (; !fc.atEnd(); fc.moveNext())
{
+ ok = true;
+ /* check if we already picked up a module with the same dirname;
+ * if we have, don't include it here */
+ n = FSO.GetFileName(fc.item());
+
+ if (n == 'CVS' || n == 'tests')
+ continue;
+
+ // WScript.StdOut.WriteLine("checking " + dirname + "/" + n);
+ for (i = 0; i < seen.length; i++) {
+ if (seen[i] == n) {
+ ok = false;
+ break;
+ }
+ }
+ if (!ok) {
+ WScript.StdOut.WriteLine("Skipping " + dirname + "/" + n + "
-- already have a module with that name");
+ continue;
+ }
+ seen[seen.length] = n;
+
c = FSO.BuildPath(fc.item(), "config.w32");
if (FSO.FileExists(c)) {
//WScript.StdOut.WriteLine(c);
+ modules += "configure_module_dirname =
condense_path(FSO.GetParentFolderName('" + c.replace(new RegExp('(["\\\\])', "g"),
'\\$1') + "'));\r\n";
modules += file_get_contents(c);
}
}
@@ -69,6 +92,7 @@
find_config_w32("sapi");
find_config_w32("ext");
find_config_w32("pecl");
+find_config_w32("..\\pecl");
// Look for ARG_ENABLE or ARG_WITH calls
re = new RegExp("(ARG_(ENABLE|WITH)\([^;]+\);)", "gm");
Index: php-src/win32/build/confutils.js
diff -u php-src/win32/build/confutils.js:1.14 php-src/win32/build/confutils.js:1.15
--- php-src/win32/build/confutils.js:1.14 Thu Dec 4 07:34:29 2003
+++ php-src/win32/build/confutils.js Thu Dec 4 08:38:47 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-// $Id: confutils.js,v 1.14 2003/12/04 12:34:29 rrichards Exp $
+// $Id: confutils.js,v 1.15 2003/12/04 13:38:47 wez Exp $
var STDOUT = WScript.StdOut;
var STDERR = WScript.StdErr;
@@ -31,8 +31,12 @@
PROGRAM_FILES = "C:\\Program Files\\";
}
-STDOUT.WriteLine("program files " + PROGRAM_FILES);
+if (!FSO.FileExists("README.CVS-RULES")) {
+ STDERR.WriteLine("Must be run from the root of the php source");
+ WScript.Quit(10);
+}
+// TODO: pick this up from configure.in
var PHP_VERSION = 5;
configure_args = new Array();
@@ -44,6 +48,20 @@
extension_include_code = "";
extension_module_ptrs = "";
+function condense_path(path)
+{
+ var cd = WshShell.CurrentDirectory;
+
+ path = FSO.GetAbsolutePathName(path);
+
+ if (path.substr(0, cd.length).toLowerCase()
+ == cd.toLowerCase() &&
+ (path.charCodeAt(cd.length) == 92 ||
path.charCodeAt(cd.length) == 47)) {
+ return path.substr(cd.length + 1);
+ }
+ return path;
+}
+
function ConfigureArg(type, optname, helptext, defval)
{
var opptype = type == "enable" ? "disable" : "without";
@@ -425,6 +443,7 @@
var res_prod_name = res_desc;
var credits;
var thanks = "";
+ var logo = "";
if (FSO.FileExists(creditspath + '/CREDITS')) {
credits = FSO.OpenTextFile(creditspath + '/CREDITS', 1);
@@ -437,9 +456,13 @@
}
credits.Close();
}
+
+ if (makefiletarget.match(new RegExp("\\.exe$"))) {
+ logo = " /D WANT_LOGO ";
+ }
MFO.WriteLine("$(BUILD_DIR)\\" + resname + ": win32\\build\\template.rc");
- MFO.WriteLine("\t$(RC) /fo $(BUILD_DIR)\\" + resname +
+ MFO.WriteLine("\t$(RC) /fo $(BUILD_DIR)\\" + resname + logo +
' /d FILE_DESCRIPTION="\\"' + res_desc + '\\"" /d FILE_NAME="\\"' +
makefiletarget +
'\\"" /d PRODUCT_NAME="\\"' + res_prod_name + '\\"" /d
THANKS_GUYS="\\"' +
thanks + '\\"" win32\\build\\template.rc');
@@ -454,7 +477,7 @@
var ldflags;
var resname;
- STDOUT.WriteLine("Enabling sapi/" + sapiname);
+ STDOUT.WriteLine("Enabling SAPI " + configure_module_dirname);
MFO.WriteBlankLines(1);
MFO.WriteLine("# objects for SAPI " + sapiname);
@@ -464,16 +487,16 @@
ADD_FLAG('CFLAGS_' + SAPI, cflags);
}
- ADD_SOURCES("sapi/" + sapiname, file_list, sapiname);
+ ADD_SOURCES(configure_module_dirname, file_list, sapiname);
MFO.WriteBlankLines(1);
MFO.WriteLine("# SAPI " + sapiname);
MFO.WriteBlankLines(1);
/* generate a .res file containing version information */
- resname = generate_version_info_resource(makefiletarget, "sapi/" + sapiname);
+ resname = generate_version_info_resource(makefiletarget,
configure_module_dirname);
MFO.WriteLine(makefiletarget + ": $(BUILD_DIR)\\" + makefiletarget);
- MFO.WriteLine("[EMAIL PROTECTED] SAPI " + sapiname + " build complete");
+ MFO.WriteLine("[EMAIL PROTECTED] SAPI " + configure_module_dirname + "/" +
sapiname + " build complete");
MFO.WriteLine("$(BUILD_DIR)\\" + makefiletarget + ": $(" + SAPI +
"_GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(BUILD_DIR)\\" + resname);
if (makefiletarget.match(new RegExp("\\.dll$"))) {
@@ -512,11 +535,11 @@
}
if (shared) {
- STDOUT.WriteLine("Enabling ext/" + extname + " [shared]");
+ STDOUT.WriteLine("Enabling extension " + configure_module_dirname + "
[shared]");
cflags = "/D COMPILE_DL_" + EXT + " /D " + EXT + "_EXPORTS=1 " +
cflags;
ADD_FLAG("CFLAGS_PHP", "/D COMPILE_DL_" + EXT);
} else {
- STDOUT.WriteLine("Enabling ext/" + extname);
+ STDOUT.WriteLine("Enabling extension " + configure_module_dirname);
}
MFO.WriteBlankLines(1);
@@ -524,13 +547,13 @@
MFO.WriteBlankLines(1);
- ADD_SOURCES("ext/" + extname, file_list, extname);
+ ADD_SOURCES(configure_module_dirname, file_list, extname);
MFO.WriteBlankLines(1);
if (shared) {
dllname = "php_" + extname + ".dll";
- var resname = generate_version_info_resource(dllname, "ext/" +
extname);
+ var resname = generate_version_info_resource(dllname,
configure_module_dirname);
MFO.WriteLine("$(BUILD_DIR)\\" + dllname + ": $(" + EXT +
"_GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(BUILD_DIR)\\" + resname);
MFO.WriteLine("\t$(LD) /out:$(BUILD_DIR)\\" + dllname + "
$(DLL_LDFLAGS) $(LDFLAGS) $(LDFLAGS_" + EXT + ") $(" + EXT + "_GLOBAL_OBJS)
$(BUILD_DIR)\\$(PHPLIB) $(LIBS_" + EXT + ") $(LIBS) $(BUILD_DIR)\\" + resname);
@@ -559,7 +582,7 @@
if (s.match(re)) {
c = file_get_contents(s);
if (c.match("phpext_")) {
- extension_include_code += '#include "ext/' +
extname + '/' + FSO.GetFileName(s) + '"\r\n';
+ extension_include_code += '#include "' +
configure_module_dirname + '/' + FSO.GetFileName(s) + '"\r\n';
}
}
}
Index: php-src/win32/build/template.rc
diff -u php-src/win32/build/template.rc:1.2 php-src/win32/build/template.rc:1.3
--- php-src/win32/build/template.rc:1.2 Wed Dec 3 21:12:36 2003
+++ php-src/win32/build/template.rc Thu Dec 4 08:38:47 2003
@@ -1,5 +1,5 @@
/* This is a template RC file.
- * $Id: template.rc,v 1.2 2003/12/04 02:12:36 wez Exp $
+ * $Id: template.rc,v 1.3 2003/12/04 13:38:47 wez Exp $
* Do not edit with MSVC */
#ifdef APSTUDIO_INVOKED
# error dont edit with MSVC
@@ -15,7 +15,9 @@
# define THANKS_GUYS ""
#endif
+#ifdef WANT_LOGO
0 ICON win32\build\php.ico
+#endif
#define XSTRVER4(maj, min, rel, build) #maj "." #min "." #rel "." #build
#define XSTRVER3(maj, min, rel) #maj "." #min "." #rel
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php