From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13264 invoked by alias); 24 Apr 2004 11:02:11 -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 13244 invoked from network); 24 Apr 2004 11:02:09 -0000 Received: from unknown (HELO maynard.mail.mindspring.net) (207.69.200.243) by sources.redhat.com with SMTP; 24 Apr 2004 11:02:09 -0000 Received: from user-119a90a.biz.mindspring.com ([66.149.36.10] helo=berman.michael-chastain.com) by maynard.mail.mindspring.net with esmtp (Exim 3.33 #1) id 1BHKvB-0006tU-00 for gdb-patches@sources.redhat.com; Sat, 24 Apr 2004 07:02:09 -0400 Received: by berman.michael-chastain.com (Postfix, from userid 502) id 19DF64B104; Sat, 24 Apr 2004 07:02:12 -0400 (EDT) To: gdb-patches@sources.redhat.com Subject: [patch] configure.ac, configure: curses/termcap on *-*-osf5.* Message-Id: <20040424110212.19DF64B104@berman.michael-chastain.com> Date: Sat, 24 Apr 2004 11:02:00 -0000 From: mec.gnu@mindspring.com (Michael Elizabeth Chastain) X-SW-Source: 2004-04/txt/msg00600.txt.bz2 This patch fixes gdb/1626, build failure on native alphaev58-dec-osf5.1 . There are two problems. The first problem is that the autoconf macros builds the library list from right-to-left, so that configure.in should probe for the lowest library first: termcap *before* curses. The second problem is that ncurses does not work on the system that I'm using (an HP test drive alpha system). So I just added some logic with "case osf5.*)" to probe a shorter list of curses libraries on that system. Testing: I built gdb on: native alphaev68-dec-osf5.1 native hppa2.0w-hp-hpux11.11 native i386-unknown-freebsd4.9 native i686-pc-linux-gnu I also executed gdb on alphaev68-dec-osf5.1 . "gdb gdb" with "break main; run" works. And "gdbtui gdb" with "break main; run" works, and the tui displays properly. According to MAINTAINERS, configure* can be edited by "ALL". So I'll wait 24 hours and if there is no objection, commit this. Michael C === 2004-04-24 Michael Chastain Fix PR gdb/1626. * configure.in: Check for curses after termcap. On osf5.*, do not check for ncurses. * configure: Regenerate. Index: configure.in =================================================================== RCS file: /cvs/src/src/gdb/configure.in,v retrieving revision 1.150 diff -c -3 -p -r1.150 configure.in *** configure.in 29 Mar 2004 18:07:14 -0000 1.150 --- configure.in 24 Apr 2004 10:24:43 -0000 *************** if test x"$enable_gdbmi" = xyes; then *** 135,160 **** 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])]) - - # Check whether the wborder function is provided by the curses - # library detected above. In certain implementations such as - # the HP/UX Hcurses for instance, this function is provided by an - # additional library. So if we did not find this function inside - # the curses library, try some alternate libraries we know might - # provide it. - AC_SEARCH_LIBS(wborder, [cur_colr], [], - [AC_MSG_WARN([wborder function not found, tui will be disabled])]) - # Enable TUI. AC_ARG_ENABLE(tui, [ --enable-tui enable full-screen terminal user interface (TUI)], --- 135,140 ---- *************** AC_SEARCH_LIBS(tgetent, [termcap tinfo n *** 330,335 **** --- 310,345 ---- if test "$ac_cv_search_tgetent" = no; then AC_MSG_ERROR([no termcap library found]) 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. + + case $host_os in + osf5.*) + # ncurses does not work on native alphaev68-dec-osf5.1 + # -- chastain 2004-04-24 + AC_SEARCH_LIBS(initscr, [curses], [], + [AC_MSG_WARN([no curses library found])]) + ;; + *) + AC_SEARCH_LIBS(initscr, [ncurses Hcurses curses pdcurses], [], + [AC_MSG_WARN([no curses library found])]) + ;; + esac + + # Check whether the wborder function is provided by the curses + # library detected above. In certain implementations such as + # the HP/UX Hcurses for instance, this function is provided by an + # additional library. So if we did not find this function inside + # the curses library, try some alternate libraries we know might + # provide it. + AC_SEARCH_LIBS(wborder, [cur_colr], [], + [AC_MSG_WARN([wborder function not found, tui will be disabled])]) # ------------------------- # # Checks for header files. #