Code

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 3b179106c37477577e1d8ac2507866defd6995b0..edfa22eb41fe0f9fbb3272fda9cff6f85423d7ca 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 c60cb36d34a13f24ac22900f6233ac409c3a2e3d..765cb106948040d0b3116cc4792ceee243219dd2 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