Skip to content

Commit cc27d9e

Browse files
committed
Sync headers installation for extensions
This syncs the installed headers on *nix and Windows systems for these extensions and provides only what is intended to be used outside of php-src. - ext/iconv (without iconv_arginfo.h) - ext/mysqli - ext/phar - ext/sodium - ext/xml (without xml_arginfo.h)
1 parent 6fa4286 commit cc27d9e

File tree

8 files changed

+9
-11
lines changed

8 files changed

+9
-11
lines changed

ext/iconv/config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ int main(void) {
149149

150150
PHP_NEW_EXTENSION(iconv, iconv.c, $ext_shared,, [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1])
151151
PHP_SUBST(ICONV_SHARED_LIBADD)
152-
PHP_INSTALL_HEADERS([ext/iconv/])
152+
PHP_INSTALL_HEADERS([ext/iconv], [php_iconv.h])
153153
else
154154
AC_MSG_ERROR(Please reinstall the iconv library.)
155155
fi

ext/iconv/config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if (PHP_ICONV != "no") {
1717
if (!PHP_ICONV_SHARED) {
1818
ADD_DEF_FILE("ext\\iconv\\php_iconv.def");
1919
}
20-
PHP_INSTALL_HEADERS("", "ext/iconv");
20+
PHP_INSTALL_HEADERS("ext/iconv", "php_iconv.h");
2121
} else {
2222
WARNING("iconv support can't be enabled, libraries or headers are missing")
2323
PHP_ICONV = "no";

ext/mysqli/config.m4

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,6 @@ if test "$PHP_MYSQLI" != "no"; then
6565
mysqli_exception.c mysqli_result_iterator.c"
6666
PHP_NEW_EXTENSION(mysqli, $mysqli_sources, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
6767
PHP_SUBST(MYSQLI_SHARED_LIBADD)
68-
PHP_INSTALL_HEADERS([ext/mysqli/php_mysqli_structs.h])
69-
70-
if test "$PHP_MYSQLI" = "yes" || test "$PHP_MYSQLI" = "mysqlnd"; then
71-
PHP_ADD_EXTENSION_DEP(mysqli, mysqlnd)
72-
PHP_INSTALL_HEADERS([ext/mysqli/mysqli_mysqlnd.h])
73-
fi
68+
PHP_INSTALL_HEADERS([ext/mysqli],[php_mysqli_structs.h mysqli_mysqlnd.h])
69+
PHP_ADD_EXTENSION_DEP(mysqli, mysqlnd)
7470
fi

ext/mysqli/config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ if (PHP_MYSQLI != "no") {
2222
if (PHP_MYSQLI != "no") {
2323
EXTENSION("mysqli", mysqli_source, PHP_MYSQLI_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
2424
ADD_EXTENSION_DEP('mysqli', 'mysqlnd', true);
25-
PHP_INSTALL_HEADERS("ext/mysqli", "php_mysqli_structs.h");
25+
PHP_INSTALL_HEADERS("ext/mysqli", "php_mysqli_structs.h mysqli_mysqlnd.h");
2626
}
2727
}

ext/phar/config.w32

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ if (PHP_PHAR != "no") {
3535
}
3636
}
3737
ADD_EXTENSION_DEP('phar', 'spl', true);
38+
PHP_INSTALL_HEADERS("ext/phar", "php_phar.h");
3839

3940
ADD_MAKEFILE_FRAGMENT();
4041
}

ext/sodium/config.m4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ if test "$PHP_SODIUM" != "no"; then
1515
SODIUM_COMPILER_FLAGS="$LIBSODIUM_CFLAGS -Wno-type-limits"
1616
AX_CHECK_COMPILE_FLAG([-Wno-logical-op], SODIUM_COMPILER_FLAGS="$SODIUM_COMPILER_FLAGS -Wno-logical-op", , [-Werror])
1717
PHP_NEW_EXTENSION(sodium, libsodium.c sodium_pwhash.c, $ext_shared, , $SODIUM_COMPILER_FLAGS)
18+
PHP_INSTALL_HEADERS([ext/sodium], [php_libsodium.h])
1819
PHP_SUBST(SODIUM_SHARED_LIBADD)
1920
fi

ext/xml/config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ if test "$PHP_XML" != "no"; then
3232

3333
PHP_NEW_EXTENSION(xml, xml.c $xml_extra_sources, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
3434
PHP_SUBST(XML_SHARED_LIBADD)
35-
PHP_INSTALL_HEADERS([ext/xml/])
35+
PHP_INSTALL_HEADERS([ext/xml], [expat_compat.h php_xml.h])
3636
AC_DEFINE(HAVE_XML, 1, [ ])
3737
fi

ext/xml/config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if (PHP_XML == "yes") {
1313
if (!PHP_XML_SHARED) {
1414
ADD_FLAG("CFLAGS_XML", "/D LIBXML_STATIC ");
1515
}
16-
PHP_INSTALL_HEADERS("", "ext/xml");
16+
PHP_INSTALL_HEADERS("ext/xml/", "expat_compat.h php_xml.h");
1717
} else {
1818
WARNING("xml support can't be enabled, libraries or headers are missing")
1919
PHP_XML = "no"

0 commit comments

Comments
 (0)