summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-09-28 21:36:53 -0400
committerDavid Thompson <dthompson2@worcester.edu>2015-09-28 21:36:53 -0400
commit51adb648e0528833a0b2d777ea0d9cf3afdce579 (patch)
tree9dd49773f5b8a3ab110059d18d2078ce8ccdb81b
parentcfc3914a542006ec12189a176e6347006171e653 (diff)
Detect GPG binary at configure time.v0.1.0
* configure.ac (GPG): New variable. * shroud/config.scm.in (%gpg): New variable. * shroud/ui.scm (%default-config): Use '%gpg' as default GPG binary.
-rw-r--r--configure.ac1
-rw-r--r--shroud/config.scm.in3
-rw-r--r--shroud/ui.scm2
3 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 3ddbac9..399fa01 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,6 +13,7 @@ AC_CONFIG_FILES([shroud/config.scm])
GUILE_PROGS([2.0.11])
+AC_PATH_PROGS([GPG], [gpg gpg2])
AC_PATH_PROG([XCLIP], [xclip])
AC_OUTPUT
diff --git a/shroud/config.scm.in b/shroud/config.scm.in
index 00d6f39..815ed55 100644
--- a/shroud/config.scm.in
+++ b/shroud/config.scm.in
@@ -18,8 +18,11 @@
(define-module (shroud config)
#:export (%shroud-version
+ %gpg
%xclip))
(define %shroud-version "0.1")
+(define %gpg "@GPG@")
+
(define %xclip "@XCLIP@")
diff --git a/shroud/ui.scm b/shroud/ui.scm
index 75106c9..ab78010 100644
--- a/shroud/ui.scm
+++ b/shroud/ui.scm
@@ -116,7 +116,7 @@ ARGS is the list of arguments received by the 'throw' handler."
(define %default-config
`((database-file . ,(string-append (getenv "HOME") "/.config/shroud/db.gpg"))
- (gpg-binary . "gpg")))
+ (gpg-binary . ,%gpg)))
(define (load-config)
"Load and evaluate user configuration file."