Skip to content

Commit 78f4c28

Browse files
committed
build: set library version to 0.0.0 explicitly
1 parent 94592cf commit 78f4c28

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

Makefile.am

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ endif
7676
libsecp256k1_la_SOURCES = src/secp256k1.c
7777
libsecp256k1_la_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src $(SECP_INCLUDES)
7878
libsecp256k1_la_LIBADD = $(SECP_LIBS) $(COMMON_LIB)
79+
libsecp256k1_la_LDFLAGS = -version-info $(LIB_VERSION_CURRENT):$(LIB_VERSION_REVISION):$(LIB_VERSION_AGE)
7980

8081
if VALGRIND_ENABLED
8182
libsecp256k1_la_CPPFLAGS += -DVALGRIND

configure.ac

+12
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ define(_PKG_VERSION_MINOR, 1)
77
define(_PKG_VERSION_BUILD, 0)
88
define(_PKG_VERSION_IS_RELEASE, false)
99

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

1221
AC_CONFIG_AUX_DIR([build-aux])
@@ -656,6 +665,9 @@ AM_CONDITIONAL([USE_EXTERNAL_ASM], [test x"$use_external_asm" = x"yes"])
656665
AM_CONDITIONAL([USE_ASM_ARM], [test x"$set_asm" = x"arm"])
657666
AM_CONDITIONAL([ENABLE_MODULE_SURJECTIONPROOF], [test x"$enable_module_surjectionproof" = x"yes"])
658667
AM_CONDITIONAL([USE_REDUCED_SURJECTION_PROOF_SIZE], [test x"$use_reduced_surjection_proof_size" = x"yes"])
668+
AC_SUBST(LIB_VERSION_CURRENT, _LIB_VERSION_CURRENT)
669+
AC_SUBST(LIB_VERSION_REVISION, _LIB_VERSION_REVISION)
670+
AC_SUBST(LIB_VERSION_AGE, _LIB_VERSION_AGE)
659671

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

0 commit comments

Comments
 (0)