summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorCody Maloney2013-02-07 07:22:18 +0100
committerKarel Zak2013-02-13 09:17:34 +0100
commit7e4714f22bb6e3140840bf5b0561e46347218042 (patch)
tree77174815489a1b03214476d45f5426bd9cc66a7a /configure.ac
parentlibmount: tags does not start with '/' (diff)
downloadkernel-qcow2-util-linux-7e4714f22bb6e3140840bf5b0561e46347218042.tar.gz
kernel-qcow2-util-linux-7e4714f22bb6e3140840bf5b0561e46347218042.tar.xz
kernel-qcow2-util-linux-7e4714f22bb6e3140840bf5b0561e46347218042.zip
build-sys: Add flag for enabling/disabling libuser support.
Signed-off-by: Cody Maloney <cmaloney@theoreticalchaos.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 17 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index d26a686b0..cf6e92210 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1126,6 +1126,23 @@ AS_HELP_STRING([--disable-chsh-only-listed], [chsh: allow shells not in /etc/she
[], enable_chsh_only_listed=yes
)
+AC_ARG_WITH([libuser], AS_HELP_STRING([--without-libuser], [compile without libuser (remote chsh)]),
+ [], with_user=auto
+)
+
+if test "x$with_user" = xno; then
+ AM_CONDITIONAL(HAVE_USER, false)
+else
+ PKG_CHECK_MODULES(LIBUSER,[libuser >= 0.58])
+ UL_CHECK_LIB(user, lu_start)
+ case "$with_user:$have_user" in
+ yes:no)
+ AC_MSG_ERROR([user selected but libuser not found])
+ ;;
+ esac
+fi
+
+
if test "x$enable_chsh_only_listed" = xyes; then
AC_DEFINE(ONLY_LISTED_SHELLS, 1, [Should chsh allow only shells in /etc/shells?])
fi