]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
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)
commit4cdcf84fbc4dfef7b9c24db02e1995e98682efe7
treecf2bb1a249cb21aa6c5a8400c9535a592fc032a0
parent31d4e82aa6cd53b05bc41222ba2ab42f6d6dee8b
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.
gdb/ChangeLog
gdb/configure
gdb/configure.ac
gdb/windows-termcap.c