Post
Topic
Board Mining software (miners)
Re: Official CGMINER thread - CPU/GPU miner in C for linux/windows/osx
by
zaytsev
on 01/09/2011, 13:40:57 UTC
Also, it is not clear to me what is the purpose of the following check in configure.ac:

Quote
AC_CHECK_LIB(curl, curl_easy_init, ,
<------>AC_MSG_ERROR([Could not find curl library - please install libcurl-dev]))

it comes *before* PKGCONFIG detection, so unless curl is installed in a standard location it just can't succeed. Also, LIBCURL_CPPFLAGS / LIBCURL_LIBS are substituted after the pkgconfig check, and if the check fails, then configure fails. So they don't make much sense, because if pkgconfig is non-existant or doesn't find the lib, it will AC_MSG_ERROR.

Quote
 LIBCURL_CFLAGS
              C compiler flags for LIBCURL, overriding pkg-config
  LIBCURL_LIBS
              linker flags for LIBCURL, overriding pkg-config

My suggestions:

1) Only pkgconfig if  LIBCURL_CPPFLAGS / LIBCURL_LIBS are NOT set
2) Move AC_CHECK_LIB *after* pkgconfig
3) Add LIBCURL_CPPFLAGS / LIBCURL_LIBS to CPPFLAGS / LDFLAGS before AC_CHECK_LIB and restore afterwards

Right now I basically can't compile cgminer against a statically linked libcurl.a Sad