diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-11-20 16:10:11 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-12-26 18:36:52 +0100 |
commit | fba9533e260d98e1152bd263ec893458d5f81fd2 (patch) | |
tree | c2fccb7a74f2fa82b542306a83c9af18275e485c /guile | |
parent | 3b6c6420ac5d1e58334bc3055af4a85222c481b8 (diff) | |
download | gnutls-fba9533e260d98e1152bd263ec893458d5f81fd2.tar.gz |
guile: Arrange to make 'gnutls.scm' architecture-independent.
Fixes #838.
Reported by Andreas Metzler.
* configure.ac: Define and substitute 'maybe_guileextensiondir'.
* guile/Makefile.am (.in.scm): Substitute 'maybe_guileextensiondir'.
* guile/modules/gnutls.in <top level>: Use @maybe_guileextensiondir@.
Check if %LIBDIR is true.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'guile')
-rw-r--r-- | guile/Makefile.am | 2 | ||||
-rw-r--r-- | guile/modules/gnutls.in | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/guile/Makefile.am b/guile/Makefile.am index a6185aae7b..4f82a9fa9d 100644 --- a/guile/Makefile.am +++ b/guile/Makefile.am @@ -44,7 +44,7 @@ CLEANFILES = modules/gnutls.scm .in.scm: $(AM_V_GEN)$(MKDIR_P) "`dirname "$@"`" ; cat "$^" | \ - $(SED) -e's|[@]guileextensiondir[@]|$(guileextensiondir)|g' \ + $(SED) -e's|[@]maybe_guileextensiondir[@]|$(maybe_guileextensiondir)|g' \ > "$@.tmp" $(AM_V_at)mv "$@.tmp" "$@" diff --git a/guile/modules/gnutls.in b/guile/modules/gnutls.in index 2c84d4c3e5..6461c404a2 100644 --- a/guile/modules/gnutls.in +++ b/guile/modules/gnutls.in @@ -519,10 +519,15 @@ (eval-when (expand load eval) (define %libdir (or (getenv "GNUTLS_GUILE_EXTENSION_DIR") - "@guileextensiondir@")) + + ;; The .scm file is supposed to be architecture-independent. Thus, + ;; save 'extensiondir' only if it's different from what Guile expects. + @maybe_guileextensiondir@)) (unless (getenv "GNUTLS_GUILE_CROSS_COMPILING") - (load-extension (string-append %libdir "/guile-gnutls-v-2") + (load-extension (if %libdir + (string-append %libdir "/guile-gnutls-v-2") + "guile-gnutls-v-2") "scm_init_gnutls"))) (cond-expand |