a8767b3
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
f524ac5
From: Fedora GDB patches <invalid@email.com>
f524ac5
Date: Fri, 27 Oct 2017 21:07:50 +0200
f524ac5
Subject: gdb-fedora-libncursesw.patch
f524ac5
f637971
;; Force libncursesw over libncurses to match the includes (RH BZ 1270534).
f637971
;;=push+jan
f637971
Jan Kratochvil c296a6a
Fedora: Force libncursesw over libncurses to match the includes.
Jan Kratochvil c296a6a
https://bugzilla.redhat.com/show_bug.cgi?id=1270534
Jan Kratochvil c296a6a
f637971
diff --git a/gdb/configure b/gdb/configure
f637971
--- a/gdb/configure
f637971
+++ b/gdb/configure
ed8730b
@@ -9649,6 +9649,7 @@ if test x"$prefer_curses" = xyes; then
Jan Kratochvil c296a6a
   # search /usr/local/include, if ncurses is installed in /usr/local.  A
Jan Kratochvil c296a6a
   # default installation of ncurses on alpha*-dec-osf* will lead to such
Jan Kratochvil c296a6a
   # a situation.
Jan Kratochvil c296a6a
+  # Fedora: Force libncursesw over libncurses to match the includes.
Jan Kratochvil c296a6a
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
Jan Kratochvil c296a6a
 $as_echo_n "checking for library containing waddstr... " >&6; }
ab024a6
 if ${ac_cv_search_waddstr+:} false; then :
ed8730b
@@ -9673,7 +9674,7 @@ return waddstr ();
Jan Kratochvil c296a6a
   return 0;
Jan Kratochvil c296a6a
 }
Jan Kratochvil c296a6a
 _ACEOF
f637971
-for ac_lib in '' ncursesw ncurses cursesX curses; do
Jan Kratochvil c296a6a
+for ac_lib in '' ncursesw; do
Jan Kratochvil c296a6a
   if test -z "$ac_lib"; then
Jan Kratochvil c296a6a
     ac_res="none required"
Jan Kratochvil c296a6a
   else
ed8730b
@@ -9747,6 +9748,7 @@ case $host_os in
Jan Kratochvil c296a6a
 esac
Jan Kratochvil c296a6a
 
Jan Kratochvil c296a6a
 # These are the libraries checked by Readline.
Jan Kratochvil c296a6a
+# Fedora: Force libncursesw over libncurses to match the includes.
Jan Kratochvil c296a6a
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
Jan Kratochvil c296a6a
 $as_echo_n "checking for library containing tgetent... " >&6; }
ab024a6
 if ${ac_cv_search_tgetent+:} false; then :
ed8730b
@@ -9771,7 +9773,7 @@ return tgetent ();
Jan Kratochvil c296a6a
   return 0;
Jan Kratochvil c296a6a
 }
Jan Kratochvil c296a6a
 _ACEOF
2111580
-for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
2111580
+for ac_lib in '' ncursesw; do
Jan Kratochvil c296a6a
   if test -z "$ac_lib"; then
Jan Kratochvil c296a6a
     ac_res="none required"
Jan Kratochvil c296a6a
   else
f637971
diff --git a/gdb/configure.ac b/gdb/configure.ac
f637971
--- a/gdb/configure.ac
f637971
+++ b/gdb/configure.ac
ed8730b
@@ -712,7 +712,8 @@ if test x"$prefer_curses" = xyes; then
Jan Kratochvil c296a6a
   # search /usr/local/include, if ncurses is installed in /usr/local.  A
Jan Kratochvil c296a6a
   # default installation of ncurses on alpha*-dec-osf* will lead to such
Jan Kratochvil c296a6a
   # a situation.
f637971
-  AC_SEARCH_LIBS(waddstr, [ncursesw ncurses cursesX curses])
Jan Kratochvil c296a6a
+  # Fedora: Force libncursesw over libncurses to match the includes.
Jan Kratochvil c296a6a
+  AC_SEARCH_LIBS(waddstr, [ncursesw])
Jan Kratochvil c296a6a
 
Jan Kratochvil c296a6a
   if test "$ac_cv_search_waddstr" != no; then
Jan Kratochvil c296a6a
     curses_found=yes
ed8730b
@@ -754,7 +755,8 @@ case $host_os in
Jan Kratochvil c296a6a
 esac
Jan Kratochvil c296a6a
 
Jan Kratochvil c296a6a
 # These are the libraries checked by Readline.
2111580
-AC_SEARCH_LIBS(tgetent, [termcap tinfow tinfo curses ncursesw ncurses])
Jan Kratochvil c296a6a
+# Fedora: Force libncursesw over libncurses to match the includes.
2111580
+AC_SEARCH_LIBS(tgetent, [ncursesw])
Jan Kratochvil c296a6a
 
Jan Kratochvil c296a6a
 if test "$ac_cv_search_tgetent" = no; then
Jan Kratochvil c296a6a
   CONFIG_OBS="$CONFIG_OBS stub-termcap.o"