From 7c6310852e51ac62785361df5f32e761919fbf98 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 9 Jan 2011 14:01:21 +0000 Subject: - let try to fix pecl header install so we can do the same than unix, install them in ext/ instead of pecl --- win32/build/confutils.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'win32') 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); } -- cgit v1.2.1