From 8d4663b64a97de15c6c252a51fa1047526e1b66d Mon Sep 17 00:00:00 2001
From: Marcel Bargull <marcel.bargull@udo.edu>
Date: Thu, 14 Dec 2023 22:16:33 +0100
Subject: [PATCH 22/22] Allow linking ncursesw/panelw on macOS if available

Signed-off-by: Marcel Bargull <marcel.bargull@udo.edu>
---
 configure    | 4 ----
 configure.ac | 6 ------
 2 files changed, 10 deletions(-)

diff --git a/configure b/configure
index 09a90faf58..9950b03e50 100755
--- a/configure
+++ b/configure
@@ -25714,7 +25714,6 @@ fi
 if test "x$ac_cv_header_ncurses_h" = xyes
 then :
 
-  if test "$ac_sys_system" != "Darwin"; then
 
 pkg_failed=no
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ncursesw" >&5
@@ -25910,7 +25909,6 @@ printf "%s\n" "yes" >&6; }
       have_curses=ncursesw
 
 fi
-  fi
 
   if test "x$have_curses" = xno
 then :
@@ -26146,7 +26144,6 @@ if test "x$ac_cv_header_panel_h" = xyes
 then :
 
 
-  if test "$ac_sys_system" != "Darwin"; then
         if test "x$have_curses" = xncursesw
 then :
 
@@ -26341,7 +26338,6 @@ printf "%s\n" "yes" >&6; }
 fi
 
 fi
-  fi
 
   if test "x$have_curses" = xncurses
 then :
diff --git a/configure.ac b/configure.ac
index 33dfd41aa9..8b87deac81 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6424,8 +6424,6 @@ AH_TEMPLATE([HAVE_NCURSESW], [Define to 1 if you have the `ncursesw' library.])
 AC_CHECK_HEADERS([curses.h ncurses.h])
 
 AS_VAR_IF([ac_cv_header_ncurses_h], [yes], [
-  if test "$ac_sys_system" != "Darwin"; then
-    dnl On macOS, there is no separate /usr/lib/libncursesw nor libpanelw.
     PKG_CHECK_MODULES([CURSES], [ncursesw], [
       AC_DEFINE([HAVE_NCURSESW], [1])
       have_curses=ncursesw
@@ -6439,7 +6437,6 @@ AS_VAR_IF([ac_cv_header_ncurses_h], [yes], [
         ])
       ])
     ])
-  fi
 
   AS_VAR_IF([have_curses], [no], [
     PKG_CHECK_MODULES([CURSES], [ncurses], [
@@ -6488,8 +6485,6 @@ AC_CHECK_HEADERS([panel.h])
 
 AS_VAR_IF([ac_cv_header_panel_h], [yes], [
 
-  if test "$ac_sys_system" != "Darwin"; then
-    dnl On macOS, there is no separate /usr/lib/libncursesw nor libpanelw.
     AS_VAR_IF([have_curses], [ncursesw], [
       PKG_CHECK_MODULES([PANEL], [panelw], [
         have_panel=panelw
@@ -6503,7 +6498,6 @@ AS_VAR_IF([ac_cv_header_panel_h], [yes], [
         ])
       ])
     ])
-  fi
 
   AS_VAR_IF([have_curses], [ncurses], [
     PKG_CHECK_MODULES([PANEL], [panel], [
