From 6c183483bbdc5f1ff45e9832e70b478b30370e71 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Fri, 12 Jul 2024 09:03:19 +0200 Subject: [PATCH] Autotools: Simplify the iconv not found error --- ext/iconv/config.m4 | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4 index 72591f752d0bf..a0b9c79278517 100644 --- a/ext/iconv/config.m4 +++ b/ext/iconv/config.m4 @@ -5,14 +5,9 @@ PHP_ARG_WITH([iconv], [yes]) if test "$PHP_ICONV" != "no"; then + PHP_SETUP_ICONV([ICONV_SHARED_LIBADD],, + [AC_MSG_ERROR([The iconv not found. Please, check config.log for details.])]) - PHP_SETUP_ICONV(ICONV_SHARED_LIBADD, [ - iconv_avail="yes"; - ],[ - iconv_avail="no"; - ]) - - if test "$iconv_avail" != "no"; then save_LDFLAGS="$LDFLAGS" save_CFLAGS="$CFLAGS" LDFLAGS="$ICONV_SHARED_LIBADD $LDFLAGS" @@ -135,7 +130,4 @@ int main(void) { PHP_NEW_EXTENSION(iconv, iconv.c, $ext_shared,, [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) PHP_SUBST([ICONV_SHARED_LIBADD]) PHP_INSTALL_HEADERS([ext/iconv], [php_iconv.h]) - else - AC_MSG_ERROR(Please reinstall the iconv library.) - fi fi