[gdm/wip/rishi/keyutils-use-pkgconfig] configure: Use pkg-config to look for keyutils



commit 98419c87ed993791978c4738f1e22a04fa59973d
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Jan 31 19:27:02 2020 +0100

    configure: Use pkg-config to look for keyutils
    
    Support for pkg-config was added to keyutils somewhat recently in
    November 2018 [1], whereas the keyutils dependency was originally added
    in August 2016 in commit 31ed6f2b3f1ab45ae07aad41c13a51ba91fd159d.
    
    [1] Keyutils commit d4d758a04616b770
        https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git/commit/?id=d4d758a04616b770

 configure.ac | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index db85229f..20ebf9d9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -532,11 +532,10 @@ if test "x$supports_pam_extensions" = "xyes" ; then
        AC_DEFINE(SUPPORTS_PAM_EXTENSIONS, 1, [Define if PAM supports GDMs custom extensions])
 fi
 
-AC_CHECK_LIB(keyutils, keyctl_read, [
-        AC_DEFINE(HAVE_KEYUTILS, 1, [Define if have keyutils])
-        KEYUTILS_LIBS="-lkeyutils"
-        KEYUTILS_CFLAGS=""
-])
+PKG_CHECK_MODULES([KEYUTILS],
+                  [libkeyutils],
+                  [AC_DEFINE([HAVE_KEYUTILS], [1], [Define if have keyutils])],
+                  [true])
 AC_SUBST(KEYUTILS_LIBS)
 AC_SUBST(KEYUTILS_CFLAGS)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]