Index: ChangeLog
===================================================================
--- ChangeLog	(revision 1723)
+++ ChangeLog	(working copy)
@@ -1,3 +1,10 @@
+2007-09-17  Emmanuele Bassi  <ebassi@gnome.org>
+
+	* configure.ac:
+	* Makefile.am: Generate the libtool versioning information from
+	the GtkSourceView version. Also, remove AM_MAINTAINER_MODE which
+	doesn't do what the name implies.
+
 2007-09-15  Yevgen Muntyan  <muntyan@tamu.edu>
 
 	* gtksourceview/language-specs/sh.lang: case-esac context: match
Index: gtksourceview/Makefile.am
===================================================================
--- gtksourceview/Makefile.am	(revision 1723)
+++ gtksourceview/Makefile.am	(working copy)
@@ -79,7 +79,11 @@ nodist_libgtksourceview_2_0_la_SOURCES =
 	$(BUILT_SOURCES)
 
 libgtksourceview_2_0_la_LIBADD = $(DEP_LIBS) $(REGEX_LIBS) $(GNOMEPRINT_LIBS)
-libgtksourceview_2_0_la_LDFLAGS = -no-undefined -export-symbols-regex "^gtk_source_.*"
+libgtksourceview_2_0_la_LDFLAGS = \
+	-version-info $(GSV_LT_VERSION) \
+	-no-undefined \
+	-export-symbols-regex "^gtk_source_.*"
+
 libgtksourceview_2_0_includedir = $(includedir)/gtksourceview-2.0/gtksourceview
 
 libgtksourceview_2_0_include_HEADERS =		\
Index: configure.ac
===================================================================
--- configure.ac	(revision 1723)
+++ configure.ac	(working copy)
@@ -2,12 +2,25 @@ dnl Process this file with autoconf to p
 
 AC_PREREQ(2.59)
 
-m4_define(gtksourceview_major_version,  1)
-m4_define(gtksourceview_minor_version, 90)
-m4_define(gtksourceview_micro_version,  4)
-m4_define(gtksourceview_version, gtksourceview_major_version.gtksourceview_minor_version.gtksourceview_micro_version)
-
-AC_INIT(gtksourceview, gtksourceview_version, http://bugzilla.gnome.org/enter_bug.cgi?product=gtksourceview)
+m4_define([gtksourceview_major_version],  [1])
+m4_define([gtksourceview_minor_version], [90])
+m4_define([gtksourceview_micro_version],  [4])
+m4_define([gtksourceview_version],
+          [gtksourceview_major_version.gtksourceview_minor_version.gtksourceview_micro_version])
+
+dnl API version
+m4_define([gtksourceview_api_version],
+          [gtksourceview_major_version.gtksourceview_minor_version])
+
+dnl interface version; increase by one with each release; set to 0 if
+dnl the API changes (additions, removals, changes)
+m4_define([gtksourceview_interface_age], [0])
+m4_define([gtksourceview_binary_age],
+          [m4_eval(100 * gtksourceview_minor_version + gtksourceview_micro_version)])
+
+AC_INIT([gtksourceview],
+        [gtksourceview_version],
+        [http://bugzilla.gnome.org/enter_bug.cgi?product=gtksourceview])
 
 AC_CONFIG_SRCDIR([gtksourceview/gtksourcebuffer.h])
 AM_CONFIG_HEADER(config.h)
@@ -17,7 +30,8 @@ AM_INIT_AUTOMAKE([1.8 dist-bzip2 no-dist
 dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work
 AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS")
 
-AM_MAINTAINER_MODE
+dnl this doesn't do what it says it does
+dnl AM_MAINTAINER_MODE
 
 AC_ISC_POSIX
 AC_PROG_CC
@@ -28,6 +42,20 @@ IT_PROG_INTLTOOL([0.35.0])
 
 GTK_DOC_CHECK([1.0])
 
+dnl libtool versioning
+m4_define([lt_current],
+          [m4_eval(100 * gtksourceview_minor_version + gtksourceview_micro_version - gtksourceview_interface_age)])
+m4_define([lt_revision],
+          [gtksourceview_interface_age])
+m4_define([lt_age],
+          [m4_eval(gtksourceview_binary_age - gtksourceview_interface_age)])
+GSV_LT_CURRENT=lt_current
+GSV_LT_REV=lt_revision
+GSV_LT_AGE=lt_age
+GSV_LT_VERSION="$GSV_LT_CURRENT:$GSV_LT_REV:$GSV_LT_AGE"
+
+AC_SUBST(GSV_LT_VERSION)
+
 # Check for headers and functions
 AC_HEADER_STDC
 AC_CHECK_HEADERS([unistd.h])
