mirror of
git://git.gnupg.org/gnupg.git
synced 2025-03-11 22:52:47 +01:00
build: new option to disable building of tpm2daemon
* configure.ac (build_tpmd): New configure option --disable-tpm2d (BUILD_WITH_TPM2D): New. * Makefile.am (tests): Use conditionally BUILD_TPM2D instead of HAVE_LIBTSS. * build-aux/speedo.mk (speedo_pkg_gnupg_configure) [W32]: Do not build tpm2d. * autogen.rc: Ditto.
This commit is contained in:
parent
b743942a97
commit
8d6123faa8
@ -106,7 +106,7 @@ tests =
|
|||||||
else
|
else
|
||||||
tests = tests
|
tests = tests
|
||||||
endif
|
endif
|
||||||
if HAVE_LIBTSS
|
if BUILD_TPM2D
|
||||||
tpm2d = tpm2d
|
tpm2d = tpm2d
|
||||||
else
|
else
|
||||||
tpm2d =
|
tpm2d =
|
||||||
|
@ -20,6 +20,7 @@ case "$myhost" in
|
|||||||
--with-zlib=@SYSROOT@
|
--with-zlib=@SYSROOT@
|
||||||
--with-regex=@SYSROOT@
|
--with-regex=@SYSROOT@
|
||||||
--disable-g13
|
--disable-g13
|
||||||
|
--disable-tpm2d
|
||||||
"
|
"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
@ -614,7 +614,7 @@ speedo_pkg_ntbtls_configure = --disable-shared
|
|||||||
|
|
||||||
ifeq ($(TARGETOS),w32)
|
ifeq ($(TARGETOS),w32)
|
||||||
speedo_pkg_gnupg_configure = \
|
speedo_pkg_gnupg_configure = \
|
||||||
--disable-g13 --enable-ntbtls
|
--disable-g13 --enable-ntbtls --disable-tpm2d
|
||||||
else
|
else
|
||||||
speedo_pkg_gnupg_configure = --disable-g13 --enable-wks-tools
|
speedo_pkg_gnupg_configure = --disable-g13 --enable-wks-tools
|
||||||
endif
|
endif
|
||||||
|
44
configure.ac
44
configure.ac
@ -127,6 +127,7 @@ GNUPG_BUILD_PROGRAM(scdaemon, yes)
|
|||||||
GNUPG_BUILD_PROGRAM(g13, no)
|
GNUPG_BUILD_PROGRAM(g13, no)
|
||||||
GNUPG_BUILD_PROGRAM(dirmngr, yes)
|
GNUPG_BUILD_PROGRAM(dirmngr, yes)
|
||||||
GNUPG_BUILD_PROGRAM(keyboxd, yes)
|
GNUPG_BUILD_PROGRAM(keyboxd, yes)
|
||||||
|
GNUPG_BUILD_PROGRAM(tpm2d, yes)
|
||||||
GNUPG_BUILD_PROGRAM(doc, yes)
|
GNUPG_BUILD_PROGRAM(doc, yes)
|
||||||
# We use gpgtar to unpack test data, hence we always build it. If the
|
# We use gpgtar to unpack test data, hence we always build it. If the
|
||||||
# user opts out, we simply don't install it.
|
# user opts out, we simply don't install it.
|
||||||
@ -1593,23 +1594,28 @@ AC_SUBST(W32SOCKLIBS)
|
|||||||
#
|
#
|
||||||
# TPM libtss library .. don't compile TPM support if we don't have it
|
# TPM libtss library .. don't compile TPM support if we don't have it
|
||||||
#
|
#
|
||||||
_save_libs="$LIBS"
|
LIBTSS_LIBS=
|
||||||
_save_cflags="$CFLAGS"
|
LIBTSS_CFLAGS=
|
||||||
LIBS=""
|
if test "$build_tpm2d" = "yes"; then
|
||||||
AC_SEARCH_LIBS([TSS_Create], [tss ibmtss],have_libtss=IBM,
|
_save_libs="$LIBS"
|
||||||
|
_save_cflags="$CFLAGS"
|
||||||
|
LIBS=""
|
||||||
|
AC_SEARCH_LIBS([TSS_Create], [tss ibmtss],have_libtss=IBM,
|
||||||
AC_SEARCH_LIBS([Esys_Initialize], [tss2-esys],have_libtss=Intel))
|
AC_SEARCH_LIBS([Esys_Initialize], [tss2-esys],have_libtss=Intel))
|
||||||
if test "$have_libtss" = IBM; then
|
if test "$have_libtss" = IBM; then
|
||||||
LIBTSS_CFLAGS="-DTPM_POSIX"
|
LIBTSS_CFLAGS="-DTPM_POSIX"
|
||||||
CFLAGS="$CFLAGS ${LIBTSS_CFLAGS}"
|
CFLAGS="$CFLAGS ${LIBTSS_CFLAGS}"
|
||||||
AC_CHECK_HEADER([tss2/tss.h],[AC_DEFINE(TSS_INCLUDE,tss2, [tss2 include location])], [
|
AC_CHECK_HEADER([tss2/tss.h],
|
||||||
AC_CHECK_HEADER([ibmtss/tss.h],[AC_DEFINE(TSS_INCLUDE,ibmtss, [ibmtss include location])], [
|
[AC_DEFINE(TSS_INCLUDE,tss2, [tss2 include location])], [
|
||||||
|
AC_CHECK_HEADER([ibmtss/tss.h],[AC_DEFINE(TSS_INCLUDE,ibmtss,
|
||||||
|
[ibmtss include location])], [
|
||||||
AC_MSG_WARN([No TSS2 include directory found, disabling TPM support])
|
AC_MSG_WARN([No TSS2 include directory found, disabling TPM support])
|
||||||
have_libtss=no
|
have_libtss=no
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
LIBTSS_LIBS=$LIBS
|
LIBTSS_LIBS=$LIBS
|
||||||
AC_SUBST(TSS_INCLUDE)
|
AC_SUBST(TSS_INCLUDE)
|
||||||
elif test "$have_libtss" = Intel; then
|
elif test "$have_libtss" = Intel; then
|
||||||
##
|
##
|
||||||
# Intel TSS has an API issue: Esys_TR_GetTpmHandle wasn't introduced
|
# Intel TSS has an API issue: Esys_TR_GetTpmHandle wasn't introduced
|
||||||
# until version 2.4.0.
|
# until version 2.4.0.
|
||||||
@ -1623,15 +1629,19 @@ elif test "$have_libtss" = Intel; then
|
|||||||
])
|
])
|
||||||
LIBTSS_LIBS="$LIBS -ltss2-mu -ltss2-rc -ltss2-tctildr"
|
LIBTSS_LIBS="$LIBS -ltss2-mu -ltss2-rc -ltss2-tctildr"
|
||||||
AC_DEFINE(HAVE_INTEL_TSS, 1, [Defined if we have the Intel TSS])
|
AC_DEFINE(HAVE_INTEL_TSS, 1, [Defined if we have the Intel TSS])
|
||||||
fi
|
fi
|
||||||
LIBS="$_save_libs"
|
LIBS="$_save_libs"
|
||||||
CFLAGS="$_save_cflags"
|
CFLAGS="$_save_cflags"
|
||||||
if test "$have_libtss" != no; then
|
if test "$have_libtss" != no; then
|
||||||
AC_DEFINE(HAVE_LIBTSS, 1, [Defined if we have TPM2 support library])
|
AC_DEFINE(HAVE_LIBTSS, 1, [Defined if we have TPM2 support library])
|
||||||
# look for a TPM emulator for testing
|
# look for a TPM emulator for testing
|
||||||
AC_PATH_PROG(TPMSERVER, tpm_server,,/bin:/usr/bin:/usr/lib/ibmtss:/usr/libexec/ibmtss)
|
AC_PATH_PROG(TPMSERVER, tpm_server,,/bin:/usr/bin:/usr/lib/ibmtss:/usr/libexec/ibmtss)
|
||||||
AC_PATH_PROG(SWTPM, swtpm,,/bin:/usr/bin:/usr/lib/ibmtss:/usr/libexec/ibmtss)
|
AC_PATH_PROG(SWTPM, swtpm,,/bin:/usr/bin:/usr/lib/ibmtss:/usr/libexec/ibmtss)
|
||||||
AC_PATH_PROG(SWTPM_IOCTL, swtpm_ioctl,,/bin:/usr/bin:/usr/lib/ibmtss:/usr/libexec/ibmtss)
|
AC_PATH_PROG(SWTPM_IOCTL, swtpm_ioctl,,/bin:/usr/bin:/usr/lib/ibmtss:/usr/libexec/ibmtss)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "$have_libtss" = no; then
|
||||||
|
build_tpm2d=no
|
||||||
fi
|
fi
|
||||||
AC_SUBST(LIBTSS_LIBS)
|
AC_SUBST(LIBTSS_LIBS)
|
||||||
AC_SUBST(LIBTSS_CFLAGS)
|
AC_SUBST(LIBTSS_CFLAGS)
|
||||||
@ -1854,6 +1864,7 @@ AM_CONDITIONAL(BUILD_SCDAEMON, test "$build_scdaemon" = "yes")
|
|||||||
AM_CONDITIONAL(BUILD_G13, test "$build_g13" = "yes")
|
AM_CONDITIONAL(BUILD_G13, test "$build_g13" = "yes")
|
||||||
AM_CONDITIONAL(BUILD_DIRMNGR, test "$build_dirmngr" = "yes")
|
AM_CONDITIONAL(BUILD_DIRMNGR, test "$build_dirmngr" = "yes")
|
||||||
AM_CONDITIONAL(BUILD_KEYBOXD, test "$build_keyboxd" = "yes")
|
AM_CONDITIONAL(BUILD_KEYBOXD, test "$build_keyboxd" = "yes")
|
||||||
|
AM_CONDITIONAL(BUILD_TPM2D, test "$build_tpm2d" = "yes")
|
||||||
AM_CONDITIONAL(BUILD_DOC, test "$build_doc" = "yes")
|
AM_CONDITIONAL(BUILD_DOC, test "$build_doc" = "yes")
|
||||||
AM_CONDITIONAL(BUILD_GPGTAR, test "$build_gpgtar" = "yes")
|
AM_CONDITIONAL(BUILD_GPGTAR, test "$build_gpgtar" = "yes")
|
||||||
AM_CONDITIONAL(BUILD_WKS_TOOLS, test "$build_wks_tools" = "yes")
|
AM_CONDITIONAL(BUILD_WKS_TOOLS, test "$build_wks_tools" = "yes")
|
||||||
@ -1884,6 +1895,9 @@ fi
|
|||||||
if test "$build_keyboxd" = yes ; then
|
if test "$build_keyboxd" = yes ; then
|
||||||
AC_DEFINE(BUILD_WITH_KEYBOXD,1,[Defined if KEYBOXD is to be build])
|
AC_DEFINE(BUILD_WITH_KEYBOXD,1,[Defined if KEYBOXD is to be build])
|
||||||
fi
|
fi
|
||||||
|
if test "$build_tpm2d" = yes ; then
|
||||||
|
AC_DEFINE(BUILD_WITH_TPM2D,1,[Defined if TPM2D to be build])
|
||||||
|
fi
|
||||||
if test "$build_g13" = yes ; then
|
if test "$build_g13" = yes ; then
|
||||||
AC_DEFINE(BUILD_WITH_G13,1,[Defined if G13 is to be build])
|
AC_DEFINE(BUILD_WITH_G13,1,[Defined if G13 is to be build])
|
||||||
fi
|
fi
|
||||||
@ -2130,6 +2144,10 @@ tools/gpg-card.w32-manifest
|
|||||||
|
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
||||||
|
show_tss_type=
|
||||||
|
if test "$build_tpm2d" = "yes"; then
|
||||||
|
show_tss_type="($have_libtss)"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
GnuPG v${VERSION} has been configured as follows:
|
GnuPG v${VERSION} has been configured as follows:
|
||||||
@ -2141,6 +2159,7 @@ echo "
|
|||||||
S/MIME: $build_gpgsm
|
S/MIME: $build_gpgsm
|
||||||
Agent: $build_agent
|
Agent: $build_agent
|
||||||
Smartcard: $build_scdaemon $build_scdaemon_extra
|
Smartcard: $build_scdaemon $build_scdaemon_extra
|
||||||
|
TPM: $build_tpm2d $show_tss_type
|
||||||
G13: $build_g13
|
G13: $build_g13
|
||||||
Dirmngr: $build_dirmngr
|
Dirmngr: $build_dirmngr
|
||||||
Keyboxd: $build_keyboxd
|
Keyboxd: $build_keyboxd
|
||||||
@ -2162,7 +2181,6 @@ echo "
|
|||||||
TLS support: $use_tls_library
|
TLS support: $use_tls_library
|
||||||
TOFU support: $use_tofu
|
TOFU support: $use_tofu
|
||||||
Tor support: $show_tor_support
|
Tor support: $show_tor_support
|
||||||
TPM support: $have_libtss
|
|
||||||
"
|
"
|
||||||
if test "$have_libtss" != no -a -z "$TPMSERVER" -a -z "$SWTPM"; then
|
if test "$have_libtss" != no -a -z "$TPMSERVER" -a -z "$SWTPM"; then
|
||||||
cat <<G10EOF
|
cat <<G10EOF
|
||||||
|
Loading…
x
Reference in New Issue
Block a user