diff mbox series

[7/7] exportd: Added config variable to compile in the NFSv4 only server.

Message ID 20210219200815.792667-8-steved@redhat.com (mailing list archive)
State New, archived
Headers show
Series The NFSv4 only mounting daemon. | expand

Commit Message

Steve Dickson Feb. 19, 2021, 8:08 p.m. UTC
Added the --enable-nfsv4server configuration flag
that will compile/install nfsv4.exportd and
install the systemd unit files.

Signed-off-by: Steve Dickson <steved@redhat.com>
---
 configure.ac        | 13 +++++++++++++
 systemd/Makefile.am |  6 +++++-
 utils/Makefile.am   |  3 +++
 3 files changed, 21 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/configure.ac b/configure.ac
index ffd6247..40fb802 100644
--- a/configure.ac
+++ b/configure.ac
@@ -257,6 +257,19 @@  AC_ARG_ENABLE(nfsdcltrack,
 	enable_nfsdcltrack=$enableval,
 	enable_nfsdcltrack="yes")
 
+if test "$enable_nfsv4" = yes; then
+AC_ARG_ENABLE(nfsv4server,
+	[AC_HELP_STRING([--enable-nfsv4server],
+			[enable support for NFSv4 only server  @<:@default=no@:>@])],
+	enable_nfsv4server=$enableval,
+	enable_nfsv4server="no")
+	if test "$enable_nfsv4server" = yes; then
+		AC_DEFINE(HAVE_NFSV4SERVER_SUPPORT, 1,
+                          [Define this if you want NFSv4 server only support compiled in])
+	fi
+	AM_CONDITIONAL(CONFIG_NFSV4SERVER, [test "$enable_nfsv4server" = "yes" ])
+fi
+
 dnl Check for TI-RPC library and headers
 AC_LIBTIRPC
 
diff --git a/systemd/Makefile.am b/systemd/Makefile.am
index 5251f23..650ad25 100644
--- a/systemd/Makefile.am
+++ b/systemd/Makefile.am
@@ -17,7 +17,11 @@  unit_files =  \
 
 if CONFIG_NFSV4
 unit_files += \
-    nfs-idmapd.service \
+    nfs-idmapd.service
+endif
+
+if CONFIG_NFSV4SERVER
+unit_files += \
     nfsv4-exportd.service \
     nfsv4-server.service
 endif
diff --git a/utils/Makefile.am b/utils/Makefile.am
index 2a54b90..ab58419 100644
--- a/utils/Makefile.am
+++ b/utils/Makefile.am
@@ -5,6 +5,9 @@  OPTDIRS =
 if CONFIG_NFSV4
 OPTDIRS += idmapd
 OPTDIRS += nfsidmap
+endif
+
+if CONFIG_NFSV4SERVER
 OPTDIRS += exportd
 endif