【问题标题】:lib_curl dependency with autoconflib_curl 与 autoconf 的依赖关系
【发布时间】:2021-09-04 15:38:13
【问题描述】:

在我的 autoconf 中,我们需要添加 CURL 库的依赖项。

我们正在使用 curl repo 提供的这个 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

【问题讨论】:

    标签: c curl libcurl autoconf


    【解决方案1】:

    忘记贴我们找到的解决方案,LibCURL检查的正确语法如下,使用时解决了问题

    LIBCURL_CHECK_CONFIG ([DEFAULT-ACTION], [MINIMUM-VERSION], [动作-如果-是],[动作-如果-否])

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-12-28
      • 1970-01-01
      • 2015-05-23
      • 2018-12-01
      • 2018-05-24
      • 1970-01-01
      • 2010-10-06
      相关资源
      最近更新 更多