pandora-build v0.79. Added support for generating HEX version.
[awesomized/libmemcached] / m4 / pandora_version.m4
diff --git a/m4/pandora_version.m4 b/m4/pandora_version.m4
new file mode 100644 (file)
index 0000000..3a62798
--- /dev/null
@@ -0,0 +1,11 @@
+dnl  Copyright (C) 2009 Sun Microsystems
+dnl This file is free software; Sun Microsystems
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([PANDORA_VERSION],[
+
+  PANDORA_HEX_VERSION=`echo $VERSION | sed 's|[\-a-z0-9]*$||' | \
+    awk -F. '{printf "0x%0.2d%0.3d%0.3d", $[]1, $[]2, $[]3}'`
+  AC_SUBST([PANDORA_HEX_VERSION])
+])