summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-08-09 21:14:45 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-08-09 21:14:45 -0700
commita1dfd6baf8d7c561c0cbb4000cf82358be8ee920 (patch)
treebf66c706a7db941b97e0b509208aad97f3fd356f
parent740871b0f56f371f2c4566999da98f0372f21a1d (diff)
downloadtftp-hpa-a1dfd6baf8d7c561c0cbb4000cf82358be8ee920.tar.gz
Support editline instead of readline
Support editline as an alternative to readline. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--configure.in18
1 files changed, 11 insertions, 7 deletions
diff --git a/configure.in b/configure.in
index 209b838..ca21af7 100644
--- a/configure.in
+++ b/configure.in
@@ -224,7 +224,7 @@ dnl These libraries apply to the client only
dnl
AH_TEMPLATE([WITH_READLINE],
-[Define if we are compiling with readline command-line editing.])
+[Define if we are compiling with readline/editline command-line editing.])
PA_WITH_BOOL(readline, 1,
[ --without-readline disable the use of readline command-line editing],
@@ -235,13 +235,17 @@ PA_WITH_BOOL(readline, 1,
AC_SEARCH_LIBS(tputs, [termcap terminfo])
AC_SEARCH_LIBS(readline, [readline history],
- [
- AC_DEFINE(WITH_READLINE)
- ],
- [],
- [-ltermcap])
+ [AC_DEFINE(WITH_READLINE)])
AC_CHECK_HEADERS(readline/history.h)
- ])
+ ],
+ [AC_CHECK_HEADER(editline/readline.h,
+ [
+ dnl editline may need libtermcap or somesuch...
+ AC_SEARCH_LIBS(tputs, [termcap terminfo])
+
+ AC_SEARCH_LIBS(editline, [edit],
+ [AC_DEFINE(WITH_READLINE)])
+ ])])
],:)
TFTP_LIBS="$LIBS $XTRALIBS"