diff options
author | Ludovic Courtès <ludo@gnu.org> | 2011-11-04 00:27:19 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2011-11-04 00:27:19 +0100 |
commit | 9d31ac4504a6cbaa1cf701efed301961f4ad5359 (patch) | |
tree | a15ce13eee2bbba31b4b7efdd211193bb8e4b311 /guile | |
parent | 76da5a03009ed11ecf255178a6184bef3cbb35ea (diff) | |
download | gnutls-9d31ac4504a6cbaa1cf701efed301961f4ad5359.tar.gz |
guile: Install libguile-gnutls under $(libdir)/guile/X.Y.
Diffstat (limited to 'guile')
-rw-r--r-- | guile/modules/Makefile.am | 11 | ||||
-rw-r--r-- | guile/modules/gnutls.in (renamed from guile/modules/gnutls.scm) | 9 | ||||
-rw-r--r-- | guile/pre-inst-guile.in | 3 | ||||
-rw-r--r-- | guile/src/Makefile.am | 2 |
4 files changed, 21 insertions, 4 deletions
diff --git a/guile/modules/Makefile.am b/guile/modules/Makefile.am index d1b1cac840..ebe1d6e815 100644 --- a/guile/modules/Makefile.am +++ b/guile/modules/Makefile.am @@ -17,7 +17,8 @@ guilemoduledir = $(GUILE_SITE) -nobase_dist_guilemodule_DATA = gnutls.scm gnutls/extra.scm +nobase_nodist_guilemodule_DATA = gnutls.scm +nobase_dist_guilemodule_DATA = gnutls/extra.scm documentation_modules = system/documentation/README \ system/documentation/c-snarf.scm \ @@ -26,4 +27,12 @@ documentation_modules = system/documentation/README \ EXTRA_DIST = gnutls/build/enums.scm gnutls/build/smobs.scm \ gnutls/build/utils.scm gnutls/build/priorities.scm \ gnutls/build/tests.scm \ + gnutls.in \ $(documentation_modules) + +CLEANFILES = gnutls.scm + +.in.scm: + cat "$^" | $(SED) -e's|[@]guileextensiondir[@]|$(guileextensiondir)|g' \ + > "$@.tmp" + mv "$@.tmp" "$@" diff --git a/guile/modules/gnutls.scm b/guile/modules/gnutls.in index 80eade44ad..69e9d3ef73 100644 --- a/guile/modules/gnutls.scm +++ b/guile/modules/gnutls.in @@ -15,7 +15,7 @@ ;;; License along with GnuTLS; if not, write to the Free Software ;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -;;; Written by Ludovic Courtès <ludo@chbouib.org> +;;; Written by Ludovic Courtès <ludo@gnu.org> (define-module (gnutls) ;; Note: The export list must be manually kept in sync with the build @@ -382,7 +382,12 @@ openpgp-certificate-format/raw openpgp-certificate-format/base64)) -(load-extension "libguile-gnutls-v-2" "scm_init_gnutls") +(define %libdir + (or (getenv "GNUTLS_GUILE_EXTENSION_DIR") + "@guileextensiondir@")) + +(load-extension (string-append %libdir "/libguile-gnutls-v-2") + "scm_init_gnutls") ;; Renaming. (define protocol/ssl-3 protocol/ssl3) diff --git a/guile/pre-inst-guile.in b/guile/pre-inst-guile.in index cd7264604b..6a7cc6aee0 100644 --- a/guile/pre-inst-guile.in +++ b/guile/pre-inst-guile.in @@ -23,6 +23,9 @@ GUILE_LOAD_PATH="@abs_top_srcdir@/guile/modules:$GUILE_LOAD_PATH" export GUILE_LOAD_PATH +GNUTLS_GUILE_EXTENSION_DIR="@abs_top_srcdir@/guile/src" +export GNUTLS_GUILE_EXTENSION_DIR + exec @abs_top_builddir@/libtool --mode=execute \ -dlopen "@abs_top_builddir@/guile/src/libguile-gnutls-v-2.la" \ @GUILE@ "$@" diff --git a/guile/src/Makefile.am b/guile/src/Makefile.am index 3bbf808dc8..e3b915ada2 100644 --- a/guile/src/Makefile.am +++ b/guile/src/Makefile.am @@ -31,7 +31,7 @@ BUILT_SOURCES = enum-map.i.c smob-types.i.c enums.h smobs.h \ CLEANFILES = $(BUILT_SOURCES) -lib_LTLIBRARIES = libguile-gnutls-v-2.la +guileextension_LTLIBRARIES = libguile-gnutls-v-2.la # Linking against GnuTLS. GNUTLS_CORE_LIBS = $(top_builddir)/lib/libgnutls.la |