]>
Commit | Line | Data |
---|---|---|
7566401a ER |
1 | gdb/ |
2 | 2009-07-31 Jan Kratochvil <jan.kratochvil@redhat.com> | |
3 | ||
4 | Fix compatibility of --with-system-readline and readline-6.0+. | |
5 | * configure.ac <--with-system-readline> (for readline_echoing_p): New | |
6 | test. | |
7 | * config.in: Regenerate. | |
8 | * configure: Regenerate. | |
9 | ||
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 | |
15 | READLINE=-lreadline | |
16 | READLINE_DEPS= | |
17 | READLINE_CFLAGS= | |
18 | + | |
19 | + # readline-6.0 started to use the name `_rl_echoing_p'. | |
20 | + # `$(READLINE_DIR)/' of bundled readline would not resolve in configure. | |
21 | + | |
22 | + AC_MSG_CHECKING([for readline_echoing_p]) | |
23 | + save_LIBS=$LIBS | |
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.])]) | |
31 | + LIBS="$save_LIBS" | |
32 | + AC_MSG_RESULT([$READLINE_ECHOING_P]) | |
33 | else | |
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 | |
40 | @@ -815,6 +815,9 @@ | |
41 | /* Define to `int' if <sys/types.h> does not define. */ | |
42 | #undef pid_t | |
43 | ||
44 | +/* readline-6.0 started to use different name. */ | |
45 | +#undef readline_echoing_p | |
46 | + | |
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 | |
55 | READLINE=-lreadline | |
56 | READLINE_DEPS= | |
57 | READLINE_CFLAGS= | |
58 | + | |
59 | + # readline-6.0 started to use the name `_rl_echoing_p'. | |
60 | + # `$(READLINE_DIR)/' of bundled readline would not resolve in configure. | |
61 | + | |
62 | + echo "$as_me:$LINENO: checking for readline_echoing_p" >&5 | |
63 | +echo $ECHO_N "checking for readline_echoing_p... $ECHO_C" >&6 | |
64 | + save_LIBS=$LIBS | |
65 | + LIBS="$LIBS $READLINE" | |
66 | + cat >conftest.$ac_ext <<_ACEOF | |
67 | +/* confdefs.h. */ | |
68 | +_ACEOF | |
69 | +cat confdefs.h >>conftest.$ac_ext | |
70 | +cat >>conftest.$ac_ext <<_ACEOF | |
71 | +/* end confdefs.h. */ | |
72 | + | |
73 | +int | |
74 | +main () | |
75 | +{ | |
76 | +extern int readline_echoing_p; | |
77 | + return readline_echoing_p; | |
78 | + ; | |
79 | + return 0; | |
80 | +} | |
81 | +_ACEOF | |
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 | |
85 | + ac_status=$? | |
86 | + grep -v '^ *+' conftest.er1 >conftest.err | |
87 | + rm -f conftest.er1 | |
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 | |
94 | + (eval $ac_try) 2>&5 | |
95 | + ac_status=$? | |
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 | |
101 | + ac_status=$? | |
102 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
103 | + (exit $ac_status); }; }; then | |
104 | + READLINE_ECHOING_P=yes | |
105 | +else | |
106 | + echo "$as_me: failed program was:" >&5 | |
107 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
108 | + | |
109 | +READLINE_ECHOING_P=no | |
110 | + | |
111 | +cat >>confdefs.h <<\_ACEOF | |
112 | +#define readline_echoing_p _rl_echoing_p | |
113 | +_ACEOF | |
114 | + | |
115 | +fi | |
116 | +rm -f conftest.err conftest.$ac_objext \ | |
117 | + conftest$ac_exeext conftest.$ac_ext | |
118 | + LIBS="$save_LIBS" | |
119 | + echo "$as_me:$LINENO: result: $READLINE_ECHOING_P" >&5 | |
120 | +echo "${ECHO_T}$READLINE_ECHOING_P" >&6 | |
121 | else | |
122 | READLINE='$(READLINE_DIR)/libreadline.a' | |
123 | READLINE_DEPS='$(READLINE)' |