libtpmtss: Use pkconfig to configure TSS 2.0 includes and libraries

This commit is contained in:
Andreas Steffen
2016-07-20 11:26:07 +02:00
parent 60d0f52fd6
commit 0274163674
4 changed files with 11 additions and 7 deletions
+4 -3
View File
@@ -977,10 +977,11 @@ if test x$tss_trousers = xtrue; then
fi
if test x$tss_tss2 = xtrue; then
AC_CHECK_LIB([tss2],[main],[LIBS="$LIBS"],[AC_MSG_ERROR([TTS 2.0 library libtss2 not found])],[])
AC_CHECK_HEADER([tss2/tpm20.h],,[AC_MSG_ERROR([TSS 2.0 header tss2/tpm20.h not found!])])
AC_DEFINE([TSS_TSS2], [], [use TSS 2.0 library libtss2])
PKG_CHECK_MODULES(tss2, [tcti-socket], [AC_DEFINE([TSS_TSS2], [], [use TSS 2.0 libraries])])
AC_SUBST(tss2_CFLAGS)
AC_SUBST(tss2_LIBS)
fi
if test x$imv_swid = xtrue; then
PKG_CHECK_MODULES(json, [json-c], [],
[PKG_CHECK_MODULES(json, [json])])