build: Make --with-gpgme the default
authorAndrew Bartlett <abartlet@samba.org>
Thu, 10 May 2018 01:05:56 +0000 (13:05 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 15 May 2018 01:36:09 +0000 (03:36 +0200)
Those wishing to build without gpgme support need simply to build --without-gpgme

This In general, we prefer that optional libraries be required by default
so that they are not accidentially missed, particularly in packages.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
source4/dsdb/samdb/ldb_modules/wscript

index 91edbcb2594dcabda3d56391d7702c3989bc3831..bf0798204a474109931c313e3b4d6c0b46699d7e 100644 (file)
@@ -7,7 +7,7 @@ def set_options(opt):
     help += "This requires gpgme devel and python packages "
     help += "(e.g. libgpgme11-dev, python-gpgme on debian/ubuntu)."
 
-    opt.SAMBA3_ADD_OPTION('gpgme', default=None, help=(help))
+    opt.SAMBA3_ADD_OPTION('gpgme', default=True, help=(help))
 
     return
 
@@ -24,7 +24,8 @@ def configure(conf):
 
     conf.SET_TARGET_TYPE('gpgme', 'EMPTY')
 
-    if Options.options.with_gpgme != False:
+    if not Options.options.without_ad_dc \
+       and Options.options.with_gpgme != False:
         conf.find_program('gpgme-config', var='GPGME_CONFIG')
 
         if conf.env.GPGME_CONFIG:
@@ -36,7 +37,11 @@ def configure(conf):
             conf.DEFINE('ENABLE_GPGME', '1')
 
         if not conf.CONFIG_SET('ENABLE_GPGME'):
-            if Options.options.with_gpgme == True:
-                conf.fatal('GPGME support requested, but no suitable GPGME library found, eg libgpgme11-dev and python-gpgme')
-            else:
-                Logs.warn('no suitable GPGME library found')
+            conf.fatal("GPGME support not found. "
+                       "Try installing libgpgme11-dev or gpgme-devel "
+                      "and python-gpgme. "
+                       "Otherwise, use --without-gpgme to build without "
+                       "GPGME support or --without-ad-dc to build without "
+                      "the Samba AD DC. "
+                       "GPGME support is required for the GPG encrypted "
+                       "password sync feature")