From fffc0da1777dc50ed96ccc24eb04ab6920af4fbc Mon Sep 17 00:00:00 2001 From: oetiker Date: Mon, 12 May 2008 16:08:40 +0000 Subject: [PATCH] improved handling of library versioning git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1342 a5681a0c-68f1-0310-ab6d-d61299d08faa --- configure.ac | 23 +++++++++++++++++++---- src/Makefile.am | 39 ++++----------------------------------- 2 files changed, 23 insertions(+), 39 deletions(-) diff --git a/configure.ac b/configure.ac index a0bd955..65256ca 100644 --- a/configure.ac +++ b/configure.ac @@ -6,16 +6,31 @@ dnl dnl Inspiration from http://autoconf-archive.cryp.to dnl tell automake the this script is for rrdtool + dnl the official version number is dnl a.b.c -AC_INIT([rrdtool],[1.2.99908020600]) +AC_INIT([rrdtool],[1.3rc1]) + dnl for testing a numberical version number comes handy dnl the released version are dnl a.bccc dnl the devel versions will be something like dnl a.b999yymmddhh -NUMVERS=1.299908020600 +NUMVERS=1.299908051200 AC_SUBST(NUMVERS) + +dnl for the linker to understand which version the library is compatible with +dnl we must keep a separate library version cout of the format c:r:a if any +dnl functionality is changed do c++ prior to release +dnl if only implementation changed but all interfaces are kept, do r++ +dnl when only functionality was added, do a++ if any functionality was +dnl removed to a=0. +dnl +dnl see http://sourceware.org/autobook/autobook/autobook_91.html +dnl +LIBVERS=3:0:1 +AC_SUBST(LIBVERS) + AC_CANONICAL_TARGET AM_INIT_AUTOMAKE AC_CONFIG_HEADERS([rrd_config.h]) @@ -139,7 +154,7 @@ AH_BOTTOM([ #ifdef HAVE_SYS_RESOURCE_H # include #if (defined(__svr4__) && defined(__sun__)) -/* Solaris headers (pre 2.6) don't have a getrusage prototype. +/* Solaris headers (pre 2.6) do not have a getrusage prototype. Use this instead. */ extern int getrusage(int, struct rusage *); #endif /* __svr4__ && __sun__ */ @@ -781,7 +796,7 @@ if test "$enable_tcl" = "yes"; then done if test "$enable_tcl" = "no"; then - AC_MSG_WARN([tclConfig.sh not found - Tcl interface won't be built]) + AC_MSG_WARN([tclConfig.sh not found - Tcl interface will not be built]) else . $tcl_config TCL_PACKAGE_DIR="$TCL_PACKAGE_PATH/tclrrd$VERSION" diff --git a/src/Makefile.am b/src/Makefile.am index 088de0d..785224e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -70,44 +70,13 @@ librrdupd_la_LIBADD = $(CORE_LIBS) librrd_la_SOURCES = $(RRD_C_FILES) librrd_la_LIBADD = librrdupd.la $(ALL_LIBS) -# This flag accepts an argument of the form current[:revision[:age]]. So, -# passing -version-info 3:12:1 sets current to 3, revision to 12, and age to 1. -# -# If either revision or age are omitted, they default to 0. Also note that -# age must be less than or equal to the current interface number. -# -# Here are a set of rules to help you update your library version information: -# -# 1. Start with version information of 0:0:0 for each libtool library. -# -# 2. Update the version information only immediately before a public -# release of your software. More frequent updates are unnecessary, and -# only guarantee that the current interface number gets larger faster. -# -# 3. If the library source code has changed at all since the last update, -# then increment revision (c:r:a becomes c:r+1:a). -# -# 4. If any interfaces have been added, removed, or changed since the last -# update, increment current, and set revision to 0. -# -# 5. If any interfaces have been added since the last public release, then -# increment age. -# -# 6. If any interfaces have been removed since the last public release, -# then set age to 0. -# -# Never try to set the interface numbers so that they correspond to the -# release number of your package. This is an abuse that only fosters -# misunderstanding of the purpose of library versions. Instead, use the -# -release flag (see Release numbers), but be warned that every release of -# your package will not be binary compatible with any other release. -# -# see http://www.gnu.org/software/libtool/manual.html#SEC32 for explanation -librrd_la_LDFLAGS = -version-info 2:10:0 +# see http://sourceware.org/autobook/autobook/autobook_91.html + +librrd_la_LDFLAGS = -version-info @LIBVERS@ librrd_th_la_SOURCES = $(UPD_C_FILES) $(RRD_C_FILES) rrd_thread_safe.c librrd_th_la_CFLAGS = $(MULTITHREAD_CFLAGS) -librrd_th_la_LDFLAGS = $(MULTITHREAD_LDFLAGS) -version-info 2:10:0 +librrd_th_la_LDFLAGS = $(MULTITHREAD_LDFLAGS) -version-info @LIBVERS@ librrd_th_la_LIBADD = $(ALL_LIBS) include_HEADERS = rrd.h -- 2.30.2