summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2009-04-14 15:52:04 +0100
committerRichard Jones <rjones@redhat.com>2009-04-14 15:52:04 +0100
commitd268e64fe76944dc042e7ec68a65e59a6cff16ce (patch)
tree7ec8cfe1d097c1eb17f37d08e1ae5baf636a8b67 /configure.ac
parent374af1d1c85580a7768967bf2f199f10182b011e (diff)
downloadlibguestfs-d268e64fe76944dc042e7ec68a65e59a6cff16ce.tar.gz
libguestfs-d268e64fe76944dc042e7ec68a65e59a6cff16ce.tar.xz
libguestfs-d268e64fe76944dc042e7ec68a65e59a6cff16ce.zip
Added bindings for GNU readline.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 7a32acda..da48491d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -111,6 +111,26 @@ AC_ARG_WITH([mirror],
MIRROR="$with_mirror"
AC_SUBST(MIRROR)
+dnl Readline.
+AC_ARG_WITH([readline],
+ [AS_HELP_STRING([--with-readline],
+ [support fancy command line editing @<:@default=check@:>@])],
+ [],
+ [with_readline=check])
+
+LIBREADLINE=
+AS_IF([test "x$with_readline" != xno],
+ [AC_CHECK_LIB([readline], [main],
+ [AC_SUBST([LIBREADLINE], ["-lreadline -lncurses"])
+ AC_DEFINE([HAVE_LIBREADLINE], [1],
+ [Define if you have libreadline])
+ ],
+ [if test "x$with_readline" != xcheck; then
+ AC_MSG_FAILURE(
+ [--with-readline was given, but test for readline failed])
+ fi
+ ], -lncurses)])
+
dnl Check for OCaml (optional, for OCaml bindings).
AC_PROG_OCAML
AC_PROG_FINDLIB