From 98f56a156e9bc1b74a6238abbfac6a4a9022a874 Mon Sep 17 00:00:00 2001 From: Yavor Doganov Date: Thu, 1 Jan 2026 18:26:38 +0200 Subject: NS: Use Cocoa implementation of EmacsBell -init if named image is declared * configure.ac: Check for 'NSImageNameCaution' declaration when building on GNUstep. * src/nsterm.m ([EmacsBell init]): Use fallback implementation on GNUstep only if 'NSImageNameCaution' is not declared. (Bug#80107) --- configure.ac | 5 +++++ src/nsterm.m | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 9907ab86e83..5be2588600d 100644 --- a/configure.ac +++ b/configure.ac @@ -2886,6 +2886,11 @@ Mac OS X 12.x or later. [Define to use native OS APIs for images.]) NATIVE_IMAGE_API="yes (ns)" fi + + if test "${NS_IMPL_GNUSTEP}" = yes; then + AC_CHECK_DECLS([NSImageNameCaution], [], [], + [[#import ]]) + fi fi AC_SUBST([LIBS_GNUSTEP]) diff --git a/src/nsterm.m b/src/nsterm.m index fe5bc35086d..f96096242d2 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -1221,7 +1221,7 @@ ns_unfocus (struct frame *f) { nestCount = 0; isAttached = false; -#ifdef NS_IMPL_GNUSTEP +#if NS_IMPL_GNUSTEP && !HAVE_DECL_NSIMAGENAMECAUTION // GNUstep doesn't provide named images. This was reported in // 2011, see https://savannah.gnu.org/bugs/?33396 // -- cgit v1.2.1