Skip to content

Commit 2b57ff2

Browse files
authored
Merge pull request #114 from wolfSSL/devin/1745348721-version-header-fix-v2
Fix version.h changes after builds
2 parents e48872f + c53faa9 commit 2b57ff2

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

configure.ac

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ AC_CONFIG_MACRO_DIR([m4])
1313

1414
dnl m4_include([m4/ax_check_openssl.m4])
1515
dnl m4_include([m4/ax_check_wolfssl.m4])
16+
m4_include([m4/hexversion.m4])
1617

1718
AM_INIT_AUTOMAKE([1.11 -Wall -Werror -Wno-portability foreign tar-ustar subdir-objects no-define color-tests])
1819
LT_INIT([disable-static pic-only])
@@ -130,6 +131,7 @@ CFLAGS="$CFLAGS $USER_C_EXTRA_FLAGS"
130131
AC_SUBST([AM_CPPFLAGS])
131132
AC_SUBST([AM_CFLAGS])
132133
AC_SUBST([AM_LDFLAGS])
134+
CREATE_HEX_VERSION
133135

134136
AC_CONFIG_FILES([Makefile
135137
include/wolfprovider/version.h

include/wolfprovider/version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
extern "C" {
2828
#endif
2929

30-
#define LIBWOLFPROV_VERSION_STRING "1.1.0-RC"
31-
#define LIBWOLFPROV_VERSION_HEX @HEX_VERSION@
30+
#define LIBWOLFPROV_VERSION_STRING "1.0.2"
31+
#define LIBWOLFPROV_VERSION_HEX 0x01000002
3232

3333
#ifdef __cplusplus
3434
}

m4/hexversion.m4

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
AC_DEFUN([CREATE_HEX_VERSION],[
2+
3+
HEX_VERSION=`echo $VERSION | sed 's|[\-a-z0-9]*$||' | \
4+
awk -F. '{printf "0x%0.2d%0.3d%0.3d", $[]1, $[]2, $[]3}'`
5+
AC_SUBST([HEX_VERSION])
6+
])

0 commit comments

Comments
 (0)