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>

Randall S. Becker committed Jun 21, 2024 at 14:09 UTC 2e2203163df8640a9c66de663fd6337ceee710c8
1 file changed +7
help.c
+7
@@ -15,6 +15,10 @@
15 #include "prompt.h"
16 #include "fsmonitor-ipc.h"
17
18 +#ifndef NO_CURL
19 +#include "git-curl-compat.h" /* For LIBCURL_VERSION only */
20 +#endif
21 +
22 struct category_description {
23 uint32_t category;
24 const char *desc;
@@ -757,6 +761,9 @@ void get_version_info(struct strbuf *buf, int show_build_options)
761
762 if (fsmonitor_ipc__is_supported())
763 strbuf_addstr(buf, "feature: fsmonitor--daemon\n");
764 +#if defined LIBCURL_VERSION
765 + strbuf_addf(buf, "libcurl: %s\n", LIBCURL_VERSION);
766 +#endif
767 #if defined OPENSSL_VERSION_TEXT
768 strbuf_addf(buf, "OpenSSL: %s\n", OPENSSL_VERSION_TEXT);
769 #endif