Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Clean up build options printout
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Jun 13, 2012
1 parent 7c70b63 commit 45d8752
Showing 1 changed file with 28 additions and 19 deletions.
47 changes: 28 additions & 19 deletions main.c
Expand Up @@ -180,28 +180,37 @@ static void helpmessage(void)

static void print_build_opts(void)
{
const char *comma = ", ", *sep = comma + 1;

#if defined (OPENCONNECT_OPENSSL)
printf(_("Using OpenSSL. Features present:"));
#elif defined (OPENCONNECT_GNUTLS)
printf(_("Using GnuTLS. Features present:"));
#endif

if (openconnect_has_tss_blob_support()) {
printf("%sTPM", sep);
sep = comma;
}
#if defined (OPENCONNECT_OPENSSL) && defined (HAVE_ENGINE)
if (openconnect_has_tss_blob_support())
printf(_("Using OpenSSL with TPM ENGINE support. Loading TPM engine succeeded.\n"));
else
printf(_("Using OpenSSL with TPM ENGINE support, but loading TPM engine failed.\n"));
#elif defined (OPENCONNECT_OPENSSL)
printf(_("Using OpenSSL without TPM ENGINE support\n"));
#elif defined (OPENCONNECT_GNUTLS) && defined (HAVE_P11KIT)
printf(_("Using GnuTLS with PKCS#11 token support\n"));
#elif defined (OPENCONNECT_GNUTLS)
printf(_("Using GnuTLS without PKCS#11 token support\n"));
#else
#error wtf
else {
printf("%sTPM (%s)", sep, _("OpenSSL ENGINE not present"));
sep = comma;
}
#endif
#ifndef HAVE_DTLS
printf(_("No DTLS support in this binary\n"));
#elif defined (DTLS_OPENSSL)
printf(_("Using OpenSSL for DTLS support\n"));
#elif defined (DTLS_GNUTLS)
printf(_("Using GnuTLS for DTLS support\n"));
if (openconnect_has_pkcs11_support()) {
printf("%sPKCS#11", sep);
sep = comma;
}

#ifdef HAVE_DTLS
printf("%sDTLS", sep);
#if defined (OPENCONNECT_GNUTLS) && defined (DTLS_OPENSSL)
printf(" (%s)", _("using OpenSSL"));
#endif
printf("\n");
#else
#error wtf
printf(_("\nWARNING: No DTLS support in this binary. Performance will be impaired.\n"));
#endif
}

Expand Down

0 comments on commit 45d8752

Please sign in to comment.