~brianaker/libmemcached/gear-clean

« back to all changes in this revision

Viewing changes to m4/ax_hex_version.m4

  • Committer: Continuous Integration
  • Date: 2012-09-29 16:57:16 UTC
  • mfrom: (1070.1.3 libmemcached-1.0)
  • Revision ID: ci@tangent.org-20120929165716-wi7gtt3nie8b58kq
Merge lp:~tangent-org/libmemcached/1.0-build Build: jenkins-Libmemcached-1.0-43

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# ===========================================================================
 
2
# https://github.com/BrianAker/ddm4
 
3
# ===========================================================================
 
4
#
 
5
# SYNOPSIS
 
6
#
 
7
#   AX_HEX_VERSION
 
8
#
 
9
# DESCRIPTION
 
10
#
 
11
#   Generate version information in HEX format.
 
12
#
 
13
# LICENSE
 
14
#
 
15
#   Copyright (c) 2012 Brian Aker <brian@tangent.org>
 
16
#
 
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
 
20
#   warranty.
 
21
 
 
22
#serial 1
 
23
 
 
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}'`
 
27
      ])
 
28
    AC_SUBST([HEX_VERSION],["$ax_cv_hex_version"])
 
29
    AC_DEFINE([HEX_VERSION],[1],[HEX representation of VERSION])
 
30
    ])
 
31