blob: bec9bf0d1b6616c80216a04c3ef38c38761c8994 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From 7de2bd7e769f10521e3d0c2cb42c6f6b9b505dd0 Mon Sep 17 00:00:00 2001
2From: Xin Long <lucien.xin@gmail.com>
3Date: Thu, 16 Aug 2018 14:12:30 +0800
4Subject: [PATCH] configure.ac: add CURRENT REVISION and AGE for libsctp and
5 libwithsctp
6
7Add CURRENT REVISION and AGE for libsctp and libwithsctp in
8configure.ac to update these 2 library version information.
9
10Compatible with before, they will start from 1:18:0. But each
11will get updated according to their definitions in the future.
12
13Signed-off-by: Xin Long <lucien.xin@gmail.com>
14Acked-by: Neil Horman <nhorman@tuxdriver.com>
15Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
16---
17 configure.ac | 7 +++++++
18 src/lib/Makefile.am | 7 +++++--
19 src/withsctp/Makefile.am | 3 ++-
20 3 files changed, 14 insertions(+), 3 deletions(-)
21
22diff --git a/configure.ac b/configure.ac
23index 275ef4e..2ae36ec 100644
24--- a/configure.ac
25+++ b/configure.ac
26@@ -14,6 +14,13 @@ dnl reduce clutter in the root; if we put it below AM_INIT_AUTOMAKE,
27 dnl configure will fail ...)
28
29 AC_INIT([lksctp-tools], [1.0.18], [], [], [http://www.lksctp.org/])
30+AC_SUBST(LIBSCTP_CURRENT, 1)
31+AC_SUBST(LIBSCTP_REVISION, 18)
32+AC_SUBST(LIBSCTP_AGE, 0)
33+AC_SUBST(LIBWITHSCTP_CURRENT, 1)
34+AC_SUBST(LIBWITHSCTP_REVISION, 18)
35+AC_SUBST(LIBWITHSCTP_AGE, 0)
36+
37 AC_CONFIG_AUX_DIR(bin)
38 AC_CONFIG_SRCDIR([src/apps/sctp_darn.c])
39 AC_CONFIG_HEADERS([config.h])
40diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
41index 6100c56..1d62175 100644
42--- a/src/lib/Makefile.am
43+++ b/src/lib/Makefile.am
44@@ -8,5 +8,8 @@ AM_CPPFLAGS = -I$(top_srcdir)/src/include
45
46 lib_LTLIBRARIES = libsctp.la
47
48-libsctp_la_SOURCES = bindx.c connectx.c peeloff.c opt_info.c addrs.c sendmsg.c recvmsg.c Versions.map
49-libsctp_la_LDFLAGS = -version-info 1:17:0 -Wl,--version-script=$(srcdir)/Versions.map
50+libsctp_la_SOURCES = bindx.c connectx.c peeloff.c opt_info.c \
51+ addrs.c sendmsg.c recvmsg.c Versions.map
52+libsctp_la_LDFLAGS = -version-info \
53+ @LIBSCTP_CURRENT@:@LIBSCTP_REVISION@:@LIBSCTP_AGE@ \
54+ -Wl,--version-script=$(srcdir)/Versions.map
55diff --git a/src/withsctp/Makefile.am b/src/withsctp/Makefile.am
56index 70b1cca..1f6ca37 100644
57--- a/src/withsctp/Makefile.am
58+++ b/src/withsctp/Makefile.am
59@@ -14,7 +14,8 @@ AM_CPPFLAGS=-I$(top_srcdir)/src/include
60 pkglib_LTLIBRARIES = libwithsctp.la
61 libwithsctp_la_SOURCES = sctp_load_libs.c sctp_socket.c sctp_bind.c \
62 sctp_sockopt.c sctp_socket.h
63-libwithsctp_la_LDFLAGS = -version-info 1:17:0 -ldl
64+libwithsctp_la_LDFLAGS = -version-info \
65+ @LIBWITHSCTP_CURRENT@:@LIBWITHSCTP_REVISION@:@LIBWITHSCTP_AGE@ -ldl
66
67 pkgdoc_DATA = sctp_load_libs.c sctp_socket.c sctp_bind.c \
68 sctp_sockopt.c sctp_socket.h checksctp.c
69--
702.7.4
71