aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/config.in3
-rwxr-xr-xgdb/configure8
-rw-r--r--gdb/configure.ac10
-rw-r--r--gdb/top.c10
4 files changed, 22 insertions, 9 deletions
diff --git a/gdb/config.in b/gdb/config.in
index a602784..a7da88b 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -238,6 +238,9 @@
/* Define if libbacktrace is being used. */
#undef HAVE_LIBBACKTRACE
+/* Define to 1 if curses is enabled. */
+#undef HAVE_LIBCURSES
+
/* Define to 1 if debuginfod is enabled. */
#undef HAVE_LIBDEBUGINFOD
diff --git a/gdb/configure b/gdb/configure
index cfdaf59..6bce5c7 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -20624,13 +20624,13 @@ $as_echo "$ac_cv_search_waddstr" >&6; }
ac_res=$ac_cv_search_waddstr
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ curses_found=yes
-fi
+$as_echo "#define HAVE_LIBCURSES 1" >>confdefs.h
- if test "$ac_cv_search_waddstr" != no; then
- curses_found=yes
- fi
+fi
+
fi
# Check whether we should enable the TUI, but only do so if we really
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 7345898..14012a9 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -564,11 +564,11 @@ if test x"$prefer_curses" = xyes; then
# search /usr/local/include, if ncurses is installed in /usr/local. A
# default installation of ncurses on alpha*-dec-osf* will lead to such
# a situation.
- AC_SEARCH_LIBS(waddstr, [ncursesw ncurses cursesX curses])
-
- if test "$ac_cv_search_waddstr" != no; then
- curses_found=yes
- fi
+ AC_SEARCH_LIBS(waddstr, [ncursesw ncurses cursesX curses],
+ [curses_found=yes
+ AC_DEFINE([HAVE_LIBCURSES], [1],
+ [Define to 1 if curses is enabled.])
+ ])
fi
# Check whether we should enable the TUI, but only do so if we really
diff --git a/gdb/top.c b/gdb/top.c
index 1b189d7..d71d849 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1619,6 +1619,16 @@ This GDB was configured as follows:\n\
"));
#endif
+#if HAVE_LIBCURSES
+ gdb_printf (stream, _("\
+ --with-curses\n\
+"));
+#else
+ gdb_printf (stream, _("\
+ --without-curses\n\
+"));
+#endif
+
#if HAVE_GUILE
gdb_printf (stream, _("\
--with-guile\n\