web-dev-qa-db-ja.com

./configureにLDFLAGSとCPPFLAGSを指定するにはどうすればよいですか?

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

したがって、homebrewを使用してlibcurlの最新バージョンをインストールしました。

brew install curl

それはseemedトリックを行うためです。私はこのメッセージを受け取りました:

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

「missing required libcurl」メッセージがまだ表示されています。何か案は?

19
Ben Harold

さらに徹底的な調査を行った結果、cgminerのconfigureファイルは、libcurlのテスト時にLDFLAGSまたはCPPFLAGSに注意を払わないと判断しました。代わりに、LIBCURL_CFLAGSおよびLIBCURL_LIBS。だから、私は試しました:

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

そして私は得た:

checking for LIBCURL... yes

そして、残りの構成は問題なく終了しました。成功!

43
Ben Harold