From patchwork Wed Sep 13 10:29:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Klose X-Patchwork-Id: 22862 Received: (qmail 38551 invoked by alias); 13 Sep 2017 10:29:54 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 36986 invoked by uid 89); 13 Sep 2017 10:29:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=curses X-HELO: einhorn-mail.in-berlin.de Received: from einhorn-mail.in-berlin.de (HELO einhorn-mail.in-berlin.de) (217.197.80.20) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 13 Sep 2017 10:29:48 +0000 X-Envelope-From: doko@ubuntu.com X-Envelope-To: Received: from [192.168.178.30] (ip5f5bd693.dynamic.kabel-deutschland.de [95.91.214.147]) (authenticated bits=0) by einhorn.in-berlin.de (8.14.4/8.14.4/Debian-8+deb8u2) with ESMTP id v8DATj5V004344 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 13 Sep 2017 12:29:45 +0200 To: gdb-patches@sourceware.org From: Matthias Klose Subject: [patch] Allow to link with ncursesw Message-ID: Date: Wed, 13 Sep 2017 12:29:45 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 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 * config.in, configure: Regenerate. * configure.ac: Search ncursesw before ncurses. Check ncursesw/ncurses.h before ncurses/ncurses.h. * gdb_curses.h: Include * 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 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 header file. */ +#undef HAVE_NCURSESW_NCURSES_H + /* Define to 1 if you have the 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 +#elif defined (HAVE_NCURSES_NCURSES_H) #include #elif defined (HAVE_NCURSES_H) #include 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"