configure: Add option for disabling the smb1 server
authorDavid Mulder <dmulder@suse.com>
Mon, 7 Mar 2022 17:10:14 +0000 (10:10 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 7 Apr 2022 17:37:30 +0000 (17:37 +0000)
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/globals.h
wscript

index 7719d9297f56bda82fe2b94339701b2deb07c533..efcf02f0d2471d45dda8d8355d5f80a7e9ef324e 100644 (file)
@@ -25,8 +25,6 @@
 #include "librpc/gen_ndr/smbXsrv.h"
 #include "smbprofile.h"
 
-#define WITH_SMB1SERVER 1
-
 #ifdef USE_DMAPI
 struct smbd_dmapi_context;
 extern struct smbd_dmapi_context *dmapi_ctx;
diff --git a/wscript b/wscript
index 5b85d9a1682164fd03fab6417830ff5596de3dcd..9d928034228ce4560b3450f540e576f6d00e57d4 100644 (file)
--- a/wscript
+++ b/wscript
@@ -129,6 +129,10 @@ def options(opt):
                    action='store_false', dest='with_json',
                    help=("Build without JSON support."))
 
+    opt.samba_add_onoff_option('smb1-server',
+                               dest='with_smb1server',
+                               help=("Build smbd with SMB1 support (default=yes)."))
+
 def configure(conf):
     version = samba_version.load_version(env=conf.env)
 
@@ -390,6 +394,9 @@ def configure(conf):
                          msg="Checking compiler for full RELRO support"):
             conf.env['ENABLE_RELRO'] = True
 
+    if Options.options.with_smb1server != False:
+        conf.DEFINE('WITH_SMB1SERVER', '1')
+
     #
     # FreeBSD is broken. It doesn't include 'extern char **environ'
     # in any shared library, but statically inside crt0.o.