1 # ===========================================================================
2 # https://github.com/BrianAker/ddm4
3 # ===========================================================================
11 # Generate version information in HEX format.
15 # Copyright (c) 2012 Brian Aker <brian@tangent.org>
17 # Copying and distribution of this file, with or without modification, are
18 # permitted in any medium without royalty provided the copyright notice
19 # and this notice are preserved. This file is offered as-is, without any
24 AC_DEFUN([AX_HEX_VERSION],[
25 AC_CACHE_CHECK([generate HEX_VERSION], [ax_cv_hex_version],[
26 ax_cv_hex_version=`echo $VERSION | sed 's|[\-a-z0-9]*$||' | awk -F. '{printf "0x%0.2d%0.3d%0.3d", $[]1, $[]2, $[]3}'`
28 AC_SUBST([HEX_VERSION],["$ax_cv_hex_version"])
29 AC_DEFINE([HEX_VERSION],[1],[HEX representation of VERSION])