diff options
author | Daiki Ueno <ueno@gnu.org> | 2022-01-16 12:17:39 +0100 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2022-01-16 17:58:32 +0100 |
commit | edd6d699e53b258dcf2f523286674bea1f532758 (patch) | |
tree | 94bf3e76c1d7c8d8e2fc314f004f4f680892b0e1 | |
parent | 0a673a028506c6bff961c41992fb25baa1a11509 (diff) | |
download | gnutls-edd6d699e53b258dcf2f523286674bea1f532758.tar.gz |
configure.ac: emit feature summary as C macro
Signed-off-by: Daiki Ueno <ueno@gnu.org>
-rw-r--r-- | configure.ac | 66 |
1 files changed, 65 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index a4f8c183ae..ef4878d7ea 100644 --- a/configure.ac +++ b/configure.ac @@ -864,7 +864,7 @@ AM_CONDITIONAL(P11KIT_0_23_11_API, $PKG_CONFIG --atleast-version=0.23.11 p11-kit AM_CONDITIONAL(ENABLE_PKCS11, test "$with_p11_kit" != "no") -AC_ARG_WITH(tpm, +AC_ARG_WITH(tpm2, AS_HELP_STRING([--without-tpm2], [Disable TPM2 support.]), [with_tpm2=$withval], [with_tpm2=auto]) @@ -1142,6 +1142,70 @@ AM_CONDITIONAL(NEEDS_LIBRT, test "$gnutls_needs_librt" = "yes") AC_DEFINE([GNUTLS_INTERNAL_BUILD], 1, [We allow temporarily usage of deprecated functions - until they are removed.]) +hw_features= +if test "$enable_cryptodev" = yes; then + hw_features="$hw_features cryptodev" +fi +if test "$enable_afalg" = yes; then + hw_features="$hw_features afalg" +fi +if test "$use_padlock" = yes; then + hw_features="$hw_features padlock" +fi +if test "$with_p11_kit" = yes; then + hw_features="$hw_features pkcs11" +fi +if test "$with_tpm" = yes; then + hw_features="$hw_features tpm" +fi +if test "$have_tpm2" = yes; then + hw_features="$hw_features tpm2" +fi +if test "$enable_ktls" = yes; then + hw_features="$hw_features ktls" +fi +hw_features=`eval 'expr "$hw_features" : " \(.*\)"'` +AC_DEFINE_UNQUOTED([HW_FEATURES], ["$hw_features"], + [The enabled hardware features]) + +tls_features= +if test "$ac_enable_ssl3" = yes; then + tls_features="$tls_features ssl3" +fi +if test "$ac_enable_ssl2" = yes; then + tls_features="$tls_features ssl2-compat" +fi +if test "$ac_enable_srtp" = yes; then + tls_features="$tls_features srtp" +fi +if test "$ac_enable_alpn" = yes; then + tls_features="$tls_features alpn" +fi +if test "$ac_enable_ocsp" = yes; then + tls_features="$tls_features ocsp" +fi +if test "$ac_enable_srp" = yes; then + tls_features="$tls_features srp" +fi +if test "$ac_enable_psk" = yes; then + tls_features="$tls_features psk" +fi +if test "$ac_enable_dhe" = yes; then + tls_features="$tls_features dhe" +fi +if test "$ac_enable_ecdhe" = yes; then + tls_features="$tls_features ecdhe" +fi +if test "$ac_enable_anon" = yes; then + tls_features="$tls_features auth-anon" +fi +if test "$ac_enable_heartbeat" = yes; then + tls_features="$tls_features heartbeat" +fi +tls_features=`eval 'expr "$tls_features" : " \(.*\)"'` +AC_DEFINE_UNQUOTED([TLS_FEATURES], ["$tls_features"], + [The enabled TLS features]) + AC_DEFINE([fread_file], [_gnutls_fread_file], [static lib rename]) AC_DEFINE([read_file], [_gnutls_read_file], [static lib rename]) |