From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20986 invoked by alias); 10 Feb 2004 20:10:54 -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 20964 invoked from network); 10 Feb 2004 20:10:53 -0000 Received: from unknown (HELO localhost.redhat.com) (216.129.200.20) by sources.redhat.com with SMTP; 10 Feb 2004 20:10:53 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id A14C12B92; Tue, 10 Feb 2004 15:10:52 -0500 (EST) Message-ID: <40293ACC.5040506@gnu.org> Date: Tue, 10 Feb 2004 20:10: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: gdb-patches@sources.redhat.com Subject: [patch/rfc] Build TUI when curses Content-Type: multipart/mixed; boundary="------------050209060100030207040500" X-SW-Source: 2004-02/txt/msg00257.txt.bz2 This is a multi-part message in MIME format. --------------050209060100030207040500 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 372 Hello, This patch modifies GDB's build process so that the TUI code is built when curses is available. Previously --enable-tui was also required. With this patch: ./gdb -i=tui will start up the TUI interface. That other post creates a program called "tui" program that starts the TUI by default. Comments? I'll look to also commit this round the 16th Feb. Andrew --------------050209060100030207040500 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 2745 2004-02-10 Andrew Cagney * configure.in: Always check for curses. Enable TUI when curses is available. Index: configure.in =================================================================== RCS file: /cvs/src/src/gdb/configure.in,v retrieving revision 1.144 diff -u -r1.144 configure.in --- configure.in 8 Feb 2004 17:53:08 -0000 1.144 +++ configure.in 10 Feb 2004 19:57:34 -0000 @@ -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], [], + [AC_MSG_ERROR([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*) --------------050209060100030207040500--