-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce symbol to get version of library #914
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
AC_PREREQ([2.60]) | ||
AC_INIT([libsecp256k1],[0.1]) | ||
AC_PREREQ([2.69]) | ||
|
||
define(_LIBSECP256K1_VERSION_MAJOR, 0) | ||
define(_LIBSECP256K1_VERSION_MINOR, 8) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be 99 according to the preliminary plan (#856). I didn't have a particular reason for this besides matching Bitcoin Core's approach. But if I understand this PR correctly , There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah - I picked 0.8 to provide additional headroom for breaking API changes before stabilization. 0.8 could be cut as a branch now-ish 0.9 would represent a nearly complete API and allow for stabilization from 0.9 -> 0.9.9 and 1.0 would reflect final API / ABI |
||
define(_LIBSECP256K1_VERSION_BUILD, 0) | ||
define(_LIBSECP256K1_VERSION_RC, 0) | ||
define(_LIBSECP256K1_VERSION_IS_RELEASE, false) | ||
define(_LIBSECP256K1_VERSION, m4_join([.], _LIBSECP256K1_VERSION_MAJOR, _LIBSECP256K1_VERSION_MINOR, _LIBSECP256K1_VERSION_BUILD)m4_if(_LIBSECP256K1_VERSION_RC, [0], [], [rc]_LIBSECP256K1_VERSION_RC)) | ||
|
||
AC_INIT([libsecp256k1],_LIBSECP256K1_VERSION) | ||
AC_CONFIG_AUX_DIR([build-aux]) | ||
AC_CONFIG_MACRO_DIR([build-aux/m4]) | ||
AC_CANONICAL_HOST | ||
|
@@ -493,6 +501,18 @@ AM_CONDITIONAL([ENABLE_MODULE_SCHNORRSIG], [test x"$enable_module_schnorrsig" = | |
AM_CONDITIONAL([USE_EXTERNAL_ASM], [test x"$use_external_asm" = x"yes"]) | ||
AM_CONDITIONAL([USE_ASM_ARM], [test x"$set_asm" = x"arm"]) | ||
|
||
AC_DEFINE(LIBSECP256K1_VERSION_MAJOR, _LIBSECP256K1_VERSION_MAJOR, [Major version]) | ||
AC_DEFINE(LIBSECP256K1_VERSION_MINOR, _LIBSECP256K1_VERSION_MINOR, [Minor version]) | ||
AC_DEFINE(LIBSECP256K1_VERSION_BUILD, _LIBSECP256K1_VERSION_BUILD, [Version Build]) | ||
AC_DEFINE(LIBSECP256K1_VERSION_IS_RELEASE, _LIBSECP256K1_VERSION_IS_RELEASE, [Version is release]) | ||
AC_DEFINE(LIBSECP256K1_VERSION, _LIBSECP256K1_VERSION, [Version string]) | ||
|
||
AC_SUBST(LIBSECP256K1_VERSION_MAJOR, _LIBSECP256K1_VERSION_MAJOR) | ||
AC_SUBST(LIBSECP256K1_VERSION_MINOR, _LIBSECP256K1_VERSION_MINOR) | ||
AC_SUBST(LIBSECP256K1_VERSION_BUILD, _LIBSECP256K1_VERSION_BUILD) | ||
AC_SUBST(LIBSECP256K1_VERSION_IS_RELEASE, _LIBSECP256K1_VERSION_IS_RELEASE) | ||
AC_SUBST(LIBSECP256K1_VERSION, _LIBSECP256K1_VERSION) | ||
|
||
# Make sure nothing new is exported so that we don't break the cache. | ||
PKGCONFIG_PATH_TEMP="$PKG_CONFIG_PATH" | ||
unset PKG_CONFIG_PATH | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was to do what bitcoin core was doing for version and release management, I think I can improve it though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we shouldn't increase it to 2.69 without a good reason. I'm not sure if it really works with 2.60 but it's not a disaster if it fails.