Fix compatibility of --with-system-readline and readline-6.0+.
	* configure.ac <--with-system-readline> (for readline_echoing_p): New
	test.
	* config.in: Regenerate.
	* configure: Regenerate.
This commit is contained in:
Jan Kratochvil 2009-10-02 16:02:34 +00:00
parent 1428dcedf3
commit a71e0887e3
4 changed files with 59 additions and 0 deletions

View File

@ -1,3 +1,11 @@
2009-10-02 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix compatibility of --with-system-readline and readline-6.0+.
* configure.ac <--with-system-readline> (for readline_echoing_p): New
test.
* config.in: Regenerate.
* configure: Regenerate.
2009-10-01 Joel Brobecker <brobecker@adacore.com>
* MAINTAINERS: Move Don Lee to the correct section (Write After

View File

@ -792,6 +792,9 @@
/* Define to `int' if <sys/types.h> does not define. */
#undef pid_t
/* readline-6.0 started to use different name. */
#undef readline_echoing_p
/* Define to the equivalent of the C99 'restrict' keyword, or to
nothing if this is not supported. Do not define if restrict is
supported directly. */

33
gdb/configure vendored
View File

@ -8431,6 +8431,39 @@ 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline_echoing_p" >&5
$as_echo_n "checking for readline_echoing_p... " >&6; }
save_LIBS=$LIBS
LIBS="$LIBS $READLINE"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
extern int readline_echoing_p;
return readline_echoing_p;
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
READLINE_ECHOING_P=yes
else
READLINE_ECHOING_P=no
$as_echo "#define readline_echoing_p _rl_echoing_p" >>confdefs.h
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS="$save_LIBS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_ECHOING_P" >&5
$as_echo "$READLINE_ECHOING_P" >&6; }
else
READLINE='$(READLINE_DIR)/libreadline.a'
READLINE_DEPS='$(READLINE)'

View File

@ -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)'