This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] configure.ac, configure: curses/termcap on *-*-osf5.*


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  <mec.gnu@mindspring.com>

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]