From 590610941e890cc069c0cbcc52706c0109d0d23f Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 22 May 2008 17:19:34 +0000 Subject: [PATCH] 2008-05-22 Dan Williams * configure.in - clean up crypto options; just use --with-crypto=nss or --with-crypto=gnutls git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3683 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- ChangeLog | 6 ++++++ configure.in | 52 +++++++++++++++++++++++----------------------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index a2e3dbb55e..e688065cd2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-05-22 Dan Williams + + * configure.in + - clean up crypto options; just use --with-crypto=nss or + --with-crypto=gnutls + 2008-05-22 Tambet Ingo * src/nm-manager.c (impl_manager_sleep): No need to schedule the sync diff --git a/configure.in b/configure.in index 6e469ff52a..77f8b31ed2 100644 --- a/configure.in +++ b/configure.in @@ -261,42 +261,36 @@ AC_SUBST(POLKIT_CFLAGS) AC_PATH_PROG([POLKIT_POLICY_FILE_VALIDATE], [polkit-policy-file-validate], [false]) -AC_ARG_WITH(nss, AC_HELP_STRING([--with-nss], [Use NSS library for certificate and key operations]), ac_nss=$withval, ac_nss=auto) -if test x"$ac_nss" != xno; then +AC_ARG_WITH(crypto, AC_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 PKG_CHECK_MODULES(NSS, [nss >= 3.11]) AC_DEFINE(HAVE_NSS, 1, [Define if you have NSS]) -fi -AM_CONDITIONAL(WITH_NSS, test x"$ac_nss" != xno) - -AC_ARG_WITH(gnutls, AC_HELP_STRING([--with-gnutls], [Use gnutls and gcrypt libraries for certificate and key operations]), ac_gnutls=$withval, ac_gnutls=no) -if test x"$ac_gnutls" != xno; then + with_nss=yes +elif test x"$ac_crypto" = xgnutls; then PKG_CHECK_MODULES(GNUTLS, [gnutls >= 1.2]) AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no) + if test x"$LIBGCRYPT_CONFIG" = xno; then + AC_MSG_ERROR([gnutls explicitly requested but gcrypt not found on system]) + else + AC_DEFINE(HAVE_GNUTLS, 1, [Define if you have libgnutls]) + LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags` + LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs` + AC_SUBST(LIBGCRYPT_CFLAGS) + AC_SUBST(LIBGCRYPT_LIBS) + with_gnutls=yes + fi else - LIBGCRYPT_CONFIG=no -fi -if test x"$LIBGCRYPT_CONFIG" = xno; then - if test x"$ac_gnutls" = xyes; then - AC_MSG_ERROR([gnutls explicitly requested but gcrypt not found on system]) - fi - ac_gnutls=no -else - if test x"$ac_gnutls" != xno; then - AC_DEFINE(HAVE_GNUTLS, 1, [Define if you have libgnutls]) - LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags` - LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs` - AC_SUBST(LIBGCRYPT_CFLAGS) - AC_SUBST(LIBGCRYPT_LIBS) - fi + AC_MSG_ERROR([Please choose either 'nss' or 'gnutls' for certificate and key operations]) fi -AM_CONDITIONAL(WITH_GNUTLS, test x"$ac_gnutls" != xno) +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([Please choose either NSS or gnutls for certificate and key operations]) -fi - -if test x"$ac_nss" = xyes -a x"$ac_gnutls" = xyes; then - AC_MSG_ERROR([Please choose _one_ of NSS or gnutls for certificate and key operations]) + AC_MSG_ERROR([Could not find required development headers and libraries for '$ac_crypto']) fi GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0` @@ -326,7 +320,7 @@ AC_SUBST(IP_BINARY_PATH) # PPPD AC_CHECK_HEADERS(pppd/pppd.h,, - AC_MSG_ERROR(couldn't find pppd.h. pppd-devel package is required.)) + AC_MSG_ERROR(couldn't find pppd.h. pppd development headers are required.)) AC_ARG_WITH([pppd-plugin-dir], AS_HELP_STRING([--with-pppd-plugin-dir=DIR], [path to the pppd plugins directory]))