From: Stefan Metzmacher Date: Tue, 12 Jan 2016 09:51:38 +0000 (+0100) Subject: s4:dsdb/samdb: add configure checks for libgpgme X-Git-Tag: tdb-1.3.10~192 X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=81190f910a3bd8083d963c0d983a1a3fd20f91ed;hp=b66ff2f47b374b4a2fd76567ef2aa89c680b2255;p=samba.git s4:dsdb/samdb: add configure checks for libgpgme This will be used to store the cleartext utf16 password GPG encrypted as 'Primary:SambaGPG' in the supplementalCredentials attribute. Signed-off-by: Stefan Metzmacher Reviewed-by: Alexander Bokovoy --- diff --git a/source4/dsdb/samdb/ldb_modules/wscript b/source4/dsdb/samdb/ldb_modules/wscript new file mode 100644 index 00000000000..65f36ac15b4 --- /dev/null +++ b/source4/dsdb/samdb/ldb_modules/wscript @@ -0,0 +1,32 @@ + +import Logs, Options, sys +import samba3 + +def set_options(opt): + help = "Build with gpgme support (default=auto). " + 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)) + + return + +def configure(conf): + conf.SET_TARGET_TYPE('gpgme', 'EMPTY') + + if Options.options.with_gpgme != False: + conf.find_program('gpgme-config', var='GPGME_CONFIG') + + if conf.env.GPGME_CONFIG: + conf.CHECK_CFG(path=conf.env.GPGME_CONFIG, args="--cflags --libs", + package="", uselib_store="gpgme", + msg='Checking for gpgme support') + + if conf.CHECK_FUNCS_IN('gpgme_new', 'gpgme', headers='gpgme.h'): + 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') + else: + Logs.warn('no suitable GPGME library found') diff --git a/wscript b/wscript index ff4bceec7b3..77aacef65e4 100644 --- a/wscript +++ b/wscript @@ -39,6 +39,7 @@ def set_options(opt): opt.RECURSE('lib/ldb') opt.RECURSE('selftest') opt.RECURSE('source4/lib/tls') + opt.RECURSE('source4/dsdb/samdb/ldb_modules') opt.RECURSE('pidl') opt.RECURSE('source3') opt.RECURSE('lib/util') @@ -152,6 +153,7 @@ def configure(conf): if conf.CONFIG_GET('KRB5_VENDOR') in (None, 'heimdal'): conf.RECURSE('source4/heimdal_build') conf.RECURSE('source4/lib/tls') + conf.RECURSE('source4/dsdb/samdb/ldb_modules') conf.RECURSE('source4/ntvfs/sysdep') conf.RECURSE('lib/util') conf.RECURSE('lib/util/charset')