From 51adb648e0528833a0b2d777ea0d9cf3afdce579 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Mon, 28 Sep 2015 21:36:53 -0400 Subject: Detect GPG binary at configure time. * configure.ac (GPG): New variable. * shroud/config.scm.in (%gpg): New variable. * shroud/ui.scm (%default-config): Use '%gpg' as default GPG binary. --- configure.ac | 1 + shroud/config.scm.in | 3 +++ shroud/ui.scm | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) 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." -- cgit v1.2.3