summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToby Goodwin <toby@paccrat.org>2015-04-07 22:29:26 +0100
committerToby Goodwin <toby@paccrat.org>2015-05-16 21:23:25 +0100
commitaea3b917a8b6668126a3f3df41d4207fcfb38d99 (patch)
tree626ce8be74130392d39af810532a58752e129580
parent85a4df1cd04821b5ae5fe9f90181687621e9eb0a (diff)
edit shims: rename and tidy in configure script
-rw-r--r--configure.ac29
1 files changed, 20 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index d12714a..a0cb40b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -170,21 +170,30 @@ AC_SUBST(ADDON)
EDIT=edit-null.o
-AC_ARG_WITH(edit, [ --with-edit=(bsd,edit,gnu,vrl) Command line editing library], [
+AC_ARG_WITH(edit, [ --with-edit=(edit,editline,readline,vrl) Command line editing library], [
case $withval in
yes)
AC_MSG_ERROR(must specify which library)
# might consider searching
;;
- bsd)
- EDIT=edit-bsd.o
+ no|null)
+ ;;
+ edit|bsd)
+ EDIT=edit-edit.o
RC_LIB_TGETENT
AC_CHECK_LIB(edit, el_init, [
LIBS="$LIBS -ledit $rc_lib_tgetent"
+ ], AC_MSG_ERROR(edit library not found), $rc_lib_tgetent)
+ ;;
+ editline)
+ EDIT=edit-editline.o
+ RC_LIB_TGETENT
+ AC_CHECK_LIB(editline, el_ring_bell, [
+ LIBS="$LIBS -leditline $rc_lib_tgetent"
], AC_MSG_ERROR(editline library not found), $rc_lib_tgetent)
;;
- gnu)
- EDIT=edit-gnu.o
+ readline|gnu)
+ EDIT=edit-readline.o
RC_LIB_TGETENT
AC_CHECK_LIB(readline, readline, [
LIBS="$LIBS -lreadline $rc_lib_tgetent"
@@ -196,10 +205,12 @@ AC_ARG_WITH(edit, [ --with-edit=(bsd,edit,gnu,vrl) Command line editing librar
rl_catch_signals = 0;
], [], AC_MSG_ERROR(readline >= 4.0 not found))
;;
- no|null)
- ;;
- edit|vrl)
- EDIT=edit-$withval.o
+ vrl)
+ EDIT=edit-vrl.o
+ RC_LIB_TGETENT
+ AC_CHECK_LIB(vrl, iline_peekch, [
+ LIBS="$LIBS -lvrl $rc_lib_tgetent"
+ ], AC_MSG_ERROR(vrl library not found), $rc_lib_tgetent)
;;
*)
AC_MSG_ERROR(unknown editing library $withval)