aboutsummaryrefslogtreecommitdiff
path: root/gdb/configure
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2008-10-22 20:22:01 +0000
committerJoel Brobecker <brobecker@gnat.com>2008-10-22 20:22:01 +0000
commit77f120bfd7d551b73a62321886203d0a2b6cca90 (patch)
tree3cde16b51d115e45b32c6d314916520bcd03d4a9 /gdb/configure
parent4af8819895fd82c3bfad1163e988f9e9fdc689d6 (diff)
downloadgdb-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')
-rwxr-xr-xgdb/configure165
1 files changed, 97 insertions, 68 deletions
diff --git a/gdb/configure b/gdb/configure
index 7f4d2a6..c8fe9da 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -10134,22 +10134,14 @@ done
fi
-# 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.
-echo "$as_me:$LINENO: checking for library containing waddstr" >&5
-echo $ECHO_N "checking for library containing waddstr... $ECHO_C" >&6
-if test "${ac_cv_search_waddstr+set}" = set; then
+# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
+echo "$as_me:$LINENO: checking for library containing dlgetmodinfo" >&5
+echo $ECHO_N "checking for library containing dlgetmodinfo... $ECHO_C" >&6
+if test "${ac_cv_search_dlgetmodinfo+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_func_search_save_LIBS=$LIBS
-ac_cv_search_waddstr=no
+ac_cv_search_dlgetmodinfo=no
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -10163,11 +10155,11 @@ extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char waddstr ();
+char dlgetmodinfo ();
int
main ()
{
-waddstr ();
+dlgetmodinfo ();
;
return 0;
}
@@ -10194,7 +10186,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_search_waddstr="none required"
+ ac_cv_search_dlgetmodinfo="none required"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -10202,8 +10194,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_search_waddstr" = no; then
- for ac_lib in ncurses cursesX curses; do
+if test "$ac_cv_search_dlgetmodinfo" = no; then
+ for ac_lib in dl xpdl; do
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -10218,11 +10210,11 @@ extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char waddstr ();
+char dlgetmodinfo ();
int
main ()
{
-waddstr ();
+dlgetmodinfo ();
;
return 0;
}
@@ -10249,7 +10241,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_search_waddstr="-l$ac_lib"
+ ac_cv_search_dlgetmodinfo="-l$ac_lib"
break
else
echo "$as_me: failed program was:" >&5
@@ -10262,22 +10254,63 @@ rm -f conftest.err conftest.$ac_objext \
fi
LIBS=$ac_func_search_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_search_waddstr" >&5
-echo "${ECHO_T}$ac_cv_search_waddstr" >&6
-if test "$ac_cv_search_waddstr" != no; then
- test "$ac_cv_search_waddstr" = "none required" || LIBS="$ac_cv_search_waddstr $LIBS"
+echo "$as_me:$LINENO: result: $ac_cv_search_dlgetmodinfo" >&5
+echo "${ECHO_T}$ac_cv_search_dlgetmodinfo" >&6
+if test "$ac_cv_search_dlgetmodinfo" != no; then
+ test "$ac_cv_search_dlgetmodinfo" = "none required" || LIBS="$ac_cv_search_dlgetmodinfo $LIBS"
fi
-# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
-echo "$as_me:$LINENO: checking for library containing dlgetmodinfo" >&5
-echo $ECHO_N "checking for library containing dlgetmodinfo... $ECHO_C" >&6
-if test "${ac_cv_search_dlgetmodinfo+set}" = set; then
+# 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
+ { { echo "$as_me:$LINENO: error: Building GDB with TUI mode is not supported on this host" >&5
+echo "$as_me: error: Building GDB with TUI mode is not supported on this host" >&2;}
+ { (exit 1); exit 1; }; }
+ 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.
+ echo "$as_me:$LINENO: checking for library containing waddstr" >&5
+echo $ECHO_N "checking for library containing waddstr... $ECHO_C" >&6
+if test "${ac_cv_search_waddstr+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_func_search_save_LIBS=$LIBS
-ac_cv_search_dlgetmodinfo=no
+ac_cv_search_waddstr=no
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -10291,11 +10324,11 @@ extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char dlgetmodinfo ();
+char waddstr ();
int
main ()
{
-dlgetmodinfo ();
+waddstr ();
;
return 0;
}
@@ -10322,7 +10355,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_search_dlgetmodinfo="none required"
+ ac_cv_search_waddstr="none required"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -10330,8 +10363,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_search_dlgetmodinfo" = no; then
- for ac_lib in dl xpdl; do
+if test "$ac_cv_search_waddstr" = no; then
+ for ac_lib in ncurses cursesX curses; do
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -10346,11 +10379,11 @@ extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char dlgetmodinfo ();
+char waddstr ();
int
main ()
{
-dlgetmodinfo ();
+waddstr ();
;
return 0;
}
@@ -10377,7 +10410,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_search_dlgetmodinfo="-l$ac_lib"
+ ac_cv_search_waddstr="-l$ac_lib"
break
else
echo "$as_me: failed program was:" >&5
@@ -10390,14 +10423,36 @@ rm -f conftest.err conftest.$ac_objext \
fi
LIBS=$ac_func_search_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_search_dlgetmodinfo" >&5
-echo "${ECHO_T}$ac_cv_search_dlgetmodinfo" >&6
-if test "$ac_cv_search_dlgetmodinfo" != no; then
- test "$ac_cv_search_dlgetmodinfo" = "none required" || LIBS="$ac_cv_search_dlgetmodinfo $LIBS"
+echo "$as_me:$LINENO: result: $ac_cv_search_waddstr" >&5
+echo "${ECHO_T}$ac_cv_search_waddstr" >&6
+if test "$ac_cv_search_waddstr" != no; then
+ test "$ac_cv_search_waddstr" = "none required" || LIBS="$ac_cv_search_waddstr $LIBS"
fi
+ 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
+ { { echo "$as_me:$LINENO: error: no enhanced curses library found; disable TUI" >&5
+echo "$as_me: error: no enhanced curses library found; disable TUI" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me:$LINENO: WARNING: no enhanced curses library found; disabling TUI" >&5
+echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
+ 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.
@@ -25539,32 +25594,6 @@ echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
fi
-# 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
- { { echo "$as_me:$LINENO: error: no enhanced curses library found; disable TUI" >&5
-echo "$as_me: error: no enhanced curses library found; disable TUI" >&2;}
- { (exit 1); exit 1; }; }
- else
- { echo "$as_me:$LINENO: WARNING: no enhanced curses library found; disabling TUI" >&5
-echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
- 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