From 4be4879ff8b4a6504ed981c470f3cb6b57eddb1d Mon Sep 17 00:00:00 2001 From: Colin Lord Date: Fri, 12 Aug 2016 09:27:04 -0400 Subject: [PATCH] blockdev: Modularize nfs block driver Modularizes the nfs block driver so that it gets dynamically loaded. Signed-off-by: Colin Lord Reviewed-by: Stefan Hajnoczi Message-id: 1471008424-16465-5-git-send-email-clord@redhat.com Reviewed-by: Max Reitz Signed-off-by: Max Reitz --- block/Makefile.objs | 1 + configure | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/block/Makefile.objs b/block/Makefile.objs index 3da471e388..cb158e9275 100644 --- a/block/Makefile.objs +++ b/block/Makefile.objs @@ -29,6 +29,7 @@ block-obj-y += crypto.o common-obj-y += stream.o +nfs.o-libs := $(LIBNFS_LIBS) iscsi.o-cflags := $(LIBISCSI_CFLAGS) iscsi.o-libs := $(LIBISCSI_LIBS) curl.o-cflags := $(CURL_CFLAGS) diff --git a/configure b/configure index 7d083bdd85..2efc3382e1 100755 --- a/configure +++ b/configure @@ -4578,7 +4578,6 @@ if test "$libnfs" != "no" ; then if $pkg_config --atleast-version=1.9.3 libnfs; then libnfs="yes" libnfs_libs=$($pkg_config --libs libnfs) - LIBS="$LIBS $libnfs_libs" else if test "$libnfs" = "yes" ; then feature_not_found "libnfs" "Install libnfs devel >= 1.9.3" @@ -5351,7 +5350,8 @@ if test "$libiscsi" = "yes" ; then fi if test "$libnfs" = "yes" ; then - echo "CONFIG_LIBNFS=y" >> $config_host_mak + echo "CONFIG_LIBNFS=m" >> $config_host_mak + echo "LIBNFS_LIBS=$libnfs_libs" >> $config_host_mak fi if test "$seccomp" = "yes"; then