]> granicus.if.org Git - php/commitdiff
- add PHP_INSTALL_HEADERS to all parts (core&exts) exposing headers, generate the...
authorPierre Joye <pajoye@php.net>
Sat, 11 Dec 2010 22:18:10 +0000 (22:18 +0000)
committerPierre Joye <pajoye@php.net>
Sat, 11 Dec 2010 22:18:10 +0000 (22:18 +0000)
25 files changed:
ext/date/config.w32
ext/dom/config.w32
ext/ereg/config.w32
ext/filter/config.w32
ext/gd/config.w32
ext/hash/config.w32
ext/iconv/config.w32
ext/json/config.w32
ext/libxml/config.w32
ext/mbstring/config.w32
ext/mysqli/config.w32
ext/mysqlnd/config.w32
ext/pcre/config.w32
ext/pdo/config.w32
ext/session/config.w32
ext/sockets/config.w32
ext/spl/config.w32
ext/sqlite3/config.w32
ext/standard/config.w32
ext/xml/config.w32
main/php.h
sapi/embed/config.w32
win32/build/config.w32
win32/build/confutils.js
win32/syslog.reg

index 368ddef97a1426974ae95e3eb17b0867d25d4136..85b0e6519b39b28b04aef3d95da5c1ea15181263 100755 (executable)
@@ -7,6 +7,8 @@ AC_DEFINE('HAVE_DATE', 1, 'Have date/time support');
 
 ADD_FLAG('CFLAGS_DATE', "/wd4244");
 
+PHP_INSTALL_HEADERS("ext/date/", "php_date.h lib/timelib.h lib/timelib_structs.h lib/timelib_config.h");
+
 var tl_config = FSO.CreateTextFile("ext/date/lib/timelib_config.h", true);
 tl_config.WriteLine("#include \"config.w32.h\"");
 tl_config.Close();
index 8fba39336adc23308d7166808059f3c6e63e10bd..cbe15af1abbe343e27c3e92eb34f31276e7165e4 100644 (file)
@@ -19,6 +19,7 @@ if (PHP_DOM == "yes") {
                if (!PHP_DOM_SHARED) {
                        ADD_FLAG("CFLAGS_DOM", "/D LIBXML_STATIC ");
                }
+               PHP_INSTALL_HEADERS("ext/dom", "xml_common.h");
        } else {
                WARNING("dom support can't be enabled, libxml is not enabled")
                PHP_DOM = "no"
index 8b383ddfeb252a5366e2bb770170bf9c03040b2e..18a002b44da030ace43206342c2b18a3431d93f6 100644 (file)
@@ -8,4 +8,5 @@ if (PHP_EREG != "no") {
        ADD_SOURCES("ext/ereg/regex", "regcomp.c regexec.c regerror.c regfree.c", "ereg");
        AC_DEFINE('REGEX', 1, 'Bundled regex');
        AC_DEFINE('HSREGEX', 1, 'Bundled regex');
-}
\ No newline at end of file
+       PHP_INSTALL_HEADERS("ext/ereg", "php_ereg.h php_regex.h regex/");
+}
index 083555a4c77a7fb809b7bb0e6ed7e12ff371b68d..b74f3a2fd097117476a7aef84683e6f1f533437d 100644 (file)
@@ -5,4 +5,5 @@ ARG_ENABLE("filter", "Filter Support", "yes");
 
 if (PHP_FILTER == "yes") {
        EXTENSION("filter", "filter.c sanitizing_filters.c logical_filters.c callback_filter.c");
+       PHP_INSTALL_HEADERS("ext/filter", "php_filter.h");
 }
index b05dbe445e27066fe38c3887931bd408ea529a6b..38292d52f4f1d58f5ec0a363426563dcdf397485 100644 (file)
@@ -70,6 +70,8 @@ if (PHP_GD != "no") {
 /D USE_GD_IOCTX \
 /D MSWIN32 \
                ");
+               
+               PHP_INSTALL_HEADERS("", "ext/gd ext/gd/libgd" );
                } else {
                WARNING("gd not enabled; libraries and headers not found");
        }
index 3fd736bf17593fbff2d533018cb7308e1dd3ab19..6a2fcff18f1ee31eba7d8791bf71e597e211939d 100644 (file)
@@ -16,5 +16,10 @@ if (PHP_HASH != "no") {
        EXTENSION("hash", "hash.c hash_md.c hash_sha.c hash_ripemd.c hash_haval.c "
                + "hash_tiger.c hash_gost.c hash_snefru.c hash_whirlpool.c "
                + "hash_adler32.c hash_crc32.c hash_salsa.c hash_joaat.c hash_fnv.c");
+
+               PHP_INSTALL_HEADERS("ext/hash/", "php_hash.h php_hash_md.h php_hash_sha.h php_hash_ripemd.h " +
+               "php_hash_haval.h php_hash_tiger.h php_hash_gost.h php_hash_snefru.h " + 
+               "php_hash_whirlpool.h php_hash_adler32.h php_hash_crc32.h php_hash_salsa.h " +
+               "php_hash_types.h");
 }
 
index 7bc649e2ad71f3fe67b2b496ec1bfd2aa626eaf9..00ab2724231260e246eefa5c8910357d479a10cd 100644 (file)
@@ -19,6 +19,7 @@ if (PHP_ICONV != "no") {
                if (!PHP_ICONV_SHARED) {
                        ADD_DEF_FILE("ext\\iconv\\php_iconv.def");
                }
+               PHP_INSTALL_HEADERS("", "ext/iconv");
        } else {
                WARNING("iconv support can't be enabled, libraries or headers are missing")
                PHP_ICONV = "no";
index a3559e08b7be620ea5f0b5f856625b7e4340eea3..06a48e05ed2e5b458f406a6991483c9ceb69dfec 100644 (file)
@@ -6,5 +6,6 @@ ARG_ENABLE("json", "JavaScript Object Serialization support", "yes");
 if (PHP_JSON != "no") {
        EXTENSION('json', 'json.c', PHP_JSON_SHARED, "");
        ADD_SOURCES(configure_module_dirname, "JSON_parser.c utf8_decode.c utf8_to_utf16.c", "json");
+       PHP_INSTALL_HEADERS("ext/json/", "php_json.h");
 }
 
index 7c9988f7e951d8f47ac81bee995bbf7d38013950..92144f9ad04bd23232af4a8db77390a5764b402c 100644 (file)
@@ -15,6 +15,7 @@ if (PHP_LIBXML == "yes") {
                if (!PHP_LIBXML_SHARED) {
                        ADD_DEF_FILE("ext\\libxml\\php_libxml2.def");
                }
+               PHP_INSTALL_HEADERS("ext/libxml/", "php_libxml.h");
        } else {
                WARNING("libxml support can't be enabled, iconv or libxml are missing")
                PHP_LIBXML = "no"
index 2fdd9d3514cdc254ef55d4f8188170cbf3821e20..ae0972f62a40c9f1405c013751372a9d504e22a1 100644 (file)
@@ -54,6 +54,8 @@ if (PHP_MBSTRING != "no") {
        AC_DEFINE('HAVE_MBSTR_RU', 1, 'RU');
        AC_DEFINE('HAVE_MBSTR_TW', 1, 'TW');
 
+       PHP_INSTALL_HEADERS("ext/mbstring", "mbstring.h oniguruma/oniguruma.h php_mbregex.h php_onig_compat.h libmbfl/config.h libmbfl/mbfl/eaw_table.h libmbfl/mbfl/mbfilter.h libmbfl/mbfl/mbfilter_8bit.h libmbfl/mbfl/mbfilter_pass.h libmbfl/mbfl/mbfilter_wchar.h libmbfl/mbfl/mbfl_allocators.h libmbfl/mbfl/mbfl_consts.h libmbfl/mbfl/mbfl_convert.h libmbfl/mbfl/mbfl_defs.h libmbfl/mbfl/mbfl_encoding.h libmbfl/mbfl/mbfl_filter_output.h libmbfl/mbfl/mbfl_ident.h libmbfl/mbfl/mbfl_language.h libmbfl/mbfl/mbfl_memory_device.h libmbfl/mbfl/mbfl_string.h");
+
        if (PHP_MBREGEX != "no") {
                AC_DEFINE('HAVE_STDARG_PROTOTYPES', 1, 'have stdarg.h');
                AC_DEFINE('HAVE_MBREGEX', 1);
@@ -72,5 +74,6 @@ if (PHP_MBSTRING != "no") {
                        koi8.c koi8_r.c sjis.c utf8.c unicode.c utf16_be.c utf16_le.c \
                        utf32_be.c utf32_le.c gb18030.c", "mbstring");
                ADD_SOURCES("ext/mbstring", "php_mbregex.c", "mbstring");
+               PHP_INSTALL_HEADERS("ext/mbstring", "php_mbregex.h");
        }
 }
index 30def9424d2dea61cb00a40a1fb7b062b9018178..ab8bcd0087e222b518cb59bf7f949c166e44613a 100644 (file)
@@ -28,6 +28,7 @@ if (PHP_MYSQLI != "no") {
                AC_DEFINE('HAVE_MYSQLILIB', 1, 'Have MySQLi library');
                ADD_EXTENSION_DEP('mysqli', 'mysqlnd', true);
                MESSAGE("\tmysqlnd build");
+               PHP_INSTALL_HEADERS("ext/mysqli", "php_mysqli_structs.h");
        } else {
                if (CHECK_LIB("libmysql.lib", "mysqli", PHP_MYSQLI) &&
                        CHECK_HEADER_ADD_INCLUDE("mysql.h", "CFLAGS_MYSQLI", PHP_MYSQLI + 
@@ -36,6 +37,7 @@ if (PHP_MYSQLI != "no") {
                        EXTENSION("mysqli", mysqli_source);
                        AC_DEFINE('HAVE_MYSQLILIB', 1, 'Have MySQLi library');
                        MESSAGE("\tlibmysql build");
+                       PHP_INSTALL_HEADERS("ext/mysqli", "php_mysqli_structs.h");
                } else {
                        WARNING("mysqli not enabled; libraries and headers not found");
                        PHP_MYSQLI = "no"
index ba0ebd90add246a0881f43e1295907d1e176b219..4a32cbcb9d8b4dbd903d2b7967f754752cc40016 100644 (file)
@@ -25,5 +25,6 @@ if (PHP_MYSQLND != "no") {
                {
                        AC_DEFINE("MYSQLND_COMPRESSION_ENABLED", 1, "Compression support");
                }
+               PHP_INSTALL_HEADERS("", "ext/mysqlnd");
        }
 }
index 05b3abcd1a388ddf517ca86a823a98c0ddcdf738..5d6fa90594e8eedfb525b80ce28b4d795191b67f 100644 (file)
@@ -9,3 +9,4 @@ ADD_DEF_FILE("ext\\pcre\\php_pcre.def");
 AC_DEFINE('HAVE_BUNDLED_PCRE', 1, 'Using bundled PCRE library');
 AC_DEFINE('HAVE_PCRE', 1, 'Have PCRE library');
 PHP_PCRE="yes";
+PHP_INSTALL_HEADERS("ext/pcre", "php_pcre.h pcrelib/");
index 9fb38019818f1864c187b89eb55c0a38bc753b0d..c85f2e55e4b19281fc7da9dd613346580c4e075f 100755 (executable)
@@ -6,4 +6,5 @@ ARG_ENABLE("pdo", "Enable PHP Data Objects support", "no");
 if (PHP_PDO != "no") {
        EXTENSION('pdo', 'pdo.c pdo_dbh.c pdo_stmt.c pdo_sql_parser.c pdo_sqlstate.c', false /* force static, PHP_PDO_SHARED is broken yet somehow */);
        ADD_EXTENSION_DEP('pdo', 'spl', true);
+       PHP_INSTALL_HEADERS("ext/pdo", "php_pdo.h php_pdo_driver.h");
 }
index fd568f3c3e639d4f785d9f2abf45809b16c1982b..27114f11d36b9bdba1104db6d7b8f4f2b66dd312 100644 (file)
@@ -6,6 +6,5 @@ ARG_ENABLE("session", "session support", "yes");
 if (PHP_SESSION == "yes") {
        EXTENSION("session", "session.c mod_files.c mod_mm.c mod_user.c", false /* never shared */);
        AC_DEFINE("HAVE_PHP_SESSION", 1, "Session support");
+       PHP_INSTALL_HEADERS("ext/session/", "mod_mm.h");
 }
-
-
index 1672f85b156022043fc88fb71c9c27252dd3af7f..8b633819003924ec7f052798f2bf9532687bdf7a 100644 (file)
@@ -8,6 +8,7 @@ if (PHP_SOCKETS != "no") {
        && CHECK_HEADER_ADD_INCLUDE("winsock.h", "CFLAGS_SOCKETS")) {
                EXTENSION('sockets', 'sockets.c');
                AC_DEFINE('HAVE_SOCKETS', 1);
+               PHP_INSTALL_HEADERS("ext/sockets", "php_sockets.h");
        } else {
                WARNING("sockets not enabled; libraries and headers not found");
        }
index e594b0eb485bcc455035ab45dd7874e597ac9b5f..77cbd20346a2961606fe21a63d8a159e0b19ea57 100644 (file)
@@ -4,3 +4,4 @@
 EXTENSION("spl", "php_spl.c spl_functions.c spl_engine.c spl_iterators.c spl_array.c spl_directory.c spl_exceptions.c spl_observer.c spl_dllist.c spl_heap.c spl_fixedarray.c", false /*never shared */);
 AC_DEFINE('HAVE_SPL', 1);
 PHP_SPL="yes";
+PHP_INSTALL_HEADERS("ext/spl", "php_spl.h spl_array.h spl_directory.h spl_engine.h spl_exceptions.h spl_functions.h spl_iterators.h spl_observer.h spl_dllist.h spl_heap.h spl_fixedarray.h");
index 4d9dca40aecb7ab6fea5f70e1735ec4f817c770c..01e4625feddd14e2db7565d8023247c3f77e2a7d 100644 (file)
@@ -10,4 +10,5 @@ if (PHP_SQLITE3 != "no") {
        ADD_SOURCES(configure_module_dirname + "/libsqlite", "sqlite3.c", "sqlite3");
 
        AC_DEFINE("HAVE_SQLITE3", 1, "SQLite support");
+       PHP_INSTALL_HEADERS("ext/sqlite3", "libsqlite/sqlite3.h");
 }
index 70b250137a53bc2d1d9d751cec687050c8a3bf83..a03235822c5d356d153db17bb75c5395787a3d76 100644 (file)
@@ -21,7 +21,7 @@ EXTENSION("standard", "array.c base64.c basic_functions.c browscap.c \
        php_fopen_wrapper.c credits.c css.c var_unserializer.c ftok.c sha1.c \
        user_filters.c uuencode.c filters.c proc_open.c \
        streamsfuncs.c http.c flock_compat.c", false /* never shared */);
-
+       PHP_INSTALL_HEADERS("", "ext/standard");
 if (PHP_MBREGEX != "no") {
        CHECK_HEADER_ADD_INCLUDE("oniguruma.h", "CFLAGS_STANDARD", PHP_MBREGEX + ";ext\\mbstring\\oniguruma")   
 }
index ed0352701b819355dd2cc11d14ffde7fa7d53adb..4ee0bd160281f2d406218141eb46d70f895c3fbf 100644 (file)
@@ -11,8 +11,9 @@ if (PHP_XML == "yes") {
                if (!PHP_XML_SHARED) {
                        ADD_FLAG("CFLAGS_XML", "/D LIBXML_STATIC ");
                }
+               PHP_INSTALL_HEADERS("", "ext/xml");
        } else {
                WARNING("xml support can't be enabled, libraries or headers are missing")
                PHP_ZLIB = "no"
        }
-}
\ No newline at end of file
+}
index 2db910eb5631c8254637ed4620cdda31bdd9a7b8..ca31fbf9d1618530f1b749eedeaca4520fbe3e42 100644 (file)
@@ -147,7 +147,11 @@ END_EXTERN_C()
 #endif
 
 #ifndef HAVE_SOCKLEN_T
+# if PHP_WIN32
+typedef int socklen_t;
+# else
 typedef unsigned int socklen_t;
+# endif
 #endif
 
 #define CREATE_MUTEX(a, b)
index 8ea0781ed3c7253ce70a79da5c316fc0a7db0f07..f3cc60d6007e23886fa4dba822f6535fffd076b7 100644 (file)
@@ -5,4 +5,5 @@ ARG_ENABLE('embed', 'Embedded SAPI library', 'no');
 
 if (PHP_EMBED != "no") {
        SAPI('embed', 'php_embed.c', 'php' + PHP_VERSION + 'embed.lib');
+       PHP_INSTALL_HEADERS("sapi/embed", "php_embed.h");
 }
index 6d9375205f9588aebe87536f96c77748685ce69c..2eaa8b3adb8d3516fcfc9c04c0f1e0a0b9b2a2a0 100644 (file)
@@ -356,7 +356,7 @@ 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/");
+PHP_INSTALL_HEADERS("", "Zend/ TSRM/ main/ main/streams/");
 
 STDOUT.WriteBlankLines(1);
 
index 4fdbaac33a7466940a87c7a4c77dc10852e072dd..9a00f55dedc56e7ad91a7e5a59d24f519354f514 100644 (file)
@@ -1631,6 +1631,18 @@ function generate_makefile()
 \r
        var TF = FSO.OpenTextFile("win32/build/Makefile", 1);\r
        MF.Write(TF.ReadAll());\r
+\r
+       MF.WriteLine("install-headers:");\r
+       MF.WriteLine("  @if not exist $(PHP_PREFIX)\\include mkdir $(PHP_PREFIX)\\include >nul");\r
+       MF.WriteLine("  @for %D in ($(INSTALL_HEADERS_DIR)) do @if not exist $(PHP_PREFIX)\\include\\%D mkdir $(PHP_PREFIX)\\include\\%D >nul");\r
+       for (i in headers_install) {\r
+               if (headers_install[i][2] != "") {\r
+                               MF.WriteLine("  @if not exist $(PHP_PREFIX)\\include\\" + headers_install[i][2] + " mkdir $(PHP_PREFIX)\\include\\" + \r
+                                                                                               headers_install[i][2] + ">nul");\r
+                               MF.WriteLine("  @copy " + headers_install[i][0] + " " + "$(PHP_PREFIX)\\include\\" + headers_install[i][2] + " /y >nul");\r
+               }\r
+       }\r
+       MF.WriteLine("  @for %D in ($(INSTALL_HEADERS_DIR)) do @copy %D*.h $(PHP_PREFIX)\\include\\%D /y >nul");\r
        TF.Close();\r
 \r
        MF.WriteBlankLines(2);\r
@@ -1851,25 +1863,36 @@ function _inner_glob(base, p, parts)
        return items;\r
 }\r
 \r
-function PHP_INSTALL_HEADERS(headers_list)\r
+function PHP_INSTALL_HEADERS(dir, headers_list)\r
 {\r
        headers_list = headers_list.split(new RegExp("\\s+"));\r
        headers_list.sort();\r
+       if (dir.length > 0 && dir.substr(dir.length - 1) != '/') {\r
+               dir += '/';\r
+       }\r
+       dir = dir.replace(new RegExp("/", "g"), "\\");\r
 \r
        for (i in headers_list) {\r
                src = headers_list[i];\r
                src = src.replace(new RegExp("/", "g"), "\\");\r
-               isdir = FSO.FolderExists(src);\r
-               isfile = FSO.FileExists(src);\r
+               isdir = FSO.FolderExists(dir + src);\r
+               isfile = FSO.FileExists(dir + src);\r
                if (isdir) {\r
-                       headers_install[headers_install.length] = [src, 'dir'];\r
-                       ADD_FLAG("INSTALL_HEADERS_DIR", src);\r
+                       if (src.length > 0 && src.substr(src.length - 1) != '/') {\r
+                               src += '\\';\r
+                       }\r
+                       headers_install[headers_install.length] = [dir + src, 'dir',''];\r
+                       ADD_FLAG("INSTALL_HEADERS_DIR", dir + src);\r
                } else if (isfile) {\r
-                       headers_install[headers_install.length] = [src, 'file'];\r
-                       ADD_FLAG("INSTALL_HEADERS", src);\r
+                       dirname = FSO.GetParentFolderName(dir + src);\r
+                       headers_install[headers_install.length] = [dir + src, 'file', dirname];\r
+                       ADD_FLAG("INSTALL_HEADERS", dir + src);\r
+               } else {\r
+                       STDOUT.WriteLine(headers_list);\r
+                       ERROR("Cannot find header " + dir + src);\r
                }\r
        }\r
-       output_as_table(["Headers", "Type"], headers_install);\r
+       output_as_table(["Headers", "Type", "target"], headers_install);\r
 }\r
 \r
 // for snapshot builders, this option will attempt to enable everything\r
index 2baa88e36661f6f970d34235145b842565aa9765..4d3e273970f91184fdc65c6525ea397f96faa803 100644 (file)
@@ -1,5 +1,5 @@
 REGEDIT4\r
 \r
-[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\PHP-5.1.0-dev]\r
+[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\PHP-5.3.99-dev]\r
 "TypesSupported"=dword:00000007\r
-"EventMessageFile"="C:\\php5\\php5ts.dll"\r
+"EventMessageFile"="g:\\test\\srcinstall6\\php5ts_debug.dll"\r