Skip to content

Commit

Permalink
configure: Use pkg-config to locate SAPI and TCTI headers / libraries.
Browse files Browse the repository at this point in the history
Signed-off-by: Philip Tricca <[email protected]>
  • Loading branch information
flihp committed Jul 9, 2016
1 parent 54bd259 commit 1b91bf0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 21 deletions.
1 change: 1 addition & 0 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ To build and install the tpm2.0-tools software the following software is require
GNU Autoconf
GNU Automake
GNU Libtool
pkg-config
C compiler
C++ compiler
C Library Development Libraries and Header Files (for pthreads headers)
Expand Down
24 changes: 3 additions & 21 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,6 @@ LT_INIT
AM_INIT_AUTOMAKE([foreign
subdir-objects])
AC_CONFIG_FILES([Makefile])
AC_CHECK_HEADER([tss2/tpm20.h],
[
AC_DEFINE([HAVE_TPM20_H],
[1],
[Define if tpm20.h exists.])
],
[AC_MSG_ERROR([Missing TSS2 headers.])])
AC_CHECK_HEADER([tcti/tcti_socket.h],
[
AC_DEFINE([HAVE_TCTI_SOCKET_H],
[1],
[Define if tcti_socket.h exists.])
],
[AC_MSG_ERROR([Missing TCTI socket header.])],
[#include <tss2/tpm20.h>])
AC_CHECK_HEADER([openssl/sha.h],
[
AC_DEFINE([HAVE_OPENSSL_H],
Expand All @@ -35,10 +20,7 @@ AC_CHECK_HEADER([curl/curl.h],
[Define if curl.h exists.])
],
[AC_MSG_ERROR([Missing CURL headers.])])
AC_CHECK_LIB([tss2], [Tss2_Sys_GetContextSize], [],
[AC_MSG_ERROR([Missing TSS2 library.])], [])
AC_CHECK_LIB([crypto], [SHA256_Init], [],
[AC_MSG_ERROR([Missing CRYPTO library.])], [])
AC_CHECK_LIB([curl], [curl_easy_init], [],
[AC_MSG_ERROR([Missing CURL library.])], [])
PKG_CHECK_MODULES([SAPI],[sapi])
PKG_CHECK_MODULES([TCTI_SOCK],[tcti-socket])
PKG_CHECK_MODULES([TCTI_DEV],[tcti-device])
AC_OUTPUT

0 comments on commit 1b91bf0

Please sign in to comment.