evince r3373 - in trunk: . libdocument libview



Author: chpe
Date: Wed Jan 21 16:58:27 2009
New Revision: 3373
URL: http://svn.gnome.org/viewvc/evince?rev=3373&view=rev

Log:
Bug 568229 â library needs libtool versioning

Modified:
   trunk/ChangeLog
   trunk/configure.ac
   trunk/libdocument/Makefile.am
   trunk/libview/Makefile.am

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Wed Jan 21 16:58:27 2009
@@ -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 @@
 # 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_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([

Modified: trunk/libdocument/Makefile.am
==============================================================================
--- trunk/libdocument/Makefile.am	(original)
+++ trunk/libdocument/Makefile.am	Wed Jan 21 16:58:27 2009
@@ -1,4 +1,5 @@
 INCLUDES=						\
+	-DG_LOG_DOMAIN=\"EvDocument\"			\
 	-DEVINCE_UIDIR=\"$(pkgdatadir)\"		\
 	-DGNOMELOCALEDIR=\"$(datadir)/locale\"		\
 	-DEV_BACKENDSDIR=\"$(libdir)/evince/backends\"	\
@@ -8,7 +9,11 @@
 
 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 =				\

Modified: trunk/libview/Makefile.am
==============================================================================
--- trunk/libview/Makefile.am	(original)
+++ trunk/libview/Makefile.am	Wed Jan 21 16:58:27 2009
@@ -1,4 +1,5 @@
 INCLUDES=					\
+	-DG_LOG_DOMAIN=\"EvView\"		\
 	-DGNOMELOCALEDIR=\"$(datadir)/locale\"	\
 	-I$(top_srcdir)/libdocument		\
 	$(LIBVIEW_CFLAGS)			\
@@ -7,7 +8,11 @@
 
 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 @@
 	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 @@
 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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]