[libdvdcss-devel] build: set the libtool version info in configure.ac

Diego Elio Pettenò git at videolan.org
Tue Feb 26 14:37:17 CET 2013


libdvdcss | branch: buildfixes | Diego Elio Pettenò <flameeyes at flameeyes.eu> | Mon Feb 18 09:43:21 2013 -0800| [e89fb58a2d11b45de3d2d123613111c4de58ef3e] | committer: Diego Elio Pettenò

build: set the libtool version info in configure.ac

This follows the same pattern used for libdvdread/libdvdnav and xine.

> http://git.videolan.org/gitweb.cgi/libdvdcss.git/?a=commit;h=e89fb58a2d11b45de3d2d123613111c4de58ef3e
---

 Makefile.am  |    2 +-
 configure.ac |   35 +++++++++++++++++++++++++++++++++--
 2 files changed, 34 insertions(+), 3 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 06ceb7f..8ff1727 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -30,7 +30,7 @@ libdvdcss_la_SOURCES = \
 	src/error.c \
 	src/common.h
 
-libdvdcss_la_LDFLAGS = -version-info 3:0:1 $(DVDCSS_LDFLAGS)
+libdvdcss_la_LDFLAGS = -version-info $(DVDCSS_LTVERSION) $(DVDCSS_LDFLAGS)
 libdvdcss_la_LIBADD =
 
 if !SYS_MSVC
diff --git a/configure.ac b/configure.ac
index 4b9349c..5125197 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,14 +9,45 @@ AM_MAINTAINER_MODE([enable])
 dnl Enable silent rules only when available (automake 1.11 or later).
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
+LT_INIT([win32-dll])
+
 AC_CONFIG_HEADER(config.h)
 AC_CONFIG_MACRO_DIR([m4])
 
+dnl The libtool version numbers (DVDCSS_LT_*); Don't even think about faking this!
+dnl
+dnl immediately before every release do:
+dnl ===================================
+dnl if (the interface is totally unchanged from previous release)
+dnl    DVDCSS_LT_REVISION ++;
+dnl else { /* interfaces have been added, removed or changed */
+dnl    DVDCSS_LT_REVISION = 0;
+dnl    DVDCSS_LT_CURRENT ++;
+dnl    if (any interfaces have been _added_ since last release)
+dnl       AGE ++;
+dnl    if (any interfaces have been _removed_ or _incompatibly changed_)
+dnl       AGE = 0;
+dnl }
+dnl
+dnl If you want to know more about what you are doing, here are some details:
+dnl  * DVDCSS_LT_CURRENT is the current API version
+dnl  * DVDCSS_LT_REVISION is an internal revision number which is increased when the API
+dnl    itself did not change
+dnl  * DVDCSS_LT_AGE is the number of previous API versions still supported by this library
+dnl  * libtool has its own numbering scheme, because local library numbering schemes
+dnl    are platform dependent
+dnl  * in Linux, the library will be named
+dnl    libname.so.(DVDCSS_LT_CURRENT - DVDCSS_LT_AGE).DVDCSS_LT_AGE.DVDCSS_LT_REVISION
+
+DVDCSS_LT_CURRENT=3
+DVDCSS_LT_AGE=0
+DVDCSS_LT_REVISION=1
+
+AC_SUBST([DVDCSS_LTVERSION], [$DVDCSS_LT_CURRENT:$DVDCSS_LT_AGE:$DVDCSS_LT_REVISION])
+
 AC_PROG_CC
 AC_HEADER_STDC
 
-LT_INIT([win32-dll])
-
 AC_C_CONST
 AC_C_INLINE
 AC_TYPE_SIZE_T



More information about the libdvdcss-devel mailing list