summaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2011-03-16 21:35:51 +0200
committerVicent Marti <tanoku@gmail.com>2011-03-20 21:45:06 +0200
commitbb3de0c472b2d5d6b8091c190bee3db79c4b5e27 (patch)
tree6be2facd0014fff4a4769b6a6a082c722c03ad87 /wscript
parentb5c5f0f8086ee4e9bccf0703386fd5219ac380c2 (diff)
downloadlibgit2-bb3de0c472b2d5d6b8091c190bee3db79c4b5e27.tar.gz
Thread safe cache
Diffstat (limited to 'wscript')
-rw-r--r--wscript10
1 files changed, 8 insertions, 2 deletions
diff --git a/wscript b/wscript
index 4e8294c9f..b990e148a 100644
--- a/wscript
+++ b/wscript
@@ -29,8 +29,10 @@ 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,
+ opt.add_option('--with-sqlite', action='store_true', default=False,
dest='use_sqlite', help='Disable sqlite support')
+ opt.add_option('--threadsafe', action='store_true', default=False,
+ help='Make libgit2 thread-safe (requires pthreads)')
def configure(conf):
@@ -59,7 +61,11 @@ def configure(conf):
else:
conf.env.PLATFORM = 'unix'
- conf.check_cc(lib='pthread', uselib_store='pthread')
+
+ if conf.options.threadsafe:
+ if conf.env.PLATFORM == 'unix':
+ conf.check_cc(lib='pthread', uselib_store='pthread')
+ conf.env.DEFINES += ['GIT_THREADS']
# check for sqlite3
if conf.options.use_sqlite and conf.check_cc(