This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb/gdb-7.9-branch] mingw32: fix windows-termcap/curses check


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4cdcf84fbc4dfef7b9c24db02e1995e98682efe7

commit 4cdcf84fbc4dfef7b9c24db02e1995e98682efe7
Author: Pedro Alves <palves@redhat.com>
Date:   Thu Jan 22 18:41:33 2015 +0000

    mingw32: fix windows-termcap/curses check
    
    When GDB is configured with "--without-tui --with-curses" or "--with-tui",
    $prefer_curses is set to yes.  But, that still doesn't mean that curses
    will be used.  configure will still search for the curses library, and
    continue building without it.  That's done here:
    
     curses_found=no
     if test x"$prefer_curses" = xyes; then
     ...
       AC_SEARCH_LIBS(waddstr, [ncurses cursesX curses])
    
       if test "$ac_cv_search_waddstr" != no; then
         curses_found=yes
       fi
     fi
    
    So if waddstr is not found, meaning curses is not really
    available, even though it'd be preferred, $prefer_curses is
    'yes', but $curses_found is 'no'.
    
    So the right fix to tell whether we're linking with curses is
    $curses_found=yes.
    
    gdb/ChangeLog:
    2015-01-22  Pedro Alves  <palves@redhat.com>
    
    	* configure.ac [*mingw32*]: Check $curses_found instead of
    	$prefer_curses.
    	* configure: Regenerate.
    	* windows-termcap.c: Remove HAVE_CURSES_H, HAVE_NCURSES_H and
    	HAVE_NCURSES_NCURSES_H checks.

Diff:
---
 gdb/ChangeLog         | 8 ++++++++
 gdb/configure         | 2 +-
 gdb/configure.ac      | 2 +-
 gdb/windows-termcap.c | 4 ----
 4 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 88710f5..995aa36 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2015-01-22  Pedro Alves  <palves@redhat.com>
+
+	* configure.ac [*mingw32*]: Check $curses_found instead of
+	$prefer_curses.
+	* configure: Regenerate.
+	* windows-termcap.c: Remove HAVE_CURSES_H, HAVE_NCURSES_H and
+	HAVE_NCURSES_NCURSES_H checks.
+
 2015-01-22  Eli Zaretskii  <eliz@gnu.org>
 
 	* gdb/tui/tui.c (tui_enable) [__MINGW32__]: If the call to 'newterm'
diff --git a/gdb/configure b/gdb/configure
index 0c3a19a..b958362 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -7184,7 +7184,7 @@ case $host_os in
     ac_cv_search_tgetent="none required"
     ;;
   *mingw32*)
-    if test x"$prefer_curses" != xyes; then
+    if test x"$curses_found" != xyes; then
       ac_cv_search_tgetent="none required"
       CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
     fi ;;
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 6a276f0..96845ac 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -607,7 +607,7 @@ case $host_os in
     ac_cv_search_tgetent="none required"
     ;;
   *mingw32*)
-    if test x"$prefer_curses" != xyes; then
+    if test x"$curses_found" != xyes; then
       ac_cv_search_tgetent="none required"
       CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
     fi ;;
diff --git a/gdb/windows-termcap.c b/gdb/windows-termcap.c
index 0154083..caafc47 100644
--- a/gdb/windows-termcap.c
+++ b/gdb/windows-termcap.c
@@ -22,8 +22,6 @@
 
 #include "defs.h"
 
-#if !defined HAVE_CURSES_H && !defined HAVE_NCURSES_H && !defined HAVE_NCURSES_NCURSES_H
-
 #include <stdlib.h>
 
 /* -Wmissing-prototypes */
@@ -76,5 +74,3 @@ tgoto (const char *cap, int col, int row)
 {
   return NULL;
 }
-
-#endif	/* !HAVE_CURSES_H && !HAVE_NCURSES_H && !HAVE_NCURSES_NCURSES_H */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]