]> www.fi.muni.cz Git - evince.git/commitdiff
Bug 568229 – library needs libtool versioning
authorChristian Persch <chpe@src.gnome.org>
Wed, 21 Jan 2009 16:58:27 +0000 (16:58 +0000)
committerChristian Persch <chpe@src.gnome.org>
Wed, 21 Jan 2009 16:58:27 +0000 (16:58 +0000)
svn path=/trunk/; revision=3373

ChangeLog
configure.ac
libdocument/Makefile.am
libview/Makefile.am

index f36b2d0d6f867b6a425539bc046214360ad38841..c3412bb3c6612f1f934b6ec1108527e368ae4de0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-01-21  Christian Persch  <chpe@gnome.org>
+
+       * configure.ac:
+       * libdocument/Makefile.am:
+       * libview/Makefile.am: Add libtool versioning to libevbackend and
+       libevview. Bug #568229.
+
 2009-01-21  Christian Persch  <chpe@gnome.org>
 
        * Makefile.am:
index f3b9c7e884381751ee660a74ad33d08da0b51042..a76cb0a8e035ae9173c02b10992f043e301f9bdd 100644 (file)
@@ -1,4 +1,6 @@
-dnl Process this file with autoconf to produce a configure script.
+# *****************************************************************************
+# Versioning
+# *****************************************************************************
 
 m4_define([ev_major_version],[2])
 m4_define([ev_minor_version],[25])
@@ -9,6 +11,31 @@ m4_define([ev_version],[ev_major_version.ev_minor_version.ev_micro_version()ev_e
 # The evince API version
 m4_define([ev_api_version], [2.25])
 
+# Libtool versioning. The backend and view libraries have separate versions.
+# Before making a release, the libtool version should be modified.
+# The string is of the form C:R:A.
+# - If interfaces have been changed or added, but binary compatibility has
+#   been preserved, change to C+1:0:A+1
+# - If binary compatibility has been broken (eg removed or changed interfaces)
+#   change to C+1:0:0
+# - If the interface is the same as the previous version, change to C:R+1:A
+
+# Libtool version of the backend library
+m4_define([ev_backend_lt_current],[1])
+m4_define([ev_backend_lt_revision],[0])
+m4_define([ev_backend_lt_age],[0])
+m4_define([ev_backend_lt_version_info],[ev_backend_lt_current:ev_backend_lt_revision:ev_backend_lt_age])
+m4_define([ev_backend_lt_current_minus_age],[m4_eval(ev_backend_lt_current - ev_backend_lt_age)])
+
+# Libtool version of the view library
+m4_define([ev_view_lt_current],[1])
+m4_define([ev_view_lt_revision],[0])
+m4_define([ev_view_lt_age],[0])
+m4_define([ev_view_lt_version_info],[ev_view_lt_current:ev_view_lt_revision:ev_view_lt_age])
+m4_define([ev_view_lt_current_minus_age],[m4_eval(ev_view_lt_current - ev_view_lt_age)])
+
+# *****************************************************************************
+
 AC_PREREQ([2.57])
 AC_INIT([Evince],[ev_version],[http://bugzilla.gnome.org/enter_bug.cgi?product=evince],[evince])
 AM_INIT_AUTOMAKE([1.9 dist-bzip2 no-dist-gzip])
@@ -429,6 +456,11 @@ AC_SUBST([EV_MICRO_VERSION],[ev_micro_version])
 
 AC_SUBST([EV_API_VERSION],[ev_api_version])
 
+AC_SUBST([EV_BACKEND_LT_VERSION_INFO],[ev_backend_lt_version_info])
+AC_SUBST([EV_BACKEND_LT_CURRENT_MINUS_AGE],[ev_backend_lt_current_minus_age])
+AC_SUBST([EV_VIEW_LT_VERSION_INFO],[ev_view_lt_version_info])
+AC_SUBST([EV_VIEW_LT_CURRENT_MINUS_AGE],[ev_view_lt_current_minus_age])
+
 # *****************************************************************************
 
 AC_CONFIG_FILES([
index c08f5a8c609bd4256e918c50ffb1f483de184a5b..a44ed6405310151a4d19aa0d519a57ebf4feff50 100644 (file)
@@ -1,4 +1,5 @@
 INCLUDES=                                              \
+       -DG_LOG_DOMAIN=\"EvDocument\"                   \
        -DEVINCE_UIDIR=\"$(pkgdatadir)\"                \
        -DGNOMELOCALEDIR=\"$(datadir)/locale\"          \
        -DEV_BACKENDSDIR=\"$(libdir)/evince/backends\"  \
@@ -8,7 +9,11 @@ INCLUDES=                                              \
 
 lib_LTLIBRARIES = libevbackend.la
 
-libevbackend_la_LDFLAGS = -export-dynamic
+libevbackend_la_LDFLAGS = \
+       -version-info $(EV_BACKEND_LT_VERSION_INFO)     \
+       -export-symbols-regex "^ev_*"   \
+       $(AM_LDFLAGS)
+
 libevbackend_la_LIBADD = $(LIBDOCUMENT_LIBS)
 
 NOINST_H_FILES =                               \
index 608fa858f09ae237ccf4186bfabe235890a9a499..eede6da7729ca7c42bfac442da7ceeecd3965e8c 100644 (file)
@@ -1,4 +1,5 @@
 INCLUDES=                                      \
+       -DG_LOG_DOMAIN=\"EvView\"               \
        -DGNOMELOCALEDIR=\"$(datadir)/locale\"  \
        -I$(top_srcdir)/libdocument             \
        $(LIBVIEW_CFLAGS)                       \
@@ -7,7 +8,11 @@ INCLUDES=                                      \
 
 lib_LTLIBRARIES = libevview.la
 
-libevview_la_LDFLAGS = -export-dynamic
+libevview_la_LDFLAGS = \
+       -version-info $(EV_VIEW_LT_VERSION_INFO)        \
+       -export-symbols-regex "^ev_*"   \
+       $(AM_LDFLAGS)
+
 libevview_la_LIBADD = $(LIBVIEW_LIBS)
 
 NOINST_H_FILES =                       \
@@ -25,7 +30,7 @@ INST_H_FILES =                                \
        ev-view.h                       \
        ev-view-type-builtins.h
 
-headerdir = $(prefix)/include/evince/@EV_API_VERSION@/ev-view
+headerdir = $(includedir)/evince/$(EV_API_VERSION)/ev-view
 header_DATA = $(INST_H_FILES)
 
 libevview_la_SOURCES =                         \
@@ -51,11 +56,11 @@ BUILT_SOURCES =                     \
 CLEANFILES = $(BUILT_SOURCES) stamp-ev-view-type-builtins.h
 
 ev-view-marshal.h: $(srcdir)/ev-view-marshal.list
-       $(GLIB_GENMARSHAL) --prefix=ev_view_marshal $(srcdir)/ev-view-marshal.list --header > $@
+       $(GLIB_GENMARSHAL) --prefix=ev_view_marshal $(srcdir)/ev-view-marshal.list --header --internal > $@
 
 ev-view-marshal.c: $(srcdir)/ev-view-marshal.list
-       echo '#include "ev-view-marshal.h"' > ev-view-marshal.c
-       $(GLIB_GENMARSHAL) --prefix=ev_view_marshal $(srcdir)/ev-view-marshal.list --body >> $@
+       echo '#include <config.h>' > ev-view-marshal.c
+       $(GLIB_GENMARSHAL) --prefix=ev_view_marshal $(srcdir)/ev-view-marshal.list --header --internal --body >> $@
 
 ev-view-type-builtins.h: stamp-ev-view-type-builtins.h
        @true