簡體   English   中英

lib_curl 依賴與 autoconf

[英]lib_curl dependency with autoconf

在我的 autoconf 中,我們需要添加 CURL 庫的依賴項。

我們正在使用 curl 存儲庫中提供的這個 m4 文件來添加依賴宏: https : //github.com/curl/curl/blob/master/docs/libcurl/libcurl.m4

在 configure.ac 中,我們使用這個 end 宏來檢查 libcurl,

LIBCURL_CHECK_CONFIG([], AC_MSG_FAILURE([LibCurl not found it is must for this install]))

但是生成的配置腳本在執行時會出現以下錯誤,

config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
checking for gawk... (cached) gawk
checking for curl-config... /usr/bin/curl-config
checking for the version of libcurl... 7.68.0
./configure: command substitution: line 5176: syntax error near unexpected token `}'
./configure: command substitution: line 5176: `$as_echo "$as_me: error: in `$ac_pwd':" >&2;}'
./configure: line 5177: test: -gt: unary operator expected
./configure: line 5201: test: -eq: unary operator expected

任何可能出錯的指針,因為代碼中沒有什么特別的,而是一個簡單的 helloworld c

忘了貼我們找到的解決方案,LibCURL檢查的正確語法如下,使用時解決了問題

LIBCURL_CHECK_CONFIG ([DEFAULT-ACTION], [MINIMUM-VERSION], [ACTION-IF-YES], [ACTION-IF-NO])

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM