Skip to content

Commit

Permalink
CouchDB no longer requires cURL to build.
Browse files Browse the repository at this point in the history
commit df7ac13
Author: Paul Joseph Davis <davisp@apache.org>
Date:   Fri Jan 28 01:06:42 2011 +0000

cURL is only used by the command line JavaScript test suite
which is not run by a large number of users. This change
no longer requires cURL to be available for all CouchDB
installations.

Thanks to Randall Leeds for the patch.
Closes COUCHDB-1042
  • Loading branch information
bcui6611 authored and steveyen committed Mar 9, 2011
1 parent 0c5c222 commit 93fcd81
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/couchdb/priv/couch_js/http.c
Expand Up @@ -10,10 +10,27 @@
// License for the specific language governing permissions and limitations under
// the License.

#include "config.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <jsapi.h>

#ifndef HAVE_CURL

// Soft dependency on cURL bindings because they're
// only used when running the JS tests from the
// command line which is rare.
JSObject*
install_http(JSContext* cx, JSObject* glbl)
{
fprintf(stderr, "ERROR: couchjs was not built with cURL support.\n");
return NULL;
}

#else

#include <curl/curl.h>

#include "utf8.h"
Expand Down Expand Up @@ -673,3 +690,5 @@ str_from_binary(JSContext* cx, char* data, size_t length)

return ret;
}

#endif /* HAVE_CURL */

0 comments on commit 93fcd81

Please sign in to comment.