简体   繁体   中英

lib_curl dependency with autoconf

In my autoconf we need to add dependency of CURL Library.

we are using this m4 file available at curl repo for adding dependency macro: https://github.com/curl/curl/blob/master/docs/libcurl/libcurl.m4

In configure.ac, we are using this end macro to check for libcurl,

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

however the configure script generated, gives below errors when executed,

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

Any pointers what could be wrong, as there is nothing special in the code, rather a plain helloworld c

forgot to post the solution we found, the correct syntax of LibCURL check is as below, when used, it solved the issue

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM