]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
mingw32: fix windows-termcap/curses check
authorPedro Alves <palves@redhat.com>
Thu, 22 Jan 2015 18:41:33 +0000 (18:41 +0000)
committerPedro Alves <palves@redhat.com>
Thu, 22 Jan 2015 18:41:33 +0000 (18:41 +0000)
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.

gdb/ChangeLog
gdb/configure
gdb/configure.ac
gdb/windows-termcap.c

index 88710f50244ee1f793422d9caaf7e27ad67cbc7d..995aa36a0e568a60d2838660b5623417995b01e8 100644 (file)
@@ -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'
index 0c3a19a3e6b78369fc3cc94e99721ef99c7e2dbc..b958362cca3444cdad815c6ab756976aff37c137 100755 (executable)
@@ -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 ;;
index 6a276f0d1c22ff6067b2a26dfe6cd1c839e44756..96845ac90931804d29753965077c8cc42ec0e2d2 100644 (file)
@@ -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 ;;
index 01540833bc525b7d3d7eeffc2b1be526b639b2be..caafc47bf39e0d739e55997edf4fa50d653233b3 100644 (file)
@@ -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 */