# Clear list and try to detect available protocols
set(_items)
_add_if("HTTP" NOT CURL_DISABLE_HTTP)
+ _add_if("IPFS" NOT CURL_DISABLE_HTTP)
+ _add_if("IPNS" NOT CURL_DISABLE_HTTP)
_add_if("HTTPS" NOT CURL_DISABLE_HTTP AND SSL_ENABLED)
_add_if("FTP" NOT CURL_DISABLE_FTP)
_add_if("FTPS" NOT CURL_DISABLE_FTP AND SSL_ENABLED)
dnl For supported protocols in pkg-config file
if test "x$CURL_DISABLE_HTTP" != "x1"; then
- SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTP"
+ SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTP IPFS IPNS"
if test "x$SSL_ENABLED" = "x1"; then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTPS"
fi
printf("Release-Date: %s\n", LIBCURL_TIMESTAMP);
#endif
if(built_in_protos[0]) {
+ const char *insert = NULL;
+ /* we have ipfs and ipns support if libcurl has http support */
+ for(builtin = built_in_protos; *builtin; ++builtin) {
+ if(insert) {
+ /* update insertion so ipfs will be printed in alphabetical order */
+ if(strcmp(*builtin, "ipfs") < 0)
+ insert = *builtin;
+ else
+ break;
+ }
+ else if(!strcmp(*builtin, "http")) {
+ insert = *builtin;
+ }
+ }
printf("Protocols:");
for(builtin = built_in_protos; *builtin; ++builtin) {
/* Special case: do not list rtmp?* protocols.
They may only appear together with "rtmp" */
if(!curl_strnequal(*builtin, "rtmp", 4) || !builtin[0][4])
printf(" %s", *builtin);
+ if(insert && insert == *builtin) {
+ printf(" ipfs ipns");
+ insert = NULL;
+ }
}
puts(""); /* newline */
}