aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Klose <doko@ubuntu.com>2017-09-26 16:23:19 +0100
committerPedro Alves <palves@redhat.com>2017-09-26 16:23:19 +0100
commit5007d765ae09c10c7f3b18bb16841b9d2d59e181 (patch)
treeb43b21ec5b4d3e5f8dc812c171c78c78bb61e83b
parent262c0a877f91b9102fd42523598b46ea79a8970e (diff)
downloadgdb-5007d765ae09c10c7f3b18bb16841b9d2d59e181.zip
gdb-5007d765ae09c10c7f3b18bb16841b9d2d59e181.tar.gz
gdb-5007d765ae09c10c7f3b18bb16841b9d2d59e181.tar.bz2
Allow linking GDB with ncursesw
Triggered by https://launchpad.net/bugs/1275210, to be able to cope with UTF-8 characters in gdbtui. Reference: https://sourceware.org/ml/gdb-patches/2017-09/msg00356.html gdb/ChangeLog: 2017-09-26 Matthias Klose <doko@ubuntu.com> * configure.ac: Search ncursesw before ncurses. Check ncursesw/ncurses.h before ncurses/ncurses.h. * gdb_curses.h: Include <ncursesw/ncurses.h> * config.in, configure: Regenerate.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/config.in3
-rwxr-xr-xgdb/configure6
-rw-r--r--gdb/configure.ac6
-rw-r--r--gdb/gdb_curses.h4
5 files changed, 19 insertions, 7 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2c825ef..68f4817 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2017-09-26 Matthias Klose <doko@ubuntu.com>
+
+ * configure.ac: Search ncursesw before ncurses.
+ Check ncursesw/ncurses.h before ncurses/ncurses.h.
+ * gdb_curses.h: Include <ncursesw/ncurses.h>
+ * config.in, configure: Regenerate.
+
2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR gdb/22185
diff --git a/gdb/config.in b/gdb/config.in
index 9fa90af..3f8ee38 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -294,6 +294,9 @@
/* Define to 1 if you have the `monstartup' function. */
#undef HAVE_MONSTARTUP
+/* Define to 1 if you have the <ncursesw/ncurses.h> header file. */
+#undef HAVE_NCURSESW_NCURSES_H
+
/* Define to 1 if you have the <ncurses.h> header file. */
#undef HAVE_NCURSES_H
diff --git a/gdb/configure b/gdb/configure
index e4bde75..303c7ba 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -8746,7 +8746,7 @@ return waddstr ();
return 0;
}
_ACEOF
-for ac_lib in '' ncurses cursesX curses; do
+for ac_lib in '' ncursesw ncurses cursesX curses; do
if test -z "$ac_lib"; then
ac_res="none required"
else
@@ -8844,7 +8844,7 @@ return tgetent ();
return 0;
}
_ACEOF
-for ac_lib in '' termcap tinfo curses ncurses; do
+for ac_lib in '' termcap tinfo curses ncursesw ncurses; do
if test -z "$ac_lib"; then
ac_res="none required"
else
@@ -11595,7 +11595,7 @@ fi
done
-for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
+for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 2e4ccb6..9dc4c77 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -562,7 +562,7 @@ 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, [ncurses cursesX curses])
+ AC_SEARCH_LIBS(waddstr, [ncursesw ncurses cursesX curses])
if test "$ac_cv_search_waddstr" != no; then
curses_found=yes
@@ -604,7 +604,7 @@ case $host_os in
esac
# These are the libraries checked by Readline.
-AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncurses])
+AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncursesw ncurses])
if test "$ac_cv_search_tgetent" = no; then
CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
@@ -1301,7 +1301,7 @@ AC_CHECK_HEADERS(sys/user.h, [], [],
#endif
])
-AC_CHECK_HEADERS(curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h)
+AC_CHECK_HEADERS(curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h)
AC_CHECK_HEADERS(term.h, [], [],
[#if HAVE_CURSES_H
# include <curses.h>
diff --git a/gdb/gdb_curses.h b/gdb/gdb_curses.h
index 72fafe3..4f9ed11 100644
--- a/gdb/gdb_curses.h
+++ b/gdb/gdb_curses.h
@@ -39,7 +39,9 @@
#define NOMACROS
#define NCURSES_NOMACROS
-#if defined (HAVE_NCURSES_NCURSES_H)
+#if defined (HAVE_NCURSESW_NCURSES_H)
+#include <ncursesw/ncurses.h>
+#elif defined (HAVE_NCURSES_NCURSES_H)
#include <ncurses/ncurses.h>
#elif defined (HAVE_NCURSES_H)
#include <ncurses.h>