summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--win32/build/confutils.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index 4cf61beb80..a4ea2bfa26 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -1981,6 +1981,7 @@ function PHP_INSTALL_HEADERS(dir, headers_list)
dir = dir.replace(new RegExp("/", "g"), "\\");
for (i in headers_list) {
+ found = false;
src = headers_list[i];
src = src.replace(new RegExp("/", "g"), "\\");
isdir = FSO.FolderExists(dir + src);
@@ -1991,11 +1992,31 @@ function PHP_INSTALL_HEADERS(dir, headers_list)
}
headers_install[headers_install.length] = [dir + src, 'dir',''];
ADD_FLAG("INSTALL_HEADERS_DIR", dir + src);
+ found = true;
} else if (isfile) {
dirname = FSO.GetParentFolderName(dir + src);
headers_install[headers_install.length] = [dir + src, 'file', dirname];
ADD_FLAG("INSTALL_HEADERS", dir + src);
+ found = true;
} else {
+ path = configure_module_dirname + "\\"+ src;
+ isdir = FSO.FolderExists(path);
+ isfile = FSO.FileExists(path);
+ if (isdir) {
+ if (src.length > 0 && src.substr(src.length - 1) != '/' && src.substr(src.length - 1) != '\\') {
+ src += '\\';
+ }
+ headers_install[headers_install.length] = [path, 'dir',''];
+ ADD_FLAG("INSTALL_HEADERS_DIR", path);
+ } else if (isfile) {
+ dirname = FSO.GetParentFolderName(path);
+ headers_install[headers_install.length] = [path, 'file', dir];
+ ADD_FLAG("INSTALL_HEADERS", dir + src);
+ found = true;
+ }
+ }
+
+ if (found == false) {
STDOUT.WriteLine(headers_list);
ERROR("Cannot find header " + dir + src);
}