Skip to content

Commit

Permalink
Avoid -lcurl when libcurl is not found.
Browse files Browse the repository at this point in the history
Closes COUCHDB-1042



git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1086934 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
davisp committed Mar 30, 2011
1 parent 8a37632 commit a9e159d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions configure.ac
Expand Up @@ -212,20 +212,18 @@ AC_ARG_WITH([win32-curl], [AC_HELP_STRING([--with-win32-curl=PATH],
[set PATH to the Win32 native curl directory])], [
# default build on windows is a static lib, and that's what we want too
CURL_CFLAGS="-I$withval/include -DCURL_STATICLIB"
CURL_LIBS="$withval/lib/libcurl"
CURL_LDFLAGS="-l$CURL_LIBS -lWs2_32 -lkernel32 -luser32 -ladvapi32 -lWldap32"
CURL_LIBS="-L$withval/lib -lcurl -lWs2_32 -lkernel32 -luser32 -ladvapi32 -lWldap32"
], [
AC_CHECK_CURL([7.18.0],
[AC_DEFINE([HAVE_CURL], [1], ["Provide HTTP support to couchjs"])], [
AC_MSG_WARN([You will be unable to run some JavaScript unit tests.])
use_curl=no
CURL_LIBS=
])
CURL_LDFLAGS=-lcurl
])

AC_SUBST(CURL_CFLAGS)
AC_SUBST(CURL_LIBS)
AC_SUBST(CURL_LDFLAGS)

case "$(uname -s)" in
Linux)
Expand Down
3 changes: 1 addition & 2 deletions src/couchdb/priv/Makefile.am
Expand Up @@ -46,9 +46,8 @@ COUCHJS_SRCS = \

locallibbin_PROGRAMS = couchjs
couchjs_SOURCES = $(COUCHJS_SRCS)
couchjs_LDFLAGS = $(CURL_LDFLAGS)
couchjs_CFLAGS = -D_BSD_SOURCE $(CURL_CFLAGS)
couchjs_LDADD = $(CURL_LDFLAGS) @JSLIB@
couchjs_LDADD = $(CURL_LIBS) @JSLIB@

couchpriv_DATA = stat_descriptions.cfg
couchpriv_PROGRAMS = couchspawnkillable
Expand Down

0 comments on commit a9e159d

Please sign in to comment.