You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2012/09/18 18:07:38 UTC

svn commit: r1387230 - /subversion/trunk/configure.ac

Author: stsp
Date: Tue Sep 18 16:07:38 2012
New Revision: 1387230

URL: http://svn.apache.org/viewvc?rev=1387230&view=rev
Log:
* configure.ac: If --with-gnome-keyring is not provided, look for it and
   enabled it automatically if requirements are met. If --with-gnome-kerying=no
   is given, do not compile gnome-keyring support under any circumstances.
   If --with-gnome-keyring=yes is given, and requirements for gnome keyring
   aren't met, error out to alert the user of missing requirements.

Suggested by: philip
              jerenkrantz
              gstein

Modified:
    subversion/trunk/configure.ac

Modified: subversion/trunk/configure.ac
URL: http://svn.apache.org/viewvc/subversion/trunk/configure.ac?rev=1387230&r1=1387229&r2=1387230&view=diff
==============================================================================
--- subversion/trunk/configure.ac (original)
+++ subversion/trunk/configure.ac Tue Sep 18 16:07:38 2012
@@ -559,10 +559,11 @@ dnl GNOME Keyring -------------------
 
 AC_ARG_WITH(gnome_keyring,
   AS_HELP_STRING([--with-gnome-keyring], 
-                 [Enable use of GNOME Keyring for auth credentials]),
+                 [Enable use of GNOME Keyring for auth credentials (enabled by default if found)]),
                  [with_gnome_keyring="$withval"],
-                 [with_gnome_keyring=no])
+                 [with_gnome_keyring=auto])
 
+found_gnome_keyring=no
 AC_MSG_CHECKING([whether to look for GNOME Keyring])
 if test "$with_gnome_keyring" != "no"; then
   AC_MSG_RESULT([yes])
@@ -575,9 +576,9 @@ if test "$with_gnome_keyring" != "no"; t
           old_CPPFLAGS="$CPPFLAGS"
           SVN_GNOME_KEYRING_INCLUDES="`$PKG_CONFIG --cflags glib-2.0 gnome-keyring-1`"
           CPPFLAGS="$CPPFLAGS $SVN_GNOME_KEYRING_INCLUDES"
-          AC_CHECK_HEADER(gnome-keyring.h, with_gnome_keyring=yes, with_gnome_keyring=no)
+          AC_CHECK_HEADER(gnome-keyring.h, found_gnome_keyring=yes, found_gnome_keyring=no)
           AC_MSG_CHECKING([for GNOME Keyring])
-          if test "$with_gnome_keyring" = "yes"; then
+          if test "$found_gnome_keyring" = "yes"; then
             AC_MSG_RESULT([yes])
             AC_DEFINE([SVN_HAVE_GNOME_KEYRING], [1], 
                       [Is GNOME Keyring support enabled?])
@@ -585,22 +586,38 @@ if test "$with_gnome_keyring" != "no"; t
             SVN_GNOME_KEYRING_LIBS="`$PKG_CONFIG --libs glib-2.0 gnome-keyring-1`"
           else
             AC_MSG_RESULT([no])
+            if test "$with_gnome_keyring" = "yes"; then
+              AC_MSG_ERROR([cannot find GNOME Keyring])
+            fi
           fi
         else
           AC_MSG_RESULT([no])
-          AC_MSG_WARN([cannot find GLib and GNOME Keyring .pc files. GNOME Keyring disabled.])
+          if test "$with_gnome_keyring" = "yes"; then
+            AC_MSG_ERROR([cannot find GLib and GNOME Keyring .pc files.])
+          else
+            with_gnome_keyring=no
+          fi
+        fi
+      else
+        if test "$with_gnome_keyring" = "yes"; then
+          AC_MSG_ERROR([cannot find pkg-config. GNOME Keyring requires this.])
+        else
           with_gnome_keyring=no
         fi
+      fi
+    else
+      if test "$with_gnome_keyring" = "yes"; then
+        AC_MSG_ERROR([APR does not have support for DSOs. GNOME Keyring requires this.])
       else
-        AC_MSG_WARN([cannot find pkg-config. GNOME Keyring disabled.])
         with_gnome_keyring=no
       fi
+    fi
+  else
+    if test "$with_gnome_keyring" = "yes"; then
+      AC_MSG_ERROR([--with-gnome-keyring conflicts with --disable-shared])
     else
-      AC_MSG_WARN([APR does not have support for DSOs. GNOME Keyring disabled.])
       with_gnome_keyring=no
     fi
-  else
-    AC_MSG_ERROR([--with-gnome-keyring conflicts with --disable-shared])
   fi
 else
   AC_MSG_RESULT([no])
@@ -812,7 +829,7 @@ if test "$svn_lib_kwallet" = "yes"; then
   INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-kwallet-lib"
 fi
 
-if test "$with_gnome_keyring" = "yes"; then
+if test "$found_gnome_keyring" = "yes"; then
   BUILD_RULES="$BUILD_RULES gnome-keyring-lib"
   INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-lib/install-lib install-gnome-keyring-lib/'`"
   INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-gnome-keyring-lib"