summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorOndrej Oprala2015-02-02 18:11:40 +0100
committerKarel Zak2015-03-25 10:26:40 +0100
commit0273afda3c0e8acf2bea4bbd738e37febcb1939e (patch)
tree0b9005d4f20c3baddf62b4aad93d58d63ba58a8c /configure.ac
parentfsck: fix fsck -C {fd} parsing (diff)
downloadkernel-qcow2-util-linux-0273afda3c0e8acf2bea4bbd738e37febcb1939e.tar.gz
kernel-qcow2-util-linux-0273afda3c0e8acf2bea4bbd738e37febcb1939e.tar.xz
kernel-qcow2-util-linux-0273afda3c0e8acf2bea4bbd738e37febcb1939e.zip
build-sys: add --with-readline
[kzak@redhat.com: - define READLINE_LIBS] Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
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 e070031e0..c0be3b159 100644
--- a/configure.ac
+++ b/configure.ac
@@ -653,6 +653,26 @@ AS_IF([test "x$with_selinux" = xno], [
AC_SUBST([SELINUX_LIBS])
AC_SUBST([SELINUX_LIBS_STATIC])
+
+AC_ARG_WITH([readline],
+ AS_HELP_STRING([--with-readline], [compile with GNU Readline support]),
+ [], [with_readline=auto]
+)
+
+AS_IF([test "x$with_readline" = xno], [
+ AM_CONDITIONAL([HAVE_READLINE], [false])
+], [
+ UL_CHECK_LIB([readline], [readline])
+ AS_CASE([$with_readline:$have_readline],
+ [yes:no],
+ [AC_MSG_ERROR([readline selected but libreadline not found ])],
+ [*:yes],
+ [READLINE_LIBS=-lreadline]
+ )
+])
+AC_SUBST([READLINE_LIBS])
+
+
AC_ARG_WITH([audit],
AS_HELP_STRING([--with-audit], [compile with audit support]),
[], [with_audit=no]