summaryrefslogtreecommitdiff
path: root/guile
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-01-08 10:18:07 +0100
committerLudovic Courtès <ludo@gnu.org>2015-01-08 10:21:07 +0100
commit9f3136ffafd23630d39359cdea8f38da6c584e92 (patch)
treefd177e20835a72b2c81135d400e86163c084acb3 /guile
parentbb616582ea8cce9880067a292f7fc031b19d315f (diff)
downloadgnutls-9f3136ffafd23630d39359cdea8f38da6c584e92.tar.gz
guile: Call 'load-extension' both during expansion and at run time.
Fixes <https://bugzilla.redhat.com/show_bug.cgi?id=1177847>. * guile/modules/gnutls.in: Wrap '%libdir' definition and 'load-extension' call in 'eval-when'.
Diffstat (limited to 'guile')
-rw-r--r--guile/modules/gnutls.in13
1 files changed, 7 insertions, 6 deletions
diff --git a/guile/modules/gnutls.in b/guile/modules/gnutls.in
index b4825226fd..f35f6eae29 100644
--- a/guile/modules/gnutls.in
+++ b/guile/modules/gnutls.in
@@ -1,5 +1,5 @@
;;; GnuTLS --- Guile bindings for GnuTLS.
-;;; Copyright (C) 2007-2012, 2014 Free Software Foundation, Inc.
+;;; Copyright (C) 2007-2012, 2014, 2015 Free Software Foundation, Inc.
;;;
;;; GnuTLS is free software; you can redistribute it and/or
;;; modify it under the terms of the GNU Lesser General Public
@@ -412,12 +412,13 @@
openpgp-certificate-format/raw
openpgp-certificate-format/base64))
-(define %libdir
- (or (getenv "GNUTLS_GUILE_EXTENSION_DIR")
- "@guileextensiondir@"))
+(eval-when (expand load eval)
+ (define %libdir
+ (or (getenv "GNUTLS_GUILE_EXTENSION_DIR")
+ "@guileextensiondir@"))
-(load-extension (string-append %libdir "/guile-gnutls-v-2")
- "scm_init_gnutls")
+ (load-extension (string-append %libdir "/guile-gnutls-v-2")
+ "scm_init_gnutls"))
;; Renaming.
(define protocol/ssl-3 protocol/ssl3)