]> granicus.if.org Git - php/commitdiff
- let try to fix pecl header install so we can do the same than unix, install them...
authorPierre Joye <pajoye@php.net>
Sun, 9 Jan 2011 14:01:21 +0000 (14:01 +0000)
committerPierre Joye <pajoye@php.net>
Sun, 9 Jan 2011 14:01:21 +0000 (14:01 +0000)
win32/build/confutils.js

index 4cf61beb80668bf796694ee6ef41e85df2a0cf52..2acfe6bb0a88c6c86f0c4fe31f7f026ff3941abd 100644 (file)
@@ -860,7 +860,8 @@ function CHECK_HEADER_ADD_INCLUDE(header_name, flag_name, path_to_check, use_env
        if (use_env == null) {\r
                use_env = true;\r
        }\r
-\r
+MESSAGE("******************" + path_to_check);\r
+MESSAGE("******************" + flag_name);\r
        // if true, add the dir part of the header_name to the include path\r
        if (add_dir_part == null) {\r
                add_dir_part = false;\r
@@ -1981,6 +1982,7 @@ function PHP_INSTALL_HEADERS(dir, headers_list)
        dir = dir.replace(new RegExp("/", "g"), "\\");\r
 \r
        for (i in headers_list) {\r
+               found = false;\r
                src = headers_list[i];\r
                src = src.replace(new RegExp("/", "g"), "\\");\r
                isdir = FSO.FolderExists(dir + src);\r
@@ -1991,11 +1993,31 @@ function PHP_INSTALL_HEADERS(dir, headers_list)
                        }\r
                        headers_install[headers_install.length] = [dir + src, 'dir',''];\r
                        ADD_FLAG("INSTALL_HEADERS_DIR", dir + src);\r
+                       found = true;\r
                } else if (isfile) {\r
                        dirname = FSO.GetParentFolderName(dir + src);\r
                        headers_install[headers_install.length] = [dir + src, 'file', dirname];\r
                        ADD_FLAG("INSTALL_HEADERS", dir + src);\r
+                       found = true;\r
                } else {\r
+                       path =  configure_module_dirname + "\\"+ src;\r
+                       isdir = FSO.FolderExists(path);\r
+                       isfile = FSO.FileExists(path);\r
+                       if (isdir) {\r
+                               if (src.length > 0 && src.substr(src.length - 1) != '/' && src.substr(src.length - 1) != '\\') {\r
+                                       src += '\\';\r
+                               }\r
+                               headers_install[headers_install.length] = [path, 'dir',''];\r
+                               ADD_FLAG("INSTALL_HEADERS_DIR", path);\r
+                       } else if (isfile) {\r
+                               dirname = FSO.GetParentFolderName(path);\r
+                               headers_install[headers_install.length] = [path, 'file', dir];\r
+                               ADD_FLAG("INSTALL_HEADERS", dir + src);\r
+                               found = true;\r
+                       }\r
+               }\r
+\r
+               if (found == false) {\r
                        STDOUT.WriteLine(headers_list);\r
                        ERROR("Cannot find header " + dir + src);\r
                }\r