aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am13
-rw-r--r--xapian.i.in6
2 files changed, 10 insertions, 9 deletions
diff --git a/Makefile.am b/Makefile.am
index db36483..e88d63b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,6 @@
# guile-xapian --- Guile bindings for Xapian
# Copyright © 2020, 2021, 2022 Arun Isaac <arunisaac@systemreboot.net>
+# Copyright © 2022 Bob131 <bob@bob131.so>
#
# This file is part of guile-xapian.
#
@@ -37,17 +38,17 @@ SWIG_GEN_1 =
# Xapian wrapper
-lib_LTLIBRARIES = libguilexapian.la
+lib_LTLIBRARIES = libguilexapian-@GUILE_EFFECTIVE_VERSION@.la
BUILT_SOURCES = xapian_wrap.cc xapian/wrap.scm
-libguilexapian_la_SOURCES = xapian_wrap.cc
-libguilexapian_la_CXXFLAGS = $(GUILE_CFLAGS) $(XAPIAN_CFLAGS)
-libguilexapian_la_LDFLAGS = $(GUILE_LIBS) $(XAPIAN_LIBS)
+libguilexapian_@GUILE_EFFECTIVE_VERSION@_la_SOURCES = xapian_wrap.cc
+libguilexapian_@GUILE_EFFECTIVE_VERSION@_la_CXXFLAGS = $(GUILE_CFLAGS) $(XAPIAN_CFLAGS)
+libguilexapian_@GUILE_EFFECTIVE_VERSION@_la_LDFLAGS = $(GUILE_LIBS) $(XAPIAN_LIBS)
CLEANFILES = xapian.i xapian_wrap.cc xapian/wrap.scm
xapian.i: xapian.i.in Makefile
- sed 's|@libdir[@]|$(libdir)|g' $< > $@
+ sed -e 's|@libdir[@]|$(libdir)|g' -e 's|@GUILE_EFFECTIVE_VERSION[@]|$(GUILE_EFFECTIVE_VERSION)|g' $< > $@
xapian_wrap.cc xapian/wrap.scm &: xapian.i xapian-head.i xapian-headers.i
$(MKDIR_P) xapian
@@ -72,7 +73,7 @@ GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat
# Building xapian/xapian.scm additionally requires the libguilexapian
# shared library.
-xapian/xapian.go: xapian/xapian.scm libguilexapian.la
+xapian/xapian.go: xapian/xapian.scm libguilexapian-@GUILE_EFFECTIVE_VERSION@.la
# Tests
diff --git a/xapian.i.in b/xapian.i.in
index 4f36f8e..f1ffe07 100644
--- a/xapian.i.in
+++ b/xapian.i.in
@@ -1,6 +1,6 @@
/* guile-xapian --- Guile bindings for Xapian
* Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net>
- * Copyright © 2021 Bob131 <bob@bob131.so>
+ * Copyright © 2021, 2022 Bob131 <bob@bob131.so>
*
* This file is part of guile-xapian.
*
@@ -30,9 +30,9 @@
;; so that guile-xapian finds libguilexapian both before and after installation.
(catch #t
(lambda ()
- (load-extension "@libdir@/libguilexapian" "SWIG_init"))
+ (load-extension "@libdir@/libguilexapian-@GUILE_EFFECTIVE_VERSION@" "SWIG_init"))
(lambda _
- (load-extension "libguilexapian" "SWIG_init")))
+ (load-extension "libguilexapian-@GUILE_EFFECTIVE_VERSION@" "SWIG_init")))
%}
%{