diff options
author | James Bottomley <[email protected]> | 2018-03-06 23:02:43 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2018-03-12 09:06:44 +0000 |
commit | 06c0d7f28fa1842f9c52885b142a0d31ba60c8ae (patch) | |
tree | f4e1a63565fc0946f4c73a459fcf86f66e405b23 /agent/Makefile.am | |
parent | agent: Minor cleanup of the TPM patches. (diff) | |
download | gnupg-tpm-work.tar.gz gnupg-tpm-work.zip |
build: Make TPM2 support conditionaltpm-work
* configure.ac (HAVE_LIBTSS): New acdefine and am_conditional.
* agent/Makefile.am: (gpg_agent_SOURCES): Move tpm files to ...
(gpg_agent_SOURCES) [HAVE_LIBTSS]: ... here.
* agent/agent.h (divert_tpm2_pksign, divert_tpm2_pkdecrypt)
(divert_tpm2_writekey) [!HAVE_LIBTSS]: Add stub functions.
--
This adds a configure stanza to check for the necessary libtss to
support TPM functions. If found, the library functions will be
dynamically loaded, meaning that a system built with TPM2 support will
still execute correctly (obviously minus TPM2 support) if installed
without libtss being present.
Signed-off-by: James Bottomley <[email protected]>
Diffstat (limited to 'agent/Makefile.am')
-rw-r--r-- | agent/Makefile.am | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/agent/Makefile.am b/agent/Makefile.am index 4fe74f539..3abdde4fc 100644 --- a/agent/Makefile.am +++ b/agent/Makefile.am @@ -51,12 +51,15 @@ gpg_agent_SOURCES = \ protect.c \ trustlist.c \ divert-scd.c \ - divert-tpm2.c \ - tpm2.c tpm2.h \ cvt-openpgp.c cvt-openpgp.h \ call-scd.c \ learncard.c +if HAVE_LIBTSS +gpg_agent_SOURCES += tpm2.c tpm2.h \ + divert-tpm2.c +endif + common_libs = $(libcommon) commonpth_libs = $(libcommonpth) if HAVE_W32CE_SYSTEM |