]> git.proxmox.com Git - libtpms.git/commitdiff
build-sys: add with_tpm1/with_tpm2 variables to .pc
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 5 Aug 2021 15:08:13 +0000 (19:08 +0400)
committerStefan Berger <stefanb@us.ibm.com>
Fri, 6 Aug 2021 12:04:37 +0000 (08:04 -0400)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
configure.ac
libtpms.pc.in

index f5d6595d84b077a646b86cdda46743cc6744f347..002e55af3ce21193368a4b1e7d38a5835f2352f5 100644 (file)
@@ -70,7 +70,10 @@ AM_CONDITIONAL([HAVE_VERSION_SCRIPT], [test "x$have_version_script" = "xyes"])
 AC_ARG_WITH([tpm1],
     AS_HELP_STRING([--with-tpm1], [build libtpms with TPM 1.2 support]), [], [with_tpm1=yes])
 AM_CONDITIONAL([WITH_TPM1], [test "x$with_tpm1" != "xno"])
-AS_IF([test "x$with_tpm1" != "xno"], [AC_DEFINE([WITH_TPM1], [1], [With TPM 1.2 support])])
+AS_IF([test "x$with_tpm1" != "xno"], [
+    AC_DEFINE([WITH_TPM1], [1], [With TPM 1.2 support])
+    AC_SUBST([WITH_TPM1], [1])
+])
 
 AC_ARG_WITH([tpm2],
        AS_HELP_STRING([--with-tpm2],[build libtpms with TPM2 support]),
@@ -80,6 +83,7 @@ AC_ARG_WITH([tpm2],
 AS_IF([test "x$with_tpm2" = xyes], [
        AC_MSG_RESULT([Building with TPM2 support])
        AC_DEFINE_UNQUOTED([WITH_TPM2], 1, [whether to support TPM2])
+       AC_SUBST([WITH_TPM2], [1])
        AM_CONDITIONAL(WITH_TPM2, true)
        cryptolib=openssl
 ], [
index f1c43722aa60f7c182e8805a1c878b8ba65cd8a3..fbd10f96f1a923361261ac45c8f523acc94c68fd 100644 (file)
@@ -4,6 +4,9 @@ libdir=@libdir@
 includedir=@includedir@
 cryptolib=@cryptolib@
 
+with_tpm1=@WITH_TPM1@
+with_tpm2=@WITH_TPM2@
+
 Name: libtpms
 Version: @VERSION@
 Description: libtpms