diff options
author | Paul J. Davis <paul.joseph.davis@gmail.com> | 2011-11-22 11:52:43 -0600 |
---|---|---|
committer | Robert Newson <robert.newson@cloudant.com> | 2011-12-23 14:39:39 +0000 |
commit | 6cec3db82d6e17e413e771ad0e3aab156bafbc1b (patch) | |
tree | d0678fb88827114561aa9c7839d4c86e7c19aa53 /couchjs/c_src/SConscript | |
parent | 0bdc62b8b186de839cf44721b8b61aa1eeae1f14 (diff) |
Make cURL a soft dependency
This makes sure that we only optionally require the same version of cURL
that CouchDB does.
Diffstat (limited to 'couchjs/c_src/SConscript')
-rw-r--r-- | couchjs/c_src/SConscript | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/couchjs/c_src/SConscript b/couchjs/c_src/SConscript index 451c03d3..68ad5d3e 100644 --- a/couchjs/c_src/SConscript +++ b/couchjs/c_src/SConscript @@ -52,7 +52,6 @@ if not env.GetOption('clean'): require_lib('m') require_lib('pthread') - require_lib('curl') require_lib('nspr4') ## check for SpiderMonkey development header @@ -94,6 +93,16 @@ if not env.GetOption('clean'): else: conf.Define("JSSCRIPT_TYPE", "JSObject*") + ## Check if curl is available + try: + vsn = runcmd("curl-config --version")[1] + vsn = vsn.split()[-1].strip().split(".") + vsn = tuple(map(int, vsn)) + if vsn > (7, 18, 0): + require_lib('curl') + except: + pass + ## Define properties for -h / -V (_, vsn) = runcmd("git describe --match 1.*") |