diff options
author | Joel Brobecker <brobecker@gnat.com> | 2008-10-22 20:22:01 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2008-10-22 20:22:01 +0000 |
commit | 77f120bfd7d551b73a62321886203d0a2b6cca90 (patch) | |
tree | 3cde16b51d115e45b32c6d314916520bcd03d4a9 /gdb/configure.ac | |
parent | 4af8819895fd82c3bfad1163e988f9e9fdc689d6 (diff) | |
download | gdb-77f120bfd7d551b73a62321886203d0a2b6cca90.zip gdb-77f120bfd7d551b73a62321886203d0a2b6cca90.tar.gz gdb-77f120bfd7d551b73a62321886203d0a2b6cca90.tar.bz2 |
* configure.ac: On alpha-osf, error out if enable_tui is set to
"yes", and set enable_tui to "no" if previously set to "auto".
Check for waddstr only if TUI support was requested. Move the
part of the configure script that updates various Makefile
variables up, together with the check for waddstr.
* configure: Regenerate.
Diffstat (limited to 'gdb/configure.ac')
-rw-r--r-- | gdb/configure.ac | 95 |
1 files changed, 61 insertions, 34 deletions
diff --git a/gdb/configure.ac b/gdb/configure.ac index 677a6ae..054d5c2 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -429,20 +429,70 @@ AC_SEARCH_LIBS(socketpair, socket) # Link in zlib if we can. This allows us to read compressed debug sections. AC_SEARCH_LIBS(zlibVersion, z, [AC_CHECK_HEADERS(zlib.h)]) -# For the TUI, we need enhanced curses functionality. -# -# FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied -# curses library because the latter might not provide all the -# functionality we need. However, this leads to problems on systems -# where the linker searches /usr/local/lib, but the compiler doesn't -# 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]) - # On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c). AC_SEARCH_LIBS(dlgetmodinfo, [dl xpdl]) +# On alpha-osf, it appears that libtermcap and libcurses are not compatible. +# There is a very specific comment in /usr/include/curses.h explaining that +# termcap routines built into libcurses must not be used. +# +# The symptoms we observed so far is GDB unexpectedly changing +# the terminal settings when tgetent is called - this is particularly +# visible as the output is missing carriage returns, and so rapidly +# becomes very hard to read. +# +# The readline configure script has already decided that libtermcap +# was enough for its purposes, and so decided to build readline using +# libtermcap. Since the TUI mode requires curses, building GDB with +# TUI enabled results in both libraries to be used at the same time, +# which is not allowed. This basically means that GDB with TUI is +# broken on alpha-osf. + +case $host_os in + alpha*-*-osf* ) + if "$enable_tui" = "yes"; then + AC_MSG_ERROR([Building GDB with TUI mode is not supported on this host]) + fi + if "$enable_tui" = "auto"; then + enable_tui=no + fi + ;; +esac + +# Check whether we should enable the TUI, but only do so if we really +# can. +if test x"$enable_tui" != xno; then + if test -d $srcdir/tui; then + # For the TUI, we need enhanced curses functionality. + # + # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied + # curses library because the latter might not provide all the + # functionality we need. However, this leads to problems on systems + # where the linker searches /usr/local/lib, but the compiler doesn't + # 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]) + + if test "$ac_cv_search_waddstr" != no; 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)" + CONFIG_ALL="${CONFIG_ALL} all-tui" + CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui" + CONFIG_INSTALL="${CONFIG_INSTALL} install-tui" + CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui" + else + if test x"$enable_tui" = xyes; then + AC_MSG_ERROR([no enhanced curses library found; disable TUI]) + else + AC_MSG_WARN([no enhanced curses library found; disabling TUI]) + fi + fi + fi +fi + # Since GDB uses Readline, we need termcap functionality. In many # cases this will be provided by the curses library, but some systems # have a seperate termcap library, or no curses library at all. @@ -1748,29 +1798,6 @@ AC_SUBST(GDBTK_SRC_DIR) AC_PATH_X -# Check whether we should enable the TUI, but only do so if we really -# can. -if test x"$enable_tui" != xno; then - if test -d $srcdir/tui; then - if test "$ac_cv_search_waddstr" != no; 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)" - CONFIG_ALL="${CONFIG_ALL} all-tui" - CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui" - CONFIG_INSTALL="${CONFIG_INSTALL} install-tui" - CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui" - else - if test x"$enable_tui" = xyes; then - AC_MSG_ERROR([no enhanced curses library found; disable TUI]) - else - AC_MSG_WARN([no enhanced curses library found; disabling TUI]) - fi - fi - fi -fi - # Unlike the sim directory, whether a simulator is linked is controlled by # presence of a gdb_sim definition in the target configure.tgt entry. # This code just checks for a few cases where we'd like to ignore those |