summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac22
1 files changed, 16 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index af57577..7155ae5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -505,7 +505,7 @@ fi
dnl
dnl Check for dlopen -- first try libc then libdl.
dnl
-if test "$PLUGINS" = "yes" || test "$PKCS11" = "yes"; then
+if test "$PLUGINS" = "yes"; then
AC_CHECKING([for libdl Library and Header files])
AC_CHECK_HEADER(dlfcn.h,
[AC_CHECK_FUNC(dlopen,
@@ -625,6 +625,21 @@ dnl
fi
fi
+dnl enable pkcs11 capability
+if test "$PKCS11" = "yes"; then
+ AC_CHECKING([for pkcs11-helper Library and Header files])
+ AC_CHECK_HEADER(pkcs11-helper-1.0/pkcs11h-core.h,
+ [AC_CHECK_LIB(pkcs11-helper, pkcs11h_initialize,
+ [
+ AC_DEFINE(USE_PKCS11, 1, [Enable PKCS11 capability])
+ OPENVPN_ADD_LIBS(-lpkcs11-helper)
+ ],
+ [AC_MSG_RESULT([pkcs11-helper library not found.])]
+ )],
+ [AC_MSG_RESULT([pkcs11-helper headers not found.])]
+ )
+fi
+
dnl enable multi-client mode
if test "$MULTI" = "yes"; then
AC_DEFINE(ENABLE_CLIENT_SERVER, 1, [Enable client/server capability])
@@ -640,11 +655,6 @@ if test "$MANAGEMENT" = "yes"; then
AC_DEFINE(ENABLE_MANAGEMENT, 1, [Enable management server capability])
fi
-dnl enable pkcs11 capability
-if test "$PKCS11" = "yes"; then
- AC_DEFINE(USE_PKCS11, 1, [Enable PKCS11 capability])
-fi
-
dnl enable socks
if test "$SOCKS" = "yes"; then
AC_DEFINE(ENABLE_SOCKS, 1, [Enable Socks proxy support])