From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5490 invoked by alias); 16 Feb 2004 19:36:25 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 5480 invoked from network); 16 Feb 2004 19:36:24 -0000 Received: from unknown (HELO localhost.redhat.com) (216.129.200.20) by sources.redhat.com with SMTP; 16 Feb 2004 19:36:24 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 6ECAC2B92; Mon, 16 Feb 2004 14:36:22 -0500 (EST) Message-ID: <40311BB6.2030009@gnu.org> Date: Mon, 16 Feb 2004 19:36:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 MIME-Version: 1.0 To: Eli Zaretskii Cc: gdb-patches@sources.redhat.com Subject: Re: [patch/rfc] Build TUI when curses References: <40293ACC.5040506@gnu.org> Content-Type: multipart/mixed; boundary="------------060502090003080906030005" X-SW-Source: 2004-02/txt/msg00422.txt.bz2 This is a multi-part message in MIME format. --------------060502090003080906030005 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 746 > Date: Tue, 10 Feb 2004 15:10:52 -0500 >> From: Andrew Cagney >> >> +AC_SEARCH_LIBS(initscr, [ncurses Hcurses curses], [], > > > Could we please have pdcurses in this list as well? That would > certainly make DJGPP users happy, but I believe PDCurses can be built > on Unix and other systems as well, so it is not limited to DJGPP. > > >> + [AC_MSG_ERROR([no curses library found])]) > > > Does that mean the configury will abort after this message? If so, > I'd suggest instead to display a message to the effect that only a > command-line version will be built, and continue with building as if > they asked for --disable-tui. Here's what I've committed (which means that gdb -i=tui) starts the tui now. Andrew --------------060502090003080906030005 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 2879 2004-02-16 Andrew Cagney * configure.in: Always check for curses, including pdcurses. Warn, instead of error, when no curses are found. Enable TUI when curses is available. * configure: Re-generate. Index: configure.in =================================================================== RCS file: /cvs/src/src/gdb/configure.in,v retrieving revision 1.145 retrieving revision 1.146 diff -u -r1.145 -r1.146 --- configure.in 15 Feb 2004 23:45:24 -0000 1.145 +++ configure.in 16 Feb 2004 19:33:42 -0000 1.146 @@ -135,6 +135,17 @@ fi fi +# FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over +# Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host +# Makefile fragments. That's why we need to have `Hcurses' before +# `curses'. I don't see why we should use HP curses if a more +# standard curses is available, except that according to HP's +# documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on +# HP-UX 10.10 and 10.20. + +AC_SEARCH_LIBS(initscr, [ncurses Hcurses curses pdcurses], [], + [AC_MSG_WARN([no curses library found])]) + # Enable TUI. AC_ARG_ENABLE(tui, [ --enable-tui enable full-screen terminal user interface (TUI)], @@ -143,14 +154,16 @@ ;; *) AC_MSG_ERROR([bad value $enableval for --enable-tui]) ;; - esac]) + esac],enable_tui=yes) if test x"$enable_tui" = xyes; then if test -d $srcdir/tui; then - CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" - CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" - CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" - ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" - need_curses=yes + if test "$ac_cv_search_initscr" != no; then + CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" + CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" + CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" + CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)" + ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" + fi fi fi @@ -279,20 +292,7 @@ # Since GDB uses Readline, we need termcap functionality, so we need # to find a library that provides that. When GDB is configured with -# --enable-tui, we need full curses functionality. -# -# FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over -# Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host -# Makefile fragments. That's why we need to have `Hcurses' before -# `curses'. I don't see why we should use HP curses if a more -# standard curses is available, except that according to HP's -# documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on -# HP-UX 10.10 and 10.20. - -if test "$need_curses" = yes; then - AC_SEARCH_LIBS(initscr, [ncurses Hcurses curses], [], - [AC_MSG_ERROR([no curses library found])]) -fi +# the TUI, we need full curses functionality. case $host_os in cygwin*) --------------060502090003080906030005--