summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2012-07-04 22:53:00 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2012-07-04 23:17:31 +0200
commitd1b7996804f90b0d5efb8a6c468f78fc4b07386f (patch)
tree0a7013b85eada1ebfbe6e35664f2414b5c2c4954 /configure.ac
parent8eb212b1e03671b774ed13071eb72b402e1c0882 (diff)
downloadgnutls-d1b7996804f90b0d5efb8a6c468f78fc4b07386f.tar.gz
Added initial support for TPM keys.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac29
1 files changed, 29 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index eba91ad044..e774be4910 100644
--- a/configure.ac
+++ b/configure.ac
@@ -153,6 +153,33 @@ fi
AM_CONDITIONAL(ENABLE_PKCS11, test "$with_p11_kit" != "no")
+AC_ARG_WITH(tpm,
+ AS_HELP_STRING([--without-tpm],
+ [Build without TPM (trousers) support]))
+if test "$with_tpm" != "no"; then
+ LIBS="$oldlibs -ltspi"
+ AC_MSG_CHECKING([for tss library])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([
+ #include <trousers/tss.h>
+ #include <trousers/trousers.h>],[
+ int err = Tspi_Context_Create((void *)0);
+ Trspi_Error_String(err);])],
+ [AC_MSG_RESULT(yes)
+ AC_SUBST([TSS_LIBS], [-ltspi])
+ AC_SUBST([TSS_CFLAGS], [])
+ AC_DEFINE([HAVE_TROUSERS], 1, [Enable TPM])
+ with_tpm=yes],
+ [AC_MSG_RESULT(no)
+ AC_MSG_WARN([[
+***
+*** trousers was not found. TPM support will be disabled.
+*** ]])
+ with_tpm=no])
+ LIBS="$oldlibs"
+fi
+
+AM_CONDITIONAL(ENABLE_TROUSERS, test "$with_tpm" != "no")
+
enable_local_libopts=yes
dnl PKG_CHECK_MODULES([autoopts], autoopts >= 36.2.11,, [enable_local_libopts=yes])
@@ -208,6 +235,7 @@ AC_SUBST(GNUTLS_REQUIRES_PRIVATE)
AC_SUBST(GNUTLS_ZLIB_LIBS_PRIVATE)
+
gl_INIT
dnl GCC warnings to enable
@@ -581,4 +609,5 @@ AC_MSG_NOTICE([Hardware acceleration/support:
/dev/crypto: $enable_cryptodev
Hardware accel: $hw_accel
PKCS#11 support: $with_p11_kit
+ TPM support: $with_tpm
])