NetworkManager r3683 - trunk



Author: dcbw
Date: Thu May 22 17:19:34 2008
New Revision: 3683
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3683&view=rev

Log:
2008-05-22  Dan Williams  <dcbw redhat com>

	* configure.in
		- clean up crypto options; just use --with-crypto=nss or
			--with-crypto=gnutls



Modified:
   trunk/ChangeLog
   trunk/configure.in

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Thu May 22 17:19:34 2008
@@ -261,42 +261,36 @@
 
 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 @@
 
 # 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]))
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]