Add --without-sqlite option to waf configure Disable sqlite support when ./waf configure is run with --without-sqlite
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
diff --git a/README.md b/README.md
index 444736d..1b3c680 100644
--- a/README.md
+++ b/README.md
@@ -78,6 +78,9 @@ The waf build system for libgit2 accepts the following flags:
--arch=[ia64|x64|x86|x86_amd64|x86_ia64]
Force a specific architecture for compilers that support it.
+ --without-sqlite
+ Disable sqlite support.
+
You can run `./waf --help` to see a full list of install options and
targets.
diff --git a/wscript b/wscript
index 85e38df..0b2b105 100644
--- a/wscript
+++ b/wscript
@@ -29,6 +29,8 @@ PPC optimized version (ppc) or the SHA1 functions from OpenSSL (openssl)")
help='Force a specific MSVC++ version (7.1, 8.0, 9.0, 10.0), if more than one is installed')
opt.add_option('--arch', action='store', default='x86',
help='Select target architecture (ia64, x64, x86, x86_amd64, x86_ia64)')
+ opt.add_option('--without-sqlite', action='store_false', default=True,
+ dest='use_sqlite', help='Disable sqlite support')
def configure(conf):
@@ -67,7 +69,8 @@ def configure(conf):
conf.check_cc(lib=zlib_name, uselib_store='z', install_path=None)
# check for sqlite3
- if conf.check_cc(lib='sqlite3', uselib_store='sqlite3', install_path=None, mandatory=False):
+ if conf.options.use_sqlite and conf.check_cc(
+ lib='sqlite3', uselib_store='sqlite3', install_path=None, mandatory=False):
conf.env.DEFINES += ['GIT2_SQLITE_BACKEND']
if conf.options.sha1 not in ['openssl', 'ppc', 'builtin']: