From ecea413802314afb1519d7e359c95138632a72fe Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Wed, 23 Nov 2016 14:26:03 -0500
Subject: [PATCH] configure: fix ncurses lib symbol checking

When probing symbols provided by ncurses, use the sublibs that pkg-config
reported in case they're needed (like when libtinfo is a sep library).

URL: https://savannah.gnu.org/bugs/?49614
---
 configure.ac | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 329dc65b..b95080dc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -551,8 +551,12 @@ else
     AC_MSG_RESULT([Using $CURSES_LIB_NAME as the curses library])
 fi
 
-AC_CHECK_LIB([$CURSES_LIB_NAME], use_default_colors, AC_DEFINE(HAVE_USE_DEFAULT_COLORS, 1, [Define this if your curses library has the use_default_colors() command.]))
-AC_CHECK_LIB([$CURSES_LIB_NAME], key_defined, AC_DEFINE(HAVE_KEY_DEFINED, 1, [Define this if your curses library has the key_defined() command.]))
+AC_CHECK_LIB([$CURSES_LIB_NAME], [use_default_colors],
+	     [AC_DEFINE(HAVE_USE_DEFAULT_COLORS, 1, [Define this if your curses library has the use_default_colors() command.])],
+	     [], [$CURSES_LIB])
+AC_CHECK_LIB([$CURSES_LIB_NAME], [key_defined],
+	     [AC_DEFINE(HAVE_KEY_DEFINED, 1, [Define this if your curses library has the key_defined() command.])],
+	     [], [$CURSES_LIB])
 
 dnl Parse any configure options.
 
-- 
GitLab