Commit 591666eacbb75dafe6d6cde47a902ac36163c561

Con Kolivas 2011-07-28T18:28:41

Merge pull request #21 from Kovensky/cgminer Use pkg-config to check for libcurl version

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/configure.ac b/configure.ac
index ee7d4d5..a380e2c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -124,8 +124,10 @@ AM_CONDITIONAL([HAS_YASM], [test x$has_yasm = xtrue])
 
 PKG_PROG_PKG_CONFIG()
 
-LIBCURL_CHECK_CONFIG(, 7.10.1, ,  [AC_MSG_ERROR([Missing required libcurl dev >= 7.10.1])])
-LIBCURL_CHECK_CONFIG(, 7.15.6, [AC_DEFINE([CURL_HAS_SOCKOPT], [1], [Defined if version of curl supports sockopts.])],)
+PKG_CHECK_MODULES([LIBCURL], [libcurl >= 7.15.6], [AC_DEFINE([CURL_HAS_SOCKOPT], [1], [Defined if version of curl supports sockopts.])],
+[PKG_CHECK_MODULES([LIBCURL], [libcurl >= 7.10.1], ,[AC_MSG_ERROR([Missing required libcurl dev >= 7.10.1])])])
+AC_SUBST(LIBCURL_CPPFLAGS)
+AC_SUBST(LIBCURL_LIBS)
 
 dnl CCAN wants to know a lot of vars.
 # All the configuration checks.  Regrettably, the __attribute__ checks will