diff --git a/README.markdown b/README.markdown index e370ff91..bd532f21 100644 --- a/README.markdown +++ b/README.markdown @@ -61,11 +61,11 @@ as `crypto_sign_edwards25519sha512batch*`. ## Additional features The Sodium library provides some convenience functions in order to retrieve -the current version of the library: +the current version of the package and of the shared library: const char *sodium_version_string(void); - const int sodium_version_major(void); - const int sodium_version_minor(void); + const int sodium_library_version_major(void); + const int sodium_library_version_minor(void); Headers are installed in `${prefix}/include/sodium`. diff --git a/configure.ac b/configure.ac index c1770e8a..d1d47f8d 100644 --- a/configure.ac +++ b/configure.ac @@ -13,7 +13,10 @@ AC_SUBST(VERSION) ISODATE=`date +%Y-%m-%d` AC_SUBST(ISODATE) -SODIUM_LIBRARY_VERSION=3:1:0 +SODIUM_LIBRARY_VERSION_MAJOR=4 +SODIUM_LIBRARY_VERSION_MINOR=0 + +SODIUM_LIBRARY_VERSION=4:0:0 # | | | # +------+ | +---+ # | | | @@ -25,6 +28,8 @@ SODIUM_LIBRARY_VERSION=3:1:0 # | +- increment if source code has changed # | set to zero if current is incremented # +- increment if interfaces have been added, removed or changed +AC_SUBST(SODIUM_LIBRARY_VERSION_MAJOR) +AC_SUBST(SODIUM_LIBRARY_VERSION_MINOR) AC_SUBST(SODIUM_LIBRARY_VERSION) LX_CFLAGS=${CFLAGS-NONE} diff --git a/src/libsodium/include/sodium/version.h.in b/src/libsodium/include/sodium/version.h.in index ba8c73cb..b965fad9 100644 --- a/src/libsodium/include/sodium/version.h.in +++ b/src/libsodium/include/sodium/version.h.in @@ -4,16 +4,16 @@ #define SODIUM_VERSION_STRING "@VERSION@" -#define SODIUM_VERSION_MAJOR 0 -#define SODIUM_VERSION_MINOR 4 +#define SODIUM_LIBRARY_VERSION_MAJOR @SODIUM_LIBRARY_VERSION_MAJOR@ +#define SODIUM_LIBRARY_VERSION_MINOR @SODIUM_LIBRARY_VERSION_MINOR@ #ifdef __cplusplus extern "C" { #endif const char *sodium_version_string(void); -int sodium_version_major(void); -int sodium_version_minor(void); +int sodium_library_version_major(void); +int sodium_library_version_minor(void); #ifdef __cplusplus } diff --git a/src/libsodium/version.c b/src/libsodium/version.c index b0a2453d..324d8a3e 100644 --- a/src/libsodium/version.c +++ b/src/libsodium/version.c @@ -10,11 +10,11 @@ sodium_version_string(void) int sodium_version_major(void) { - return SODIUM_VERSION_MAJOR; + return SODIUM_LIBRARY_VERSION_MAJOR; } int sodium_version_minor(void) { - return SODIUM_VERSION_MINOR; + return SODIUM_LIBRARY_VERSION_MINOR; }