Permalink
Browse files

Make cURL a soft dependency

This makes sure that we only optionally require the same version of cURL
that CouchDB does.
  • Loading branch information...
1 parent f2e2e77 commit 1cd3eb14f49f77419833f984378f85b254d960fe @davisp davisp committed Nov 22, 2011
Showing with 10 additions and 1 deletion.
  1. +10 −1 couchjs/c_src/SConscript
View
11 couchjs/c_src/SConscript
@@ -51,7 +51,6 @@ if not env.GetOption('clean'):
require_lib('m')
require_lib('pthread')
- require_lib('curl')
require_lib('nspr4')
## check for SpiderMonkey development header
@@ -93,6 +92,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.*")

0 comments on commit 1cd3eb1

Please sign in to comment.