Corrected reading the libraries to link to from `curl-config'..
authorocto <octo>
Tue, 21 Mar 2006 07:10:11 +0000 (07:10 +0000)
committerocto <octo>
Tue, 21 Mar 2006 07:10:11 +0000 (07:10 +0000)
(Changed: src/Makefile.am, configure.in)

configure.in
src/Makefile.am

index 3b17910..edfa22e 100644 (file)
@@ -319,6 +319,16 @@ AC_CHECK_LIB(curl, curl_easy_init,
 [with_libcurl="no"])
 AM_CONDITIONAL(BUILD_WITH_LIBCURL, test "x$with_libcurl" = "xyes")
 
+if test "x$with_libcurl" = "xyes"
+then
+       with_libcurl_libs=`curl-config --libs`
+       if test "x$with_libcurl_libs" != "x"
+       then
+               BUILD_WITH_LIBCURL_LIBS="$with_libcurl_libs";
+               AC_SUBST(BUILD_WITH_LIBCURL_LIBS)
+       fi
+fi
+
 m4_divert_once([HELP_WITH], [
 collectd additional packages:])
 
index c60cb36..765cb10 100644 (file)
@@ -49,7 +49,7 @@ pkglib_LTLIBRARIES += apache.la
 apache_la_SOURCES = apache.c
 apache_la_LDFLAGS = -module -avoid-version
 if BUILD_WITH_LIBCURL
-apache_la_LDFLAGS += -lcurl
+apache_la_LDFLAGS += $(BUILD_WITH_LIBCURL_LIBS)
 endif
 collectd_LDADD += "-dlopen" apache.la
 collectd_DEPENDENCIES += apache.la