summaryrefslogtreecommitdiff
path: root/gdb/configure.ac
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-10-08 08:50:51 +0000
committerJim Meyering <meyering@redhat.com>2009-10-08 08:58:19 +0000
commit79b5a82e464c9ec7731ed6f80580ceb13f745168 (patch)
treee258911599426e00b8bc17b4e491a583c9d88027 /gdb/configure.ac
parentf699d949b3eb15dfba4284d326934d5163fc444b (diff)
downloadgdb-79b5a82e464c9ec7731ed6f80580ceb13f745168.tar.gz
manually sync from the CVS repository
Diffstat (limited to 'gdb/configure.ac')
-rw-r--r--gdb/configure.ac20
1 files changed, 20 insertions, 0 deletions
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 0e42182fa2d..f9c17fdc233 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -534,6 +534,21 @@ if test "$with_system_readline" = yes; then
READLINE=-lreadline
READLINE_DEPS=
READLINE_CFLAGS=
+
+ # readline-6.0 started to use the name `_rl_echoing_p'.
+ # `$(READLINE_DIR)/' of bundled readline would not resolve in configure.
+
+ AC_MSG_CHECKING([for readline_echoing_p])
+ save_LIBS=$LIBS
+ LIBS="$LIBS $READLINE"
+ AC_LINK_IFELSE(AC_LANG_PROGRAM(,[[extern int readline_echoing_p;
+ return readline_echoing_p;]]),
+ [READLINE_ECHOING_P=yes],
+ [READLINE_ECHOING_P=no
+ AC_DEFINE([readline_echoing_p], [_rl_echoing_p],
+ [readline-6.0 started to use different name.])])
+ LIBS="$save_LIBS"
+ AC_MSG_RESULT([$READLINE_ECHOING_P])
else
READLINE='$(READLINE_DIR)/libreadline.a'
READLINE_DEPS='$(READLINE)'
@@ -1510,6 +1525,11 @@ AC_ARG_ENABLE(werror,
*) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;;
esac])
+# Enable -Werror by default when using gcc
+if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
+ ERROR_ON_WARNING=yes
+fi
+
WERROR_CFLAGS=""
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"