summaryrefslogtreecommitdiffstats
path: root/SoftHSMv2/m4/acx_p11kit.m4
diff options
context:
space:
mode:
authorNingSun <ning.sun@intel.com>2018-02-08 08:34:03 -0800
committerNingSun <ning.sun@intel.com>2018-02-08 09:14:52 -0800
commit0c89b3ccba7c9b7332ab67ae1936aff51ca62367 (patch)
tree70c1b1d160d4c6d0a83395ca9a87c1264d0d3439 /SoftHSMv2/m4/acx_p11kit.m4
parent945613b4db4e07f75d2bc7463db580ddfaa700fd (diff)
Initial sshsm project structure
Issue-ID: AAF-94 Change-Id: I5e82fff418e7567b161acf9b98013a9b85ffc5b4 Signed-off-by: NingSun <ning.sun@intel.com>
Diffstat (limited to 'SoftHSMv2/m4/acx_p11kit.m4')
-rw-r--r--SoftHSMv2/m4/acx_p11kit.m436
1 files changed, 36 insertions, 0 deletions
diff --git a/SoftHSMv2/m4/acx_p11kit.m4 b/SoftHSMv2/m4/acx_p11kit.m4
new file mode 100644
index 0000000..20c7b7e
--- /dev/null
+++ b/SoftHSMv2/m4/acx_p11kit.m4
@@ -0,0 +1,36 @@
+AC_DEFUN([ACX_P11KIT],[
+ AC_ARG_ENABLE([p11-kit],
+ AC_HELP_STRING([--enable-p11-kit],
+ [Enable p11-kit integration (default enabled)]
+ ),
+ [enable_p11kit="${enableval}"],
+ [enable_p11kit="yes"]
+ )
+
+ AC_ARG_WITH(p11-kit,
+ AC_HELP_STRING([--with-p11-kit=PATH],[Specify install path of the p11-kit module, will override path given by pkg-config]),
+ [P11KIT_PATH="$withval"],
+ [P11KIT_PATH=""]
+ )
+
+ AC_MSG_CHECKING(for p11-kit integration)
+ if test "x${enable_p11kit}" = "xyes"; then
+ AC_MSG_RESULT(yes)
+ if test "x${P11KIT_PATH}" = "x"; then
+ AC_PATH_PROG(PKGCONFIG, [pkg-config])
+ if test "x${PKGCONFIG}" != "x" && ${PKGCONFIG} --exists p11-kit-1; then
+ P11KIT_PATH=`${PKGCONFIG} --variable=p11_module_configs p11-kit-1`
+ fi
+ fi
+ AC_MSG_CHECKING(where to install the p11-kit module)
+ AC_MSG_RESULT($P11KIT_PATH)
+ if test "x${P11KIT_PATH}" = "x"; then
+ AC_MSG_WARN([Missing install path for the p11-kit module, skipping module])
+ fi
+ else
+ AC_MSG_RESULT(no)
+ fi
+
+ AC_SUBST(P11KIT_PATH)
+ AM_CONDITIONAL([WITH_P11KIT], [test "x${enable_p11kit}" = "xyes" -a "x${P11KIT_PATH}" != "x"])
+])