pandora-build v0.79. Added support for generating HEX version.
authorMonty Taylor <mordred@inaugust.com>
Wed, 2 Dec 2009 22:04:02 +0000 (14:04 -0800)
committerMonty Taylor <mordred@inaugust.com>
Wed, 2 Dec 2009 22:04:02 +0000 (14:04 -0800)
libmemcached/memcached.h
libmemcached/memcached_configure.h.in
m4/pandora_canonical.m4
m4/pandora_version.m4 [new file with mode: 0644]

index 78afa3489faa6f7e75cc77574dbe93190dfc7fb5..6ca40a5c73fb16bd86c40225d608b753b837931b 100644 (file)
@@ -33,7 +33,6 @@ extern "C" {
 #endif
 
 #define MEMCACHED_VERSION_STRING_LENGTH 24
 #endif
 
 #define MEMCACHED_VERSION_STRING_LENGTH 24
-#define LIBMEMCACHED_VERSION_STRING "0.35"
 
 struct memcached_analysis_st {
   uint32_t average_item_size;
 
 struct memcached_analysis_st {
   uint32_t average_item_size;
index d3af270af5a1c79014421a71058f4eb20b6229aa..5d4e60e984b8db69d3cf70db7d45a7606eb2fafd 100644 (file)
@@ -15,6 +15,9 @@ extern "C" {
 
 @DEPRECATED@
 
 
 @DEPRECATED@
 
+#define LIBMEMCACHED_VERSION_STRING "@VERSION@"
+#define LIBMEMCACHED_VERSION_HEX @PANDORA_HEX_VERSION@
+
 #ifdef __cplusplus
 }
 #endif
 #ifdef __cplusplus
 }
 #endif
index c1170f158e45d83856f147527ca7d28af96e1ffa..83edbd84648336e2c9eb83a84ff8b888e3567851 100644 (file)
@@ -4,7 +4,7 @@ dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 dnl Which version of the canonical setup we're using
 dnl with or without modifications, as long as this notice is preserved.
 
 dnl Which version of the canonical setup we're using
-AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.78])
+AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.79])
 
 AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[
   dnl Force dependency tracking on for Sun Studio builds
 
 AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[
   dnl Force dependency tracking on for Sun Studio builds
@@ -24,6 +24,7 @@ AC_DEFUN([PANDORA_CANONICAL_TARGET],[
   m4_define([PCT_IGNORE_SHARED_PTR],[no])
   m4_define([PCT_FORCE_GCC42],[no])
   m4_define([PCT_SRC_IN_SRC],[no])
   m4_define([PCT_IGNORE_SHARED_PTR],[no])
   m4_define([PCT_FORCE_GCC42],[no])
   m4_define([PCT_SRC_IN_SRC],[no])
+  m4_define([PCT_VERSION_FROM_VC],[no])
   m4_define([PCT_USE_VISIBILITY],[yes])
   m4_foreach([pct_arg],[$*],[
     m4_case(pct_arg,
   m4_define([PCT_USE_VISIBILITY],[yes])
   m4_foreach([pct_arg],[$*],[
     m4_case(pct_arg,
@@ -50,6 +51,10 @@ AC_DEFUN([PANDORA_CANONICAL_TARGET],[
       [src-in-src], [
         m4_undefine([PCT_SRC_IN_SRC])
         m4_define([PCT_SRC_IN_SRC],[yes])
       [src-in-src], [
         m4_undefine([PCT_SRC_IN_SRC])
         m4_define([PCT_SRC_IN_SRC],[yes])
+      ],
+      [version-from-vc], [
+        m4_undefine([PCT_VERSION_FROM_VC])
+        m4_define([PCT_VERSION_FROM_VC],[yes])
     ])
   ])
 
     ])
   ])
 
@@ -72,6 +77,11 @@ AC_DEFUN([PANDORA_CANONICAL_TARGET],[
   AC_REQUIRE([PANDORA_MAC_GCC42])
   AC_REQUIRE([PANDORA_64BIT])
 
   AC_REQUIRE([PANDORA_MAC_GCC42])
   AC_REQUIRE([PANDORA_64BIT])
 
+  m4_if(PCT_VERSION_FROM_VC,yes,[
+    PANDORA_VC_VERSION
+  ])
+  PANDORA_VERSION
+
   dnl Once we can use a modern autoconf, we can use this
   dnl AC_PROG_CC_C99
   AC_REQUIRE([AC_PROG_CXX])
   dnl Once we can use a modern autoconf, we can use this
   dnl AC_PROG_CC_C99
   AC_REQUIRE([AC_PROG_CXX])
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])
+])