Permalink
Browse files

Avoid -lcurl when libcurl is not found.

Closes COUCHDB-1042



git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1086934 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 8a37632 commit a9e159d590eb9f2473d0a5e0feb4521d8d04453a @davisp davisp committed Mar 30, 2011
Showing with 3 additions and 6 deletions.
  1. +2 −4 configure.ac
  2. +1 −2 src/couchdb/priv/Makefile.am
View
@@ -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)
@@ -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

0 comments on commit a9e159d

Please sign in to comment.