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