PHP 7.4: ulong->unsigned long, uint->uint32_t
[m6w6/ext-http] / config9.m4
index f7619c572ff53224d5342f5480425499ec5f11ee..897b92ff94ef016e551a45fe8dabe1e2ec283500 100644 (file)
@@ -2,6 +2,7 @@
 m4_foreach(dir, [., ext/http], [
        sinclude(dir/autoconf/pecl/pecl.m4)
        sinclude(dir/autoconf/pecl/zlib.m4)
+       sinclude(dir/autoconf/pecl/libbrotli.m4)
        sinclude(dir/autoconf/pecl/libcurl.m4)
        sinclude(dir/autoconf/pecl/libevent.m4)
 ])
@@ -29,6 +30,12 @@ if test "$PHP_HTTP" != "no"; then
        [  --with-http-zlib-dir[=DIR]         HTTP: where to find zlib], $PHP_HTTP, no)
        PECL_CHECK_ZLIB([$PHP_HTTP_ZLIB_DIR], [1.2.0.4])
        PECL_CHECK_DONE(zlib, $PECL_VAR([HAVE_ZLIB]))
+       
+       dnl BROTLI
+       PHP_ARG_WITH([http-libbrotli-dir], [whether/where to check for libbrotli],
+       [  --with-http-libbrotli-dir[=DIR]    HTTP: where to find libbrotli], $PHP_HTTP, no)
+       PECL_CHECK_LIBBROTLI([$PHP_HTTP_LIBBROTLI_DIR], [1.0])
+       PECL_CHECK_DONE(libbrotli, $PECL_VAR([HAVE_LIBBROTLI]))
 
        dnl CURL
        PHP_ARG_WITH([http-libcurl-dir], [whether/where to check for libcurl],
@@ -76,12 +83,17 @@ if test "$PHP_HTTP" != "no"; then
 
        dnl ICU IDNA
        PHP_ARG_WITH([http-libicu-dir], [whether/where to check for libicu],
-       [  --with-http-libidn-dir[=DIR]       HTTP: where to find libicu], $PHP_HTTP_LIBCURL_DIR, no)
+       [  --with-http-libicu-dir[=DIR]       HTTP: where to find libicu], $PHP_HTTP_LIBCURL_DIR, no)
        if test "$PHP_HTTP_LIBICU_DIR" != "no"; then
                AC_PATH_PROG(ICU_CONFIG, icu-config, false, [$PHP_HTTP_LIBICU_DIR/bin:$PATH:/usr/local/bin])
 
                PECL_CHECK_CONFIG(libicu, [$ICU_CONFIG], [--version], [--cppflags], [--ldflags-searchpath], [--ldflags-libsonly])
                AC_CACHE_CHECK([for uidna_IDNToASCII], PECL_CACHE_VAR([HAVE_UIDNA_IDNToASCII]), [
+                       if printf "%s" "$CFLAGS" | $EGREP -q "(^|\s)-Werror\b"; then
+                               if ! printf "%s" "$CFLAGS" | $EGREP -q "(^|\s)-Wno-error=deprecated-declarations\b"; then
+                                       CFLAGS="$CFLAGS -Wno-error=deprecated-declarations"
+                               fi
+                       fi
                        AC_TRY_LINK([
                                #include <unicode/uidna.h>
                        ], [