From 23975ca7672a62a797103b411b11f6126f7368a0 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Thu, 18 Mar 2021 17:41:51 -0400 Subject: [PATCH] configure: centralize version information Centralise version information at the beginning of configure.ac to improve readability. This is part of an effort to standardise our autotools setup across project to simplify maintenance. Change-Id: I394c706f71885dbc6ad22f6d315d48702825fd81 Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- configure.ac | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 1f499c7..5dc94f3 100644 --- a/configure.ac +++ b/configure.ac @@ -1,9 +1,31 @@ -AC_PREREQ(2.59) -AC_INIT([userspace-rcu],[0.12.0],[mathieu dot desnoyers at efficios dot com], [], [http://liburcu.org/]) - +dnl SPDX-License-Identifier: LGPL-2.1-only +dnl +dnl Copyright (C) 2021 EfficiOS, Inc. +dnl +dnl Process this file with autoconf to produce a configure script. + +# Project version information +m4_define([urcu_version_major], [0]) +m4_define([urcu_version_minor], [12]) +m4_define([urcu_version_patch], [0]) +m4_define([urcu_version_dev_stage], []) +m4_define([urcu_version], urcu_version_major[.]urcu_version_minor[.]urcu_version_patch[]urcu_version_dev_stage) + +# Library version information of "liburcu" # Following the numbering scheme proposed by libtool for the library version # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html -AC_SUBST([URCU_LIBRARY_VERSION], [7:0:1]) +m4_define([urcu_lib_version_current], [7]) +m4_define([urcu_lib_version_revision], [0]) +m4_define([urcu_lib_version_age], [1]) +m4_define([urcu_lib_version], urcu_lib_version_current[:]urcu_lib_version_revision[:]urcu_lib_version_age) + + +## ## +## Autoconf base setup ## +## ## + +AC_PREREQ(2.59) +AC_INIT([userspace-rcu],[urcu_version],[mathieu dot desnoyers at efficios dot com],[],[http://liburcu.org/]) AC_CONFIG_HEADERS([include/config.h include/urcu/config.h]) AC_CONFIG_AUX_DIR([config]) @@ -251,6 +273,13 @@ AC_CHECK_FUNCS([sched_setaffinity],[ ]) ]) +## ## +## Substitute variables for use in Makefile.am ## +## ## + +# Library versions for libtool +AC_SUBST([URCU_LIBRARY_VERSION], [urcu_lib_version]) + AM_CPPFLAGS="-include config.h" AC_SUBST(AM_CPPFLAGS) -- 2.34.1