version: teach --build-options to reports libcurl version information

Show LIBCURL_VERSION, if defined, in "git version --build-options"
output.

Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Randall S. Becker 2024-06-21 14:09:46 -04:00 committed by Junio C Hamano
parent 8b731b8d06
commit 2e2203163d
1 changed files with 7 additions and 0 deletions

7
help.c
View File

@ -15,6 +15,10 @@
#include "prompt.h"
#include "fsmonitor-ipc.h"

#ifndef NO_CURL
#include "git-curl-compat.h" /* For LIBCURL_VERSION only */
#endif

struct category_description {
uint32_t category;
const char *desc;
@ -757,6 +761,9 @@ void get_version_info(struct strbuf *buf, int show_build_options)

if (fsmonitor_ipc__is_supported())
strbuf_addstr(buf, "feature: fsmonitor--daemon\n");
#if defined LIBCURL_VERSION
strbuf_addf(buf, "libcurl: %s\n", LIBCURL_VERSION);
#endif
#if defined OPENSSL_VERSION_TEXT
strbuf_addf(buf, "OpenSSL: %s\n", OPENSSL_VERSION_TEXT);
#endif