gpt4 book ai didi

libcurl - 如何为./configure指定LDFLAGS和CPPFLAGS?

转载 作者:行者123 更新时间:2023-12-03 12:28:41 29 4
gpt4 key购买 nike

我正在使用运行OS X 10.8.3的Mac。我正在尝试编译cgminer 3.0.0。在第一次运行./configure时,我收到以下消息:

checking for LIBCURL... no
checking for LIBCURL... no
configure: error: Missing required libcurl dev >= 7.18.2

因此,我使用自制软件安装了最新版本的libcurl:
brew install curl

这似乎可以解决问题。我收到此消息:
downloaded: /Library/Caches/Homebrew/curl-7.30.0.tar.gz
==> ./configure --prefix=/usr/local/Cellar/curl/7.30.0
==> make install
==> Caveats
This formula is keg-only: so it was not symlinked into /usr/local.

Mac OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.

The libcurl provided by Leopard is too old for CouchDB to use.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

LDFLAGS: -L/usr/local/opt/curl/lib
CPPFLAGS: -I/usr/local/opt/curl/include

==> Summary
/usr/local/Cellar/curl/7.30.0: 75 files, 2.0M, built in 61 seconds

好的,它已安装但未链接到 /usr/local,对我来说很好。我尝试了这个:
export LDFLAGS=-L/usr/local/opt/curl/lib
export CPPFLAGS=-I/usr/local/opt/curl/include
./configure

但是我得到了相同的消息: configure: error: Missing required libcurl dev >= 7.18.2
所以我尝试了这个:
env LDFLAGS=-L/usr/local/opt/curl/lib CPPFLAGS=-I/usr/local/opt/curl/include ./configure

我仍然收到“缺少必需的libcurl”消息。有任何想法吗?

最佳答案

经过更深入的研究之后,我确定cgminer的configure文件在测试libcurl时没有关注LDFLAGSCPPFLAGS。而是检查LIBCURL_CFLAGSLIBCURL_LIBS。因此,我尝试:

export LIBCURL_CFLAGS=-I/usr/local/opt/curl/include
export LIBCURL_LIBS=-L/usr/local/opt/curl/lib
./configure

我得到:
checking for LIBCURL... yes

其余的配置顺利进行。成功!

关于libcurl - 如何为./configure指定LDFLAGS和CPPFLAGS?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16246352/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com