2 2009-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
4 Fix compatibility of --with-system-readline and readline-6.0+.
5 * configure.ac <--with-system-readline> (for readline_echoing_p): New
7 * config.in: Regenerate.
8 * configure: Regenerate.
10 Index: gdb-6.8.50.20090909/gdb/configure.ac
11 ===================================================================
12 --- gdb-6.8.50.20090909.orig/gdb/configure.ac 2009-09-09 20:11:04.000000000 +0200
13 +++ gdb-6.8.50.20090909/gdb/configure.ac 2009-09-09 20:11:54.000000000 +0200
14 @@ -773,6 +773,21 @@ if test "$with_system_readline" = yes; t
19 + # readline-6.0 started to use the name `_rl_echoing_p'.
20 + # `$(READLINE_DIR)/' of bundled readline would not resolve in configure.
22 + AC_MSG_CHECKING([for readline_echoing_p])
24 + LIBS="$LIBS $READLINE"
25 + AC_LINK_IFELSE(AC_LANG_PROGRAM(,[[extern int readline_echoing_p;
26 + return readline_echoing_p;]]),
27 + [READLINE_ECHOING_P=yes],
28 + [READLINE_ECHOING_P=no
29 + AC_DEFINE([readline_echoing_p], [_rl_echoing_p],
30 + [readline-6.0 started to use different name.])])
32 + AC_MSG_RESULT([$READLINE_ECHOING_P])
34 READLINE='$(READLINE_DIR)/libreadline.a'
35 READLINE_DEPS='$(READLINE)'
36 Index: gdb-6.8.50.20090909/gdb/config.in
37 ===================================================================
38 --- gdb-6.8.50.20090909.orig/gdb/config.in 2009-09-09 20:11:33.000000000 +0200
39 +++ gdb-6.8.50.20090909/gdb/config.in 2009-09-09 20:12:00.000000000 +0200
41 /* Define to `int' if <sys/types.h> does not define. */
44 +/* readline-6.0 started to use different name. */
45 +#undef readline_echoing_p
47 /* Define to the equivalent of the C99 'restrict' keyword, or to
48 nothing if this is not supported. Do not define if restrict is
49 supported directly. */
50 Index: gdb-6.8.50.20090909/gdb/configure
51 ===================================================================
52 --- gdb-6.8.50.20090909.orig/gdb/configure 2009-09-09 20:11:07.000000000 +0200
53 +++ gdb-6.8.50.20090909/gdb/configure 2009-09-09 20:11:54.000000000 +0200
54 @@ -9197,6 +9197,69 @@ if test "$with_system_readline" = yes; t
59 + # readline-6.0 started to use the name `_rl_echoing_p'.
60 + # `$(READLINE_DIR)/' of bundled readline would not resolve in configure.
62 + echo "$as_me:$LINENO: checking for readline_echoing_p" >&5
63 +echo $ECHO_N "checking for readline_echoing_p... $ECHO_C" >&6
65 + LIBS="$LIBS $READLINE"
66 + cat >conftest.$ac_ext <<_ACEOF
69 +cat confdefs.h >>conftest.$ac_ext
70 +cat >>conftest.$ac_ext <<_ACEOF
71 +/* end confdefs.h. */
76 +extern int readline_echoing_p;
77 + return readline_echoing_p;
82 +rm -f conftest.$ac_objext conftest$ac_exeext
83 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
84 + (eval $ac_link) 2>conftest.er1
86 + grep -v '^ *+' conftest.er1 >conftest.err
88 + cat conftest.err >&5
89 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
90 + (exit $ac_status); } &&
91 + { ac_try='test -z "$ac_c_werror_flag"
92 + || test ! -s conftest.err'
93 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
96 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
97 + (exit $ac_status); }; } &&
98 + { ac_try='test -s conftest$ac_exeext'
99 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
100 + (eval $ac_try) 2>&5
102 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
103 + (exit $ac_status); }; }; then
104 + READLINE_ECHOING_P=yes
106 + echo "$as_me: failed program was:" >&5
107 +sed 's/^/| /' conftest.$ac_ext >&5
109 +READLINE_ECHOING_P=no
111 +cat >>confdefs.h <<\_ACEOF
112 +#define readline_echoing_p _rl_echoing_p
116 +rm -f conftest.err conftest.$ac_objext \
117 + conftest$ac_exeext conftest.$ac_ext
119 + echo "$as_me:$LINENO: result: $READLINE_ECHOING_P" >&5
120 +echo "${ECHO_T}$READLINE_ECHOING_P" >&6
122 READLINE='$(READLINE_DIR)/libreadline.a'
123 READLINE_DEPS='$(READLINE)'