ARG_WITH("iconv", "iconv support", "no");
-if (PHP_ICONV == "yes") {
- EXTENSION("iconv", "iconv.c");
- AC_DEFINE("HAVE_ICONV", 1, "Define if iconv extension is enabled");
- AC_DEFINE("HAVE_LIBICONV", 1, "Define if libiconv is available");
- AC_DEFINE("PHP_ICONV_IMPL", "\"libiconv\"", "Which iconv implementation to use");
- AC_DEFINE("ICONV_SUPPORTS_ERRNO", 1, "Whether iconv supports errno or not");
- CHECK_LIB("iconv.lib", "iconv");
- CHECK_HEADER_ADD_INCLUDE("iconv.h", "CFLAGS");
+if (PHP_ICONV != "no") {
+ if (CHECK_LIB("iconv.lib", "iconv", PHP_ICONV) && CHECK_HEADER_ADD_INCLUDE("iconv.h", "CFLAGS_ICONV", PHP_ICONV)) {
+ EXTENSION("iconv", "iconv.c");
+
+ AC_DEFINE("HAVE_ICONV", 1, "Define if iconv extension is enabled");
+ AC_DEFINE("HAVE_LIBICONV", 1, "Define if libiconv is available");
+ AC_DEFINE("PHP_ICONV_IMPL", "\"libiconv\"", "Which iconv implementation to use");
+ AC_DEFINE("ICONV_SUPPORTS_ERRNO", 1, "Whether iconv supports errno or not");
+ }
}
static php_iconv_err_t _php_iconv_mime_decode(smart_str *pretval, const char *str, size_t str_nbytes, const char *enc, const char **next_pos, int mode);
-static php_iconv_err_t php_iconv_stream_filter_register_factory();
-static php_iconv_err_t php_iconv_stream_filter_unregister_factory();
+static php_iconv_err_t php_iconv_stream_filter_register_factory(TSRMLS_D);
+static php_iconv_err_t php_iconv_stream_filter_unregister_factory(TSRMLS_D);
/* }}} */
/* {{{ static globals */
REGISTER_LONG_CONSTANT("ICONV_MIME_DECODE_STRICT", PHP_ICONV_MIME_DECODE_STRICT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("ICONV_MIME_DECODE_CONTINUE_ON_ERROR", PHP_ICONV_MIME_DECODE_CONTINUE_ON_ERROR, CONST_CS | CONST_PERSISTENT);
- if (php_iconv_stream_filter_register_factory() != PHP_ICONV_ERR_SUCCESS) {
+ if (php_iconv_stream_filter_register_factory(TSRMLS_C) != PHP_ICONV_ERR_SUCCESS) {
return FAILURE;
}
/* {{{ PHP_MSHUTDOWN_FUNCTION */
PHP_MSHUTDOWN_FUNCTION(miconv)
{
- php_iconv_stream_filter_unregister_factory();
+ php_iconv_stream_filter_unregister_factory(TSRMLS_C);
UNREGISTER_INI_ENTRIES();
return SUCCESS;
}
/* }}} */
/* {{{ php_iconv_stream_register_factory */
-static php_iconv_err_t php_iconv_stream_filter_register_factory()
+static php_iconv_err_t php_iconv_stream_filter_register_factory(TSRMLS_D)
{
static php_stream_filter_factory filter_factory = {
php_iconv_stream_filter_factory_create
/* }}} */
/* {{{ php_iconv_stream_unregister_factory */
-static php_iconv_err_t php_iconv_stream_filter_unregister_factory()
+static php_iconv_err_t php_iconv_stream_filter_unregister_factory(TSRMLS_D)
{
if (FAILURE == php_stream_filter_unregister_factory(
php_iconv_stream_filter_ops.label TSRMLS_CC)) {