From: Bruno Haible Date: Fri, 1 Aug 2025 13:17:31 +0000 (+0200) Subject: gettext.m4: Fix build on Cygwin with gcc 13 or newer. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0e709dbdeec94c4e14f400e671e18cf7807457e4;p=thirdparty%2Fgettext.git gettext.m4: Fix build on Cygwin with gcc 13 or newer. This gcc version links with -lintl -liconv by default, making it appear as if gettext() et al. were defined in libc. But GNU gettext still needs to build a new libintl. * gettext-runtime/m4/gettext.m4 (AM_GNU_GETTEXT): On Cygwin, set USE_INCLUDED_LIBINTL=yes regardless of the gcc version. --- diff --git a/gettext-runtime/m4/gettext.m4 b/gettext-runtime/m4/gettext.m4 index 67c37d915..b4c4afc9b 100644 --- a/gettext-runtime/m4/gettext.m4 +++ b/gettext-runtime/m4/gettext.m4 @@ -330,7 +330,11 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION fi fi - if test "$gt_cv_use_gnu_libintl" = "yes"; then + AC_REQUIRE([AC_CANONICAL_HOST]) + if test "$gt_cv_use_gnu_libintl" = "yes" \ + || case "$host_os" in cygwin*) true;; *) false;; esac; then + dnl GNU gettext is not found in the C library or is, + dnl like on Cygwin, a component of the C library. dnl Mark actions used to generate GNU NLS library. USE_INCLUDED_LIBINTL=yes LIBINTL="m4_if([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LIBICONV $LIBTHREAD"