From dfa90817a08f206f7e2dbba44d913968ae7f7d94 Mon Sep 17 00:00:00 2001
From: Chong Lu <Chong.Lu@windriver.com>
Date: Tue, 19 Aug 2014 17:38:32 +0800
Subject: [PATCH] memcached: add knob to detect whether hugetlbfs are checked

Add knob to detect whether hugetlbfs are checked or not.

Upstream-Status: Pending

Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
---
 configure.ac | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 6f2ef97..bd7dd96 100644
--- a/configure.ac
+++ b/configure.ac
@@ -559,8 +559,12 @@ if test "x$enable_static" = "xyes"; then
 fi
 
 dnl ----------------------------------------------------------------------------
+AC_ARG_ENABLE(hugetlbfs,
+  [AS_HELP_STRING([--enable-hugetlbfs],[Enable hugetlbfs])])
 
-AC_SEARCH_LIBS(gethugepagesizes, hugetlbfs)
+if test "x$enable_hugetlbfs" = "xyes"; then
+  AC_SEARCH_LIBS(gethugepagesizes, hugetlbfs)
+fi
 
 AC_HEADER_STDBOOL
 AH_BOTTOM([#if HAVE_STDBOOL_H
