From 5cb8e484010e30cf02ba17cc560654478f469ce7 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Mon, 23 Mar 2009 08:53:15 +0100 Subject: [PATCH] build system: Define ABI and API versions in the configure script. --- configure.ac | 16 ++++++++++++++++ src/Makefile.am | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 0c45bc4..5b72c13 100644 --- a/configure.ac +++ b/configure.ac @@ -6,6 +6,22 @@ AC_LANG(C) AC_PREFIX_DEFAULT("/opt/oping") +# API version +LIBOPING_MAJOR=`echo $PACKAGE_VERSION | cut -d'.' -f1` +LIBOPING_MINOR=`echo $PACKAGE_VERSION | cut -d'.' -f2` +LIBOPING_PATCH=`echo $PACKAGE_VERSION | cut -d'.' -f3` +AC_SUBST(LIBOPING_MAJOR) +AC_SUBST(LIBOPING_MINOR) +AC_SUBST(LIBOPING_PATCH) + +# ABI version +LIBOPING_CURRENT=1 +LIBOPING_REVISION=0 +LIBOPING_AGE=1 +AC_SUBST(LIBOPING_CURRENT) +AC_SUBST(LIBOPING_REVISION) +AC_SUBST(LIBOPING_AGE) + # # Check for programs/utilities # diff --git a/src/Makefile.am b/src/Makefile.am index 4dc11f9..f773f87 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -21,7 +21,7 @@ lib_LTLIBRARIES = liboping.la # set age to 0. # # -liboping_la_LDFLAGS = -version-info 1:0:1 +liboping_la_LDFLAGS = -version-info @LIBOPING_CURRENT@:@LIBOPING_REVISION@:@LIBOPING_AGE@ if BUILD_WITH_LIBSOCKET liboping_la_LDFLAGS += -lsocket endif -- 2.30.2