--- gnucash-2.6.4/configure.ac	2014-09-27 20:11:31.000000000 -0400
+++ gnucash-2.6.4/configure.ac.new	2015-01-26 21:17:41.584836391 -0500
@@ -737,6 +737,18 @@
     AC_DEFINE(REGISTER2_ENABLED,0,We are not using Register2)
   fi)
 
+
+### --------------------------------------------------------------------------
+### Disable libsecret and gnome-keyring
+AC_ARG_ENABLE(passwdstore,
+  [AS_HELP_STRING([--disable-passwdstore],[disable libsecret/gnome-keyring password storage])],
+  [case "${enableval}" in
+     yes) want_passwdstore=true ;;
+     no)  want_passwdstore=false ;;
+     *) want_passwdstore=true ;;
+   esac],
+   [want_passwdstore=true])
+
 ### --------------------------------------------------------------------------
 ### OFX
 want_ofx=auto
@@ -1114,22 +1126,28 @@
   ###-----------------------------------------------------------------------
   ## Find a suitable password store
 
-  case $host_os in
-    darwin*)
-      AC_DEFINE(HAVE_OSX_KEYCHAIN,1,[System has an OS X Key chain])
-      ;;
-    *)
-      PKG_CHECK_MODULES(GNOME_KEYRING, gnome-keyring-1 >= "0.6",
-          [AC_DEFINE(HAVE_GNOME_KEYRING,1,[System has gnome-keyring 0.6 or better])],
-          [AC_DEFINE(HAVE_NO_KEYRING,1,[System has no suitable keyring service])])
-
-      PKG_CHECK_MODULES(LIBSECRET, libsecret-1 >= "0.18",
-          [AC_DEFINE(HAVE_LIBSECRET,1,[System has libsecret 0.18 or better])],
-          [AC_DEFINE(HAVE_NO_LIBSECRET,1,[System has no suitable libsecret service])])
-      AC_SUBST(LIBSECRET_CFLAGS)
-      AC_SUBST(LIBSECRET_LIBS)
-      ;;
-  esac
+  if test x${want_passwdstore} = xyes ;
+  then
+    case $host_os in
+      darwin*)
+        AC_DEFINE(HAVE_OSX_KEYCHAIN,1,[System has an OS X Key chain])
+        ;;
+      *)
+        PKG_CHECK_MODULES(GNOME_KEYRING, gnome-keyring-1 >= "0.6",
+            [AC_DEFINE(HAVE_GNOME_KEYRING,1,[System has gnome-keyring 0.6 or better])],
+            [AC_DEFINE(HAVE_NO_KEYRING,1,[System has no suitable keyring service])])
+  
+        PKG_CHECK_MODULES(LIBSECRET, libsecret-1 >= "0.18",
+            [AC_DEFINE(HAVE_LIBSECRET,1,[System has libsecret 0.18 or better])],
+            [AC_DEFINE(HAVE_NO_LIBSECRET,1,[System has no suitable libsecret service])])
+        AC_SUBST(LIBSECRET_CFLAGS)
+        AC_SUBST(LIBSECRET_LIBS)
+        ;;
+    esac
+  else
+    AC_DEFINE(HAVE_NO_LIBSECRET,1,[System has no suitable libsecret service])
+    AC_DEFINE(HAVE_NO_KEYRING,1,[System has no suitable keyring service])
+  fi
 
   ### ----------------------------------------------------------------------
 
