From 1910d8b05c1f5c9322f96dc88f8333aeede02747 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 5 Mar 2022 10:33:06 +0200 Subject: [PATCH 43/43] configure: Try to link against libcharset when detecting it See osdn #43600 Signed-off-by: Marko Lindqvist --- m4/locale.m4 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/m4/locale.m4 b/m4/locale.m4 index 2f8fd96c89..f44c460278 100644 --- a/m4/locale.m4 +++ b/m4/locale.m4 @@ -1,12 +1,15 @@ -#serial 1 +#serial 2 AC_DEFUN([FC_LIBCHARSET], [ AC_CACHE_CHECK([for libcharset], am_cv_libcharset, [lc_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[locale_charset()]])],[am_cv_libcharset=yes],[am_cv_libcharset=no]) - LIBS="$lc_save_LIBS" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[locale_charset()]])], [am_cv_libcharset=yes], + [LIBS="$LIBS -lcharset" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[locale_charset()]])], [am_cv_libcharset=yes], + [am_cv_libcharset=no])]) + LIBS="$lc_save_LIBS" ]) if test $am_cv_libcharset = yes; then AC_DEFINE([HAVE_LIBCHARSET], [1], -- 2.34.1