curl: fix linking against libgnurl/libcurl
authorDaniel Golle <daniel@makrotopia.org>
Sat, 7 May 2016 16:48:27 +0000 (16:48 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Sat, 7 May 2016 16:48:27 +0000 (16:48 +0000)
src/curl/Makefile.am

index c716abe52f5809d3c678eabb5f7fe87dde75b51d..af8b640782fb8852f9105b6f4e558696b0539af9 100644 (file)
@@ -6,6 +6,16 @@ if USE_COVERAGE
   XLIB = -lgcov
 endif
 
+if HAVE_LIBGNURL
+LIB_GNURL=@LIBGNURL@
+CPP_GNURL=@LIBGNURL_CPPFLAGS@
+else
+if HAVE_LIBCURL
+LIB_GNURL=@LIBCURL@
+CPP_GNURL=@LIBCURL_CPPFLAGS@
+endif
+endif
+
 lib_LTLIBRARIES = \
   libgnunetcurl.la
 
@@ -18,8 +28,10 @@ libgnunetcurl_la_SOURCES = \
 libgnunetcurl_la_LIBADD = \
   $(top_builddir)/src/util/libgnunetutil.la \
   -ljansson \
-  -lcurl \
+  $(LIB_GNURL) \
   $(XLIB)
+libgnunetcurl_la_CPPFLAGS = \
+ $(CPP_GNURL) $(AM_CPPFLAGS)
 
 #check_PROGRAMS = \
 #  test_curl