Made ENABLE_HSIEH_HASH into a macro.
authorMonty Taylor <mordred@inaugust.com>
Sun, 14 Jun 2009 23:47:48 +0000 (16:47 -0700)
committerMonty Taylor <mordred@inaugust.com>
Sun, 14 Jun 2009 23:47:48 +0000 (16:47 -0700)
configure.ac
m4/hsieh.m4

index 8f67691d0ebaa274abbb1520ab5d3c25deceb957..467fe718eda6906c591e5f5316393b7d29f93c31 100644 (file)
@@ -152,11 +152,11 @@ DETECT_BYTEORDER
 ENABLE_UTILLIB
 ENABLE_DTRACE
 SETSOCKOPT_SANITY
+ENABLE_HSIEH_HASH
 
 sinclude(m4/pod2man.m4)
 sinclude(m4/protocol_binary.m4)
 sinclude(m4/memcached.m4)
-sinclude(m4/hsieh.m4)
 
 dnl TODO: Remove this define once we are using 2.61 across the board.
 # AX_HEADER_ASSERT
index f958f469d6410a3baf0ac4c63c8e1124f0c1349e..b057bfdce318aa24136207fa0e1265aa12592740 100644 (file)
@@ -1,22 +1,18 @@
 dnl ---------------------------------------------------------------------------
-dnl Macro: HSIEH_HASH
+dnl Macro: ENABLE_HSIEH_HASH
 dnl ---------------------------------------------------------------------------
-AC_ARG_ENABLE(hsieh_hash,
-    [  --enable-hsieh_hash     build with support for hsieh hashing.],
-    [
-      if test "x$enableval" != "xno"; then
-          ENABLE_HSIEH="true"
-          AC_DEFINE([HAVE_HSIEH_HASH], [1], [Enables hsieh hashing support])
-      else
-          ENABLE_HSIEH="false"
-      fi
-    ],
-    [
-      ENABLE_HSIEH="false"
-    ]
-)
+AC_DEFUN([ENABLE_HSIEH_HASH],
+  [AC_ARG_ENABLE([hsieh_hash],
+    [AS_HELP_STRING([--enable-hsieh_hash],
+      [build with support for hsieh hashing. @<:default=off@:>@])],
+    [ac_cv_enable_hsieh_hash=yes],
+    [ac_cv_enable_hsieh_hash=no])
 
-AM_CONDITIONAL([INCLUDE_HSIEH_SRC], [test "x$ENABLE_HSIEH" = "xtrue"])
+  AS_IF([test "$ac_cv_enable_hsieh_hash" = "yes"],
+        [AC_DEFINE([HAVE_HSIEH_HASH], [1], [Enables hsieh hashing support])])
+
+  AM_CONDITIONAL([INCLUDE_HSIEH_SRC], [test "$ac_cv_enable_hsieh_hash" = "yes"])
+])
 dnl ---------------------------------------------------------------------------
-dnl End Macro: HSIEH_HASH
+dnl End Macro: ENABLE_HSIEH_HASH
 dnl ---------------------------------------------------------------------------