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:46:28 +0000 |
commit | 11b4484b23328de9307e3d59b7a2331560d6ab49 (patch) | |
tree | 985abac8b61b4b6538ded194bead81f1ea5c1959 /couchjs | |
parent | 055b6303ef31d2d17c504ae94c638f14c4f2cfe0 (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')
-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.*") |