diff options
| author | tgoodwin <tgoodwin> | 1998-07-13 10:22:06 +0000 |
|---|---|---|
| committer | Toby Goodwin <toby@paccrat.org> | 2015-05-16 21:23:08 +0100 |
| commit | 75b4f0440f1e83b020e17b0d09dafe37dbf7e4ee (patch) | |
| tree | b70bfedb865cfe5118679a9205926b293cd92711 /configure.ac | |
| parent | 769ce647bc9079b54d745d4e56c790622aff0d57 (diff) | |
add READLINE_OLD
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index adf8de9..7fcc48a 100644 --- a/configure.ac +++ b/configure.ac @@ -290,12 +290,21 @@ AC_ARG_WITH(editline, [ --with-editline Simmule Turner's line editing], AC_DEFINE(EDITLINE) LIBS="$LIBS -ledit", AC_MSG_WARN(editline library not found))) -AC_ARG_WITH(readline, [ --with-readline Bloated GNU line editing], - AC_CHECK_LIB(readline, readline, [ +dnl Getting readline right is hard. There are (at least) two incompatible versions, +dnl and we need to know which one we are using. There are also two different +dnl names for the include files. +AC_ARG_WITH(readline, [ --with-readline Bloated GNU line editing], [ + AC_CHECK_LIB(readline, rl_deprep_terminal, [ + AC_DEFINE(READLINE) + AC_DEFINE(READLINE_OLD) + ], [ + AC_CHECK_LIB(readline, readline, [ AC_DEFINE(READLINE) - LIBS="$LIBS -lreadline -ltermcap" - AC_CHECK_HEADERS(readline.h readline/readline.h) - ], AC_MSG_WARN(readline library not found), -ltermcap)) + ], AC_MSG_WARN(readline library not found), -ltermcap) + ], -ltermcap) + LIBS="$LIBS -lreadline -ltermcap" + AC_CHECK_HEADERS(readline.h readline/readline.h) +]) AM_CONDITIONAL(AMC_READLINE, test "${with_readline+set}" = set) AC_OUTPUT(Makefile) |