AC_ARG_WITH(spdk,
[AC_HELP_STRING([--with-spdk], [build Ceph SPDK Support])], [], [with_spdk=no])
-AM_CONDITIONAL(HAVE_SPDK, [test "x$with_spdk" != "xno"])
+AM_CONDITIONAL(WITH_SPDK, [test "x$with_spdk" != "xno"])
if test "x$with_spdk" != x"no"; then
CPPFLAGS="$CPPFLAGS -I$with_spdk/include"
AC_CHECK_HEADER([spdk/nvme.h], [], AC_MSG_ERROR([Cannot find header 'spdk/nvme.h'.]))
AC_CHECK_LIB([spdk_nvme], [nvme_attach], [], AC_MSG_FAILURE([SPDK nvme_attach not found]))
- SPDK_LIBS="-lspdk_nvme"
+ AC_DEFINE([HAVE_SPDK], [1], [SPDK conditional compilation])
AC_SUBST(SPDK_LIBS)
fi
LIBOS += libos_zfs.a -lzfs
endif # WITH_LIBZFS
+if WITH_SPDK
+LIBOS += -lpciaccess -lspdk_nvme -lspdk_util -lspdk_memory -lrte_eal -lrte_mempool -lrte_ring
+endif # WITH_SPDK
+
if WITH_TCMALLOC_MINIMAL
LIBPERFGLUE += -ltcmalloc_minimal
endif # WITH_TCMALLOC_MINIMAL
noinst_HEADERS += os/fs/ZFS.h
endif
-if HAVE_SPDK
+if WITH_SPDK
libos_a_CXXFLAGS = ${AM_CXXFLAGS} -I ${with_spdk}/include -fPIC
-libos_a_LIBADD += "-lspdk_nvme -lpciaccess -lpthread -lrte_eal -lrte_mempool -lrte_ring"
libos_a_SOURCES += os/bluestore/NVMEDevice.cc
noinst_HEADERS += os/bluestore/NVMEDevice.h
endif