configure.ac, src/Makefile.am, add libtool versioning for shared library
This commit is contained in:
parent
ea3821b578
commit
264d487848
19
configure.ac
19
configure.ac
|
|
@ -14,6 +14,17 @@
|
|||
# Initialisation of configure
|
||||
AC_INIT([ngspice], [26], [http://ngspice.sourceforge.net/bugrep.html])
|
||||
|
||||
# libtool versioning for shared libraries current:revision:age
|
||||
# current The most recent interface number that this library implements.
|
||||
# revision The implementation number of the current interface.
|
||||
# age The difference between the newest and oldest interfaces that this library implements.
|
||||
# In other words, the library implements all the interface numbers in the
|
||||
# range from numbers (current - age) to current.
|
||||
# libtool in msys2 generates a single version number (current-age)
|
||||
# libtool in LINUX generates the numbers as: (current-age).age.revision
|
||||
# LIBRARY_VERSION may be overridden by external LIB_VERSION
|
||||
LIBRARY_VERSION="0:0:0"
|
||||
|
||||
# Unique file in the source directory
|
||||
AC_CONFIG_SRCDIR([src/ngspice.c])
|
||||
|
||||
|
|
@ -300,6 +311,12 @@ else
|
|||
dprefix=$prefix
|
||||
fi
|
||||
|
||||
# external LIB_VERSION ?
|
||||
ext_LIB_VERSION=${LIB_VERSION+yes}
|
||||
if test "x$ext_LIB_VERSION" != xyes; then
|
||||
LIB_VERSION=$LIBRARY_VERSION
|
||||
fi
|
||||
|
||||
##########################################################################
|
||||
#
|
||||
# ngspice as shared library (ngspice.so or ngspice.dll)
|
||||
|
|
@ -482,6 +499,7 @@ else
|
|||
TCL_PACKAGE_PATH=""
|
||||
TCL_LIB_SPEC=""
|
||||
AC_SUBST([STATIC], [-static])
|
||||
LIB_VERSION=""
|
||||
fi
|
||||
|
||||
|
||||
|
|
@ -494,6 +512,7 @@ AM_CONDITIONAL([TCLCYG], [test "x$has_tclcyg" = xtrue])
|
|||
|
||||
AC_SUBST([TCL_PACKAGE_PATH])
|
||||
AC_SUBST([TCL_LIB_SPEC])
|
||||
AC_SUBST([LIB_VERSION])
|
||||
##################################################################
|
||||
#
|
||||
#
|
||||
|
|
|
|||
|
|
@ -541,7 +541,7 @@ libngspice_la_LIBADD += \
|
|||
|
||||
libngspice_la_CFLAGS = -shared
|
||||
|
||||
libngspice_la_LDFLAGS = -shared
|
||||
libngspice_la_LDFLAGS = -shared -version-info @LIB_VERSION@
|
||||
|
||||
if SHWIN
|
||||
libngspice_la_LDFLAGS += -Wl,--output-def=ngspice.def -Wl,--out-implib=ngspice.dll.a
|
||||
|
|
|
|||
Loading…
Reference in New Issue