From ff60a98755703cbcd2d89a7cef14c02271bdd0e7 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Fri, 10 Dec 2010 16:10:08 +0000 Subject: [PATCH] - add initial PHP_INSTALL_HEADERS, one step closer to phpize --- win32/build/config.w32 | 4 +++- win32/build/confutils.js | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/win32/build/config.w32 b/win32/build/config.w32 index 774947b14c..6d9375205f 100644 --- a/win32/build/config.w32 +++ b/win32/build/config.w32 @@ -107,7 +107,7 @@ if (PHP_DEBUG == "yes" && PHP_DEBUG_PACK == "yes") { } ARG_ENABLE('zts', 'Thread safety', 'yes'); // Configures the hard-coded installation dir -ARG_ENABLE('prefix', 'where PHP will be installed', ''); +ARG_WITH('prefix', 'where PHP will be installed', ''); if (PHP_PREFIX == '') { PHP_PREFIX = "C:\\php"; if (PHP_DEBUG == "yes") @@ -356,6 +356,8 @@ ADD_SOURCES("main/streams", "streams.c cast.c memory.c filter.c plain_wrapper.c ADD_SOURCES("win32", "glob.c readdir.c \ registry.c select.c sendmail.c time.c winutil.c wsyslog.c globals.c"); +PHP_INSTALL_HEADERS("Zend/ TSRM/ include/ main/ main/streams/"); + STDOUT.WriteBlankLines(1); /* Can we build with IPv6 support? */ diff --git a/win32/build/confutils.js b/win32/build/confutils.js index ed3f2424f9..4fdbaac33a 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -34,6 +34,9 @@ var extensions_enabled = new Array(); /* Store the SAPI enabled (summary + QA check) */ var sapi_enabled = new Array(); +/* Store the headers to install */ +var headers_install = new Array(); + /* Mapping CL version > human readable name */ var VC_VERSIONS = new Array(); VC_VERSIONS[1200] = 'MSVC6 (Visual C++ 6.0)'; @@ -1848,6 +1851,26 @@ function _inner_glob(base, p, parts) return items; } +function PHP_INSTALL_HEADERS(headers_list) +{ + headers_list = headers_list.split(new RegExp("\\s+")); + headers_list.sort(); + + for (i in headers_list) { + src = headers_list[i]; + src = src.replace(new RegExp("/", "g"), "\\"); + isdir = FSO.FolderExists(src); + isfile = FSO.FileExists(src); + if (isdir) { + headers_install[headers_install.length] = [src, 'dir']; + ADD_FLAG("INSTALL_HEADERS_DIR", src); + } else if (isfile) { + headers_install[headers_install.length] = [src, 'file']; + ADD_FLAG("INSTALL_HEADERS", src); + } + } + output_as_table(["Headers", "Type"], headers_install); +} // for snapshot builders, this option will attempt to enable everything // and you can then build everything, ignoring fatal errors within a module -- 2.50.1