Add library versioning according to

https://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html#Libtool-versioning
Add package versioning with m4 macros
This commit is contained in:
Holger Vogt 2021-07-24 10:29:06 +02:00
parent 6aac403ab0
commit 4258fe94b5
2 changed files with 18 additions and 10 deletions

View File

@ -11,20 +11,28 @@
# Initialization
# ---------------
# Ensure a recent version of Autoconf is in use
# Older versions may not work with this script and this will report the
# problem to the user.
AC_PREREQ([2.59])
m4_define([ngspice_major_version], [35])
m4_define([ngspice_minor_version], [0])
m4_define([ngspice_version],
[ngspice_major_version])
# Initialization of configure
AC_INIT([ngspice], [35], [http://ngspice.sourceforge.net/bugrep.html])
AC_INIT([ngspice], [ngspice_version], [http://ngspice.sourceforge.net/bugrep.html])
# Revision stamp the generated ./configure script
AC_REVISION([$Revision: ngspice_version$])
# Libtool shared ngspice versioning info
AC_SUBST([NG_SO_VERSION], [0:1:0])
# Unique file in the source directory
AC_CONFIG_SRCDIR([src/ngspice.c])
# Ensure a recent version of Autoconf is in use
# Older versions may not work with this script and this will report the
# problem to the user. (2.52 is a guess and might need some adjustment)
AC_PREREQ([2.59])
# Revision stamp the generated ./configure script
AC_REVISION([$Revision$])
# Create a configuration header
AC_CONFIG_HEADER([src/include/ngspice/config.h])

View File

@ -594,7 +594,7 @@ endif
## if !SHWIN
## if !SHCYG
## libngspice_la_LDFLAGS += -version-info 0:@VERSION@:0
libngspice_la_LDFLAGS += -version-info $(NG_SO_VERSION)
## endif
## endif