memcached: add knob to detect whether hugetlbfs are checked

Add knob to detect whether hugetlbfs are checked or not.
This patch fixed the error:
    ld: cannot find -lhugetlbfs

Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
This commit is contained in:
Chong Lu
2014-08-19 17:38:32 +08:00
committed by Joe MacDonald
parent 46824934fa
commit ab6a7fa8dd
2 changed files with 42 additions and 3 deletions
@@ -0,0 +1,32 @@
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 | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 7f22f21..21691b9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -314,7 +314,12 @@ fi
dnl ----------------------------------------------------------------------------
AC_SEARCH_LIBS(umem_cache_create, umem)
-AC_SEARCH_LIBS(gethugepagesizes, hugetlbfs)
+AC_ARG_ENABLE(hugetlbfs,
+ [AS_HELP_STRING([--enable-hugetlbfs],[Enable hugetlbfs])])
+
+if test "x$enable_hugetlbfs" = "xyes"; then
+ AC_SEARCH_LIBS(gethugepagesizes, hugetlbfs)
+fi
AC_HEADER_STDBOOL
AH_BOTTOM([#if HAVE_STDBOOL_H
--
1.8.3.4
@@ -18,7 +18,11 @@ DEPENDS += "libevent"
RDEPENDS_${PN} += "perl perl-module-posix perl-module-autoloader perl-module-tie-hash" RDEPENDS_${PN} += "perl perl-module-posix perl-module-autoloader perl-module-tie-hash"
SRC_URI = "http://www.memcached.org/files/${BP}.tar.gz \ SRC_URI = "http://www.memcached.org/files/${BP}.tar.gz \
file://configure.patch" file://configure.patch \
file://memcached-add-hugetlbfs-check.patch"
# set the same COMPATIBLE_HOST as libhugetlbfs
COMPATIBLE_HOST = '(i.86|x86_64|powerpc|powerpc64|arm).*-linux'
SRC_URI[md5sum] = "46402dfbd7faadf6182283dbbd18b1a6" SRC_URI[md5sum] = "46402dfbd7faadf6182283dbbd18b1a6"
SRC_URI[sha256sum] = "d9173ef6d99ba798c982ea4566cb4f0e64eb23859fdbf9926a89999d8cdc0458" SRC_URI[sha256sum] = "d9173ef6d99ba798c982ea4566cb4f0e64eb23859fdbf9926a89999d8cdc0458"
@@ -26,11 +30,14 @@ SRC_URI[sha256sum] = "d9173ef6d99ba798c982ea4566cb4f0e64eb23859fdbf9926a89999d8c
python __anonymous () { python __anonymous () {
endianness = d.getVar('SITEINFO_ENDIANNESS', True) endianness = d.getVar('SITEINFO_ENDIANNESS', True)
if endianness == 'le': if endianness == 'le':
d.setVar('EXTRA_OECONF', "ac_cv_c_endian=little") d.appendVar('EXTRA_OECONF', " ac_cv_c_endian=little")
else: else:
d.setVar('EXTRA_OECONF', "ac_cv_c_endian=big") d.appendVar('EXTRA_OECONF', " ac_cv_c_endian=big")
} }
PACKAGECONFIG ??= ""
PACKAGECONFIG[hugetlbfs] = "--enable-hugetlbfs, --disable-hugetlbfs, libhugetlbfs"
inherit update-rc.d inherit update-rc.d
INITSCRIPT_NAME = "memcached" INITSCRIPT_NAME = "memcached"