Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Matthias Klose <doko@ubuntu.com>
To: gdb-patches@sourceware.org
Subject: [patch] Allow to link with ncursesw
Date: Wed, 13 Sep 2017 10:29:00 -0000	[thread overview]
Message-ID: <bb52db91-88bc-164e-bbea-b53a14dde34e@ubuntu.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 315 bytes --]

Triggered by https://launchpad.net/bugs/1275210, to be able to cope with UTF-8
characters in gdbtui. Ok for the trunk?

Matthias

	* 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.


[-- Attachment #2: ncursesw.diff --]
[-- Type: text/x-patch, Size: 3875 bytes --]


	* 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.

Index: b/gdb/configure.ac
===================================================================
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -569,7 +569,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
@@ -611,7 +611,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"
@@ -1314,7 +1314,7 @@ case $host_os in
    Solaris 2.[789] when using GCC. ])
     fi ;;
 esac
-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>
Index: b/gdb/config.in
===================================================================
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -300,6 +300,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
 
Index: b/gdb/gdb_curses.h
===================================================================
--- 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>
Index: b/gdb/configure
===================================================================
--- a/gdb/configure
+++ b/gdb/configure
@@ -8796,7 +8796,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
@@ -8894,7 +8894,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
@@ -11713,7 +11713,7 @@ $as_echo "#define _MSE_INT_H 1" >>confde
 
     fi ;;
 esac
-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"
@@ -13179,7 +13179,7 @@ $as_echo "#define HAVE_LANGINFO_CODESET
   fi
 
 
-  for ac_header in linux/perf_event.h locale.h memory.h signal.h 		   sys/resource.h sys/socket.h sys/syscall.h 		   sys/un.h sys/wait.h 		   thread_db.h wait.h
+  for ac_header in linux/perf_event.h locale.h memory.h signal.h 		   sys/resource.h sys/socket.h sys/syscall.h 		   sys/un.h sys/wait.h 		   thread_db.h wait.h 		   termios.h termio.h sgtty.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"

             reply	other threads:[~2017-09-13 10:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-13 10:29 Matthias Klose [this message]
2017-09-20 18:39 ` Pedro Alves
2017-09-20 19:52   ` Matthias Klose
2017-09-20 21:22     ` Pedro Alves
2017-09-20 21:25       ` Pedro Alves
2017-09-20 23:58       ` John Baldwin
2017-09-22 10:22         ` Pedro Alves
2017-09-25 18:34           ` John Baldwin
2017-09-26 15:27             ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bb52db91-88bc-164e-bbea-b53a14dde34e@ubuntu.com \
    --to=doko@ubuntu.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox