From: Michael Wallner Date: Thu, 25 May 2023 09:57:14 +0000 (+0200) Subject: configure: libidn 1.36-1.38 has broken locale detection X-Git-Tag: v4.2.4~6 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=435d451fbaaa8b88bd3215f9598b437929f57dee;p=m6w6%2Fext-http configure: libidn 1.36-1.38 has broken locale detection --- diff --git a/autoconf/pecl/pecl.m4 b/autoconf/pecl/pecl.m4 index d8735b0..cb2bb70 100644 --- a/autoconf/pecl/pecl.m4 +++ b/autoconf/pecl/pecl.m4 @@ -271,7 +271,7 @@ AC_DEFUN([PECL_CHECK_CUSTOM], [ LDFLAGS="$LDFLAGS -L$PECL_CACHE_VAR([$1_prefix])/$PHP_LIBDIR" LIBS="$LIBS -l$4" dnl PECL_EVAL_LIBLINE([$LDFLAGS $LIBS]) - + AC_CACHE_VAL(PECL_CACHE_VAR([$1_version]), [ pushd $PECL_CACHE_VAR([$1_prefix]) >/dev/null PECL_CACHE_VAR([$1_version])=$5 @@ -281,7 +281,6 @@ AC_DEFUN([PECL_CHECK_CUSTOM], [ if test -n "$PECL_CHECKED_VERSION([$1])"; then PECL_VAR([HAVE_$1])=true - PECL_DEFINE([HAVE_$1]) PECL_DEFINE_UQ($1[_VERSION], "$PECL_CHECKED_VERSION([$1])") else PECL_VAR([HAVE_$1])=false @@ -336,7 +335,6 @@ AC_DEFUN([PECL_CHECK_CONFIG], [ if test -n "$PECL_CHECKED_VERSION([$1])"; then PECL_VAR([HAVE_$1])=true - PECL_DEFINE([HAVE_$1]) PECL_DEFINE_UQ([$1_VERSION], "$PECL_CHECKED_VERSION([$1])") else PECL_VAR([HAVE_$1])=false diff --git a/config9.m4 b/config9.m4 index 695701b..35f1af1 100644 --- a/config9.m4 +++ b/config9.m4 @@ -24,7 +24,7 @@ if test "$PHP_HTTP" != "no"; then AC_CHECK_LIB(nsl, getdomainname) ]) AC_CHECK_FUNCS(mbrtowc mbtowc iswalnum inet_pton) - + CFLAGS="$CFLAGS -Wno-strict-prototypes" dnl ZLIB @@ -80,7 +80,16 @@ if test "$PHP_HTTP" != "no"; then if test "$PHP_HTTP_LIBIDN_DIR" != "no"; then PECL_CHECK_PKGCONFIG(libidn, [$PHP_HTTP_LIBIDN_DIR]) if $PECL_VAR([HAVE_LIBIDN]); then - PECL_DEFINE([HAVE_IDNA2003]) + PECL_HAVE_VERSION(libidn, 1.36, [ + PECL_HAVE_VERSION(libidn, 1.39, [ + PECL_DEFINE([HAVE_IDNA2003]) + ], [ + PECL_VAR([HAVE_LIBIDN])=false + AC_MSG_WARN([libidn locale detection broken; disabling libidn support]) + ]) + ], [ + PECL_DEFINE([HAVE_IDNA2003]) + ]) fi PECL_CHECK_DONE(libidn, $PECL_VAR([HAVE_LIBIDN])) fi