From a5df2b0848bd62fde66253f0dd825708b9dc0360 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Tue, 13 Dec 2016 10:10:09 +0100 Subject: [PATCH] configure: fix -Werror builds --- autoconf/pecl/libcurl.m4 | 1 + config9.m4 | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/autoconf/pecl/libcurl.m4 b/autoconf/pecl/libcurl.m4 index 22b24c6..73ea259 100644 --- a/autoconf/pecl/libcurl.m4 +++ b/autoconf/pecl/libcurl.m4 @@ -47,6 +47,7 @@ AC_DEFUN([PECL_HAVE_LIBCURL_SSLLIB], [ if test -z "$PECL_VAR([LIBCURL_SSLLIB])"; then AC_CACHE_CHECK([for $1 providing SSL in libcurl], PECL_CACHE_VAR([HAVE_LIBCURL_$1]), [ AC_TRY_RUN([ + #include #include int main(int argc, char *argv[]) { curl_version_info_data *data = curl_version_info(CURLVERSION_NOW); diff --git a/config9.m4 b/config9.m4 index 1f8adab..dda5b01 100644 --- a/config9.m4 +++ b/config9.m4 @@ -82,6 +82,11 @@ if test "$PHP_HTTP" != "no"; then 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 ], [ -- 2.30.2