繁体   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