Skip to content

Commit 43860ad

Browse files
committed
build: set library version to 0.0.0 explicitly
1 parent 2a71961 commit 43860ad

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ endif
7474
libsecp256k1_la_SOURCES = src/secp256k1.c
7575
libsecp256k1_la_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src $(SECP_INCLUDES)
7676
libsecp256k1_la_LIBADD = $(SECP_LIBS) $(COMMON_LIB)
77+
libsecp256k1_la_LDFLAGS = -version-info $(LIB_VERSION_CURRENT):$(LIB_VERSION_REVISION):$(LIB_VERSION_AGE)
7778

7879
if VALGRIND_ENABLED
7980
libsecp256k1_la_CPPFLAGS += -DVALGRIND

configure.ac

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ define(_PKG_VERSION_MINOR, 1)
88
define(_PKG_VERSION_BUILD, 0)
99
define(_PKG_VERSION_IS_RELEASE, false)
1010

11+
# The library version is based on libtool versioning of the ABI. The set of
12+
# rules for updating the version can be found here:
13+
# https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
14+
# All changes in experimental modules are treated as if they don't affect the
15+
# interface and therefore only increase the revision.
16+
define(_LIB_VERSION_CURRENT, 0)
17+
define(_LIB_VERSION_REVISION, 0)
18+
define(_LIB_VERSION_AGE, 0)
19+
1120
AC_INIT([libsecp256k1],m4_join([.], _PKG_VERSION_MAJOR, _PKG_VERSION_MINOR, _PKG_VERSION_BUILD)m4_if(_PKG_VERSION_IS_RELEASE, [true], [], [-pre]),[https://github.com/bitcoin-core/secp256k1/issues],[libsecp256k1],[https://github.com/bitcoin-core/secp256k1])
1221

1322
AC_CONFIG_AUX_DIR([build-aux])
@@ -478,6 +487,9 @@ AM_CONDITIONAL([ENABLE_MODULE_EXTRAKEYS], [test x"$enable_module_extrakeys" = x"
478487
AM_CONDITIONAL([ENABLE_MODULE_SCHNORRSIG], [test x"$enable_module_schnorrsig" = x"yes"])
479488
AM_CONDITIONAL([USE_EXTERNAL_ASM], [test x"$use_external_asm" = x"yes"])
480489
AM_CONDITIONAL([USE_ASM_ARM], [test x"$set_asm" = x"arm"])
490+
AC_SUBST(LIB_VERSION_CURRENT, _LIB_VERSION_CURRENT)
491+
AC_SUBST(LIB_VERSION_REVISION, _LIB_VERSION_REVISION)
492+
AC_SUBST(LIB_VERSION_AGE, _LIB_VERSION_AGE)
481493

482494
# Make sure nothing new is exported so that we don't break the cache.
483495
PKGCONFIG_PATH_TEMP="$PKG_CONFIG_PATH"

0 commit comments

Comments
 (0)