[libsocialweb] build: Check for libkeyutils, add --with-kernel-keyring option
- From: Rob Bradford <rbradford src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsocialweb] build: Check for libkeyutils, add --with-kernel-keyring option
- Date: Tue, 19 Apr 2011 18:13:07 +0000 (UTC)
commit c1afbc06739134186cdefb8446a6ff8e118abb25
Author: Stef Walter <stefw collabora co uk>
Date: Thu Apr 7 13:26:22 2011 +0200
build: Check for libkeyutils, add --with-kernel-keyring option
Fixes: https://bugs.meego.com/show_bug.cgi?id=16373
configure.ac | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 9e5266a..ec89d98 100644
--- a/configure.ac
+++ b/configure.ac
@@ -124,6 +124,33 @@ AS_IF(
AC_MSG_RESULT([no])
)
+AC_MSG_CHECKING([whether to use kernel keyring via libkeyutils])
+AC_ARG_WITH([kernel-keyring], [AS_HELP_STRING([--with-kernel-keyring], [enable support for kernel keyring])],
+ [], [with_kernel_keyring=yes])
+
+KEYUTILS_CFLAGS=""
+KEYUTILS_LIBS=""
+
+AS_IF(
+ [test "$with_kernel_keyring" = "yes"],
+ [
+ AC_CHECK_HEADER([keyutils.h],
+ [AC_CHECK_LIB([keyutils], [keyctl_read], [have_keyutils="yes"])]
+ )
+ if test "$have_keyutils" != "yes"; then
+ AC_MSG_ERROR([The keyutils library (or developer files) was not found])
+ else
+ AC_MSG_RESULT([yes])
+ KEYUTILS_LIBS="-lkeyutils"
+ AC_DEFINE([WITH_KEYUTILS], 1, [Use keyutils and kernel keyring])
+ fi
+ ]
+ AC_MSG_RESULT([no])
+)
+
+AC_SUBST(KEYUTILS_CFLAGS)
+AC_SUBST(KEYUTILS_LIBS)
+
AC_ARG_ENABLE([all-services],[AS_HELP_STRING([--enable-all-services], [enable every service])],
[], [enable_all_services=no])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]