summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorStef Walter <stefw@collabora.co.uk>2011-09-15 10:44:50 +0200
committerStef Walter <stefw@collabora.co.uk>2011-09-15 10:46:29 +0200
commit84737ca00028bb73148ad5664ff31a20ec5daa6a (patch)
treebc9a416663fa4130d9a03c3d81443866e7f36e91 /configure.ac
parent0c79fff27d840d5791cbb5abc838fb30463e3efa (diff)
pkcs11: Fix packaging issues installing the pkcs11 module
* Packagers have problems installing the gnome-keyring-module file because the same file (with different contents) exists on both 32-bit and 64-bit packages. * p11-kit 0.6 fixes this by supporting relative paths for module configuration. We use that relative path stuff here to automatically load the appropriate (32-bit or 64-bit) from the right directory. Discussed on the p11-glue mailing list.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac28
1 files changed, 17 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index 0b7e6394..24602f27 100644
--- a/configure.ac
+++ b/configure.ac
@@ -282,19 +282,31 @@ AC_SUBST(DL_LIBS)
# --------------------------------------------------------------------
# p11-kit
-PKG_CHECK_MODULES([P11_KIT], p11-kit-1)
+PKG_CHECK_MODULES([P11_KIT], p11-kit-1 >= 0.6)
AC_SUBST(P11_KIT_CFLAGS)
AC_SUBST(P11_KIT_LIBS)
AC_MSG_CHECKING([where to put pkcs11 module configuration])
-P11_SYSTEM_MODULES=`$PKG_CONFIG p11-kit-1 --variable=p11_system_modules`
-AC_MSG_RESULT($P11_SYSTEM_MODULES)
-AC_SUBST(P11_SYSTEM_MODULES)
+P11_SYSTEM_CONFIG_MODULES=$($PKG_CONFIG p11-kit-1 --variable=p11_system_config_modules)
+AC_MSG_RESULT($P11_SYSTEM_CONFIG_MODULES)
+AC_SUBST(P11_SYSTEM_CONFIG_MODULES)
-if "$P11_SYSTEM_MODULES" = ""; then
+if test "$P11_SYSTEM_CONFIG_MODULES" = ""; then
AC_MSG_ERROR([Could not find location for pkcs11 module config])
fi
+AC_MSG_CHECKING([default module path for pkcs11 modules])
+P11_MODULE_PATH=$($PKG_CONFIG p11-kit-1 --variable=p11_module_path)
+AC_MSG_RESULT($P11_MODULE_PATH)
+AC_SUBST(P11_MODULE_PATH)
+
+if test "$P11_MODULE_PATH" = ""; then
+ AC_MSG_ERROR([Could not find default path for pkcs11 modules])
+fi
+
+pkcs11standalonedir="${libdir}/gnome-keyring/devel"
+AC_SUBST(pkcs11standalonedir)
+
# --------------------------------------------------------------------
# PAM Module Directory
@@ -719,12 +731,6 @@ AC_SUBST(BINDIR)
eval LIBEXECDIR="$libexecdir"
AC_SUBST(LIBEXECDIR)
-eval pkcs11dir="${libdir}/pkcs11"
-AC_SUBST(pkcs11dir)
-
-pkcs11standalonedir="${libdir}/gnome-keyring/devel"
-AC_SUBST(pkcs11standalonedir)
-
AC_OUTPUT([
Makefile
daemon/Makefile