Skip to content

Commit e0dae05

Browse files
devin-ai-integration[bot]ColtonWilley
authored andcommitted
Fix version.h HEX_VERSION replacement to prevent changes after builds
Co-Authored-By: [email protected] <[email protected]>
1 parent e48872f commit e0dae05

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
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

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)