bpo-13501: allow choosing between readline and libedit (GH-24189) · python/cpython@e1f7769 (original) (raw)

6 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1 +The configure script can now use *libedit* instead of *readline* with the
2 +command line option ``--with-readline=editline``.
Original file line number Diff line number Diff line change
@@ -26,10 +26,14 @@
26 26 # define RESTORE_LOCALE(sl)
27 27 #endif
28 28
29 +#ifdef WITH_EDITLINE
30 +# include <editline/readline.h>
31 +#else
29 32 /* GNU readline definitions */
30 -#undef HAVE_CONFIG_H /* Else readline/chardefs.h includes strings.h */
31 -#include <readline/readline.h>
32 -#include <readline/history.h>
33 +# undef HAVE_CONFIG_H /* Else readline/chardefs.h includes strings.h */
34 +# include <readline/readline.h>
35 +# include <readline/history.h>
36 +#endif
33 37
34 38 #ifdef HAVE_RL_COMPLETION_MATCHES
35 39 #define completion_matches(x, y) \