summaryrefslogtreecommitdiff
path: root/guix/utils.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-08-17 10:41:27 +0200
committerLudovic Courtès <ludo@gnu.org>2012-08-17 10:41:27 +0200
commit3a310cc017c4bffbee8a6f37569145a593ac2912 (patch)
tree6b12926e76b238bd26a5aa4d9e3f2a444c799517 /guix/utils.scm
parent93a0a8b3fdced4afe3ac2fb0783944c5d76cb360 (diff)
downloadgnu-guix-3a310cc017c4bffbee8a6f37569145a593ac2912.tar
gnu-guix-3a310cc017c4bffbee8a6f37569145a593ac2912.tar.gz
build: Add `--with-libgcrypt-prefix'; capture the path to libgcrypt.
* configure.ac: Add `--with-libgcrypt-prefix'. Substitute `LIBGCRYPT'. * Makefile.am (.scm.go): Pass $(LIBGCRYPT). * guix/utils.scm (%libgcrypt): New variable. (sha256): Use it.
Diffstat (limited to 'guix/utils.scm')
-rw-r--r--guix/utils.scm8
1 files changed, 6 insertions, 2 deletions
diff --git a/guix/utils.scm b/guix/utils.scm
index cbd51fae73..686175947e 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -384,14 +384,18 @@ starting from the right of S."
;;; Hash.
;;;
+(define %libgcrypt
+ ;; Name of the libgcrypt shared library.
+ (compile-time-value (or (getenv "LIBGCRYPT") "libgcrypt")))
+
(define sha256
(cond
((compile-time-value
- (false-if-exception (dynamic-link "libgcrypt")))
+ (false-if-exception (dynamic-link %libgcrypt)))
;; Using libgcrypt.
(let ((hash (pointer->procedure void
(dynamic-func "gcry_md_hash_buffer"
- (dynamic-link "libgcrypt"))
+ (dynamic-link %libgcrypt))
`(,int * * ,size_t)))
(sha256 8)) ; GCRY_MD_SHA256, as of 1.5.0
(lambda (bv)