summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorKarel Zak2013-04-18 10:50:30 +0200
committerKarel Zak2013-04-18 10:50:30 +0200
commit6e93c52fbbba8bc506f90cc2339fe7485adada36 (patch)
tree90f8b39ca5d43426d4ae3ec6b821f348582c03fe /configure.ac
parentbuild-sys: fix UL_REQUIRES_HAVE (diff)
downloadkernel-qcow2-util-linux-6e93c52fbbba8bc506f90cc2339fe7485adada36.tar.gz
kernel-qcow2-util-linux-6e93c52fbbba8bc506f90cc2339fe7485adada36.tar.xz
kernel-qcow2-util-linux-6e93c52fbbba8bc506f90cc2339fe7485adada36.zip
build-sys: use pkg-config results for libuser
Our code depends on libuser >= 0.58, it's better to completely rely on pkg-config results rather than also call UL_CHECK_LIB (that overwrites previous pkg-config have_user= result independently on libuser version). Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 7 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 4a38d1198..cde156c73 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1167,17 +1167,16 @@ AM_CONDITIONAL(BUILD_NEWGRP, test "x$build_newgrp" = xyes)
AC_ARG_WITH([user], AS_HELP_STRING([--without-user], [compile without libuser (remote chsh)]),
- [], with_user=auto
+ [], with_user=check
)
-if test "x$with_user" = xno; then
- AM_CONDITIONAL(HAVE_USER, false)
-else
+have_user=no
+if test "x$with_user" != xno; then
PKG_CHECK_MODULES(LIBUSER,[libuser >= 0.58], [have_user=yes], [have_user=no])
- UL_CHECK_LIB(user, lu_start)
case "$with_user:$have_user" in
yes:no)
- AC_MSG_ERROR([user selected but libuser not found])
- ;;
+ AC_MSG_ERROR([user selected but libuser not found]) ;;
+ *:yes)
+ AC_DEFINE(HAVE_LIBUSER, 1, [Define if libuser is available]) ;;
esac
# temporary solution, libuser has stupid .pc where are exported all
# private dependencies to Requires: instead of Requires.private:
@@ -1185,6 +1184,7 @@ else
LIBUSER_LIBS=-luser
fi
fi
+AM_CONDITIONAL(HAVE_USER, test "x$have_user" = xyes)
AC_ARG_ENABLE([chfn-chsh-password],
AS_HELP_STRING([--disable-chfn-chsh-password], [do not require the user to enter the password in chfn and chsh]),