aboutsummaryrefslogtreecommitdiff
path: root/gdb/top.c
diff options
context:
space:
mode:
authorPhilippe Blain <levraiphilippeblain@gmail.com>2023-02-19 17:37:35 -0500
committerSimon Marchi <simon.marchi@efficios.com>2023-02-21 09:36:34 -0500
commit4c9066e322f46faf9d753be6ff3e6a09ae668f86 (patch)
tree6e171d73b1eb7b4cf65330c092acd21604480b61 /gdb/top.c
parentf8ab28d773dbf37d6e8ab4318ff0042dd742e9b8 (diff)
downloadgdb-4c9066e322f46faf9d753be6ff3e6a09ae668f86.zip
gdb-4c9066e322f46faf9d753be6ff3e6a09ae668f86.tar.gz
gdb-4c9066e322f46faf9d753be6ff3e6a09ae668f86.tar.bz2
gdb: add --with-curses to --configuration output
'gdb --configuration' does not mention if GDB was built with curses. Since b5075fb68d4 (Rename to allow_tui_tests, 2023-01-08) it does show --enable-tui (or --disable-tui), but one might want to know if GDB was built with curses independently of the availability of the TUI. Since configure.ac uses AC_SEARCH_LIBS to check for the curses library, we do not get an automatically defined HAVE_LIBCURSES symbol in config.in. We do have symbols defined by AC_CHECK_HEADERS (HAVE_CURSES_H, etc.) but it would be cumbersome to use those in print_gdb_configuration because we would have to check for all 6 symbols corresponding the 6 headers listed. This would also increase the maintenance burden if support for other variations of curses are added. Instead, define 'HAVE_LIBCURSES' ourselves by adding an 'action-if-found' argument to AC_SEARCH_LIBS, and use it in print_gdb_configuration. While at it, remove the condition on 'ac_cv_search_waddstr' and set 'curses_found' directly in 'action-if-found'. Change-Id: Id90e3d73990e169cee51bcc3e1d52072cfacd5b8 Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/top.c')
-rw-r--r--gdb/top.c10
1 files changed, 10 insertions, 0 deletions
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\