summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoah Watkins <noahwatkins@gmail.com>2013-09-21 21:50:28 +0200
committerNoah Watkins <noahwatkins@gmail.com>2014-01-04 18:18:04 +0100
commitef6a56aa26d0f0bec0b6d6c157c6e2f223a71e0d (patch)
treedc5440960c0d1c50098061c15458941e611843ba
parentMerge pull request #1038 from ceph/wip-objectcacher-backoff (diff)
downloadceph-ef6a56aa26d0f0bec0b6d6c157c6e2f223a71e0d.tar.xz
ceph-ef6a56aa26d0f0bec0b6d6c157c6e2f223a71e0d.zip
keyutils: handle non-linux platform
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
-rw-r--r--configure.ac10
-rw-r--r--src/Makefile-env.am2
-rw-r--r--src/common/Makefile.am2
3 files changed, 9 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index dc345f5cf97..95156d467f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -168,10 +168,14 @@ if test x"$resolv_libs" != "xok"; then
fi
AC_SUBST([RESOLV_LIBS])
+dnl check for libkeyutils on linux
+KEYUTILS_LIB=""
+AS_IF([test x"$linux" = x"yes"], [
+ AC_CHECK_LIB([keyutils], [add_key], [KEYUTILS_LIB="-lkeyutils"], [
+ AC_MSG_FAILURE([libkeyutils not found])])])
+AC_SUBST(KEYUTILS_LIB)
+
AC_CHECK_LIB([m], [pow], [true], AC_MSG_FAILURE([libm not found]))
-if test x"$linux" = x"yes"; then
- AC_CHECK_LIB([keyutils], [add_key], [true], AC_MSG_FAILURE([libkeyutils not found]))
-fi
AC_CHECK_FUNCS([syncfs], AC_DEFINE([HAVE_SYS_SYNCFS], [1], [we have syncfs]), [])
# Find some crypto library for us to use, while letting user to decide which one to use.
diff --git a/src/Makefile-env.am b/src/Makefile-env.am
index 5e914f403e9..f637efff767 100644
--- a/src/Makefile-env.am
+++ b/src/Makefile-env.am
@@ -116,7 +116,7 @@ AM_CCASFLAGS = -f elf64
#####################
## library definitions and dependencies
-EXTRALIBS = -luuid -lm -lkeyutils
+EXTRALIBS = -luuid -lm $(KEYUTILS_LIB)
if FREEBSD
EXTRALIBS += -lexecinfo
endif # FREEBSD
diff --git a/src/common/Makefile.am b/src/common/Makefile.am
index b8efc84ac9f..ec1f31e24ae 100644
--- a/src/common/Makefile.am
+++ b/src/common/Makefile.am
@@ -112,7 +112,7 @@ noinst_HEADERS += \
LIBCOMMON_DEPS += \
$(LIBMSG) $(LIBAUTH) \
$(LIBCRUSH) $(LIBJSON_SPIRIT) $(LIBLOG) $(LIBARCH) \
- -lkeyutils
+ $(KEYUTILS_LIB)
if LINUX
LIBCOMMON_DEPS += -lrt