summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-05-23 14:37:14 +0200
committerThomas Haller <thaller@redhat.com>2018-05-24 11:35:59 +0200
commitdb99b6bba7d97009b2034cf62a421152317e7c6a (patch)
tree957f83a8f9dfa89f2f4de3730dd73ee6a5243ec9 /configure.ac
parentfb29212fb2369b8b72ba922c5aa48976c1500426 (diff)
downloadNetworkManager-db99b6bba7d97009b2034cf62a421152317e7c6a.tar.gz
build: print used crypto library in ./configure result output
And cleanup handling --with-crypto in configure.ac.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac26
1 files changed, 7 insertions, 19 deletions
diff --git a/configure.ac b/configure.ac
index 8adef88731..6ebbc488af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -668,12 +668,9 @@ AC_SUBST(NM_MODIFY_SYSTEM_POLICY)
AC_ARG_WITH(crypto,
AS_HELP_STRING([--with-crypto=nss|gnutls],
[Cryptography library to use for certificate and key operations]),
- ac_crypto=$withval,
- ac_crypto=nss)
-
-with_nss=no
-with_gnutls=no
-if test x"$ac_crypto" = xnss; then
+ with_crypto=$withval,
+ with_crypto=nss)
+if test "$with_crypto" = 'nss'; then
PKG_CHECK_MODULES(NSS, [nss])
# Work around a pkg-config bug (fdo #29801) where exists != usable
@@ -681,23 +678,13 @@ if test x"$ac_crypto" = xnss; then
if test x"$?" != "x0"; then
AC_MSG_ERROR([No usable NSS found])
fi
-
- AC_DEFINE(HAVE_NSS, 1, [Define if you have NSS])
- with_nss=yes
-elif test x"$ac_crypto" = xgnutls; then
+elif test "$with_crypto" = 'gnutls'; then
PKG_CHECK_MODULES(GNUTLS, [gnutls >= 2.12])
- AC_DEFINE(HAVE_GNUTLS, 1, [Define if you have libgnutls])
- with_gnutls=yes
else
AC_MSG_ERROR([Please choose either 'nss' or 'gnutls' for certificate and crypto operations])
fi
-AM_CONDITIONAL(WITH_NSS, test x"$with_nss" != xno)
-AM_CONDITIONAL(WITH_GNUTLS, test x"$with_gnutls" != xno)
-
-# Shouldn't ever trigger this, but just in case...
-if test x"$ac_nss" = xno -a x"$ac_gnutls" = xno; then
- AC_MSG_ERROR([Could not find required development headers and libraries for '$ac_crypto'])
-fi
+AM_CONDITIONAL(WITH_NSS, test "$with_crypto" = 'nss')
+AM_CONDITIONAL(WITH_GNUTLS, test "$with_crypto" = 'gnutls')
GLIB_MAKEFILE='$(top_srcdir)/Makefile.glib'
AC_SUBST(GLIB_MAKEFILE)
@@ -1393,6 +1380,7 @@ echo " code coverage: $enable_code_coverage"
echo " LTO: $enable_lto"
echo " linker garbage collection: $enable_ld_gc"
echo " JSON validation for libnm: $enable_json_validation"
+echo " crypto: $with_crypto"
echo " sanitizers: $sanitizers"
echo " Mozilla Public Suffix List: $with_libpsl"
echo