diff options
author | NRK <nrk@disroot.org> | 2023-07-08 08:53:57 +0200 |
---|---|---|
committer | NRK <nrk@disroot.org> | 2023-07-08 08:53:57 +0200 |
commit | 9b122c82fac0f27f8fbde22b818cfa8befaaf405 (patch) | |
tree | e1b9abf70e6f0b6e946b4960bcd78e7eb43799c4 /options.c | |
parent | bfab3a76a420eada64d8fcddea7f5ead4819408f (diff) | |
download | nsxiv-9b122c82fac0f27f8fbde22b818cfa8befaaf405.tar.zst |
add compiled features into --version output (#462)
a lot of application which allow selecting features at build time seem
to output the build config with `--version` or similar (e.g ffmpeg).
aside from giving the user information about the feature set the binary
was compiled with (in case the user didn't compile it themselves, e.g on
a binary distro) it can also (possibly) help when submitting bug
reports.
Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/462
Reviewed-by: explosion-mental <explosion-mental@noreply.codeberg.org>
Diffstat (limited to 'options.c')
-rw-r--r-- | options.c | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -50,6 +50,27 @@ void print_usage(void) static void print_version(void) { printf("%s %s\n", progname, VERSION); + fputs("features: " +#if HAVE_INOTIFY + "+inotify " +#endif +#if HAVE_LIBFONTS + "+statusbar " +#endif +#if HAVE_LIBEXIF + "+exif " +#endif +#if HAVE_IMLIB2_MULTI_FRAME + "+multiframe " +#else + #if HAVE_LIBGIF + "+giflib " + #endif + #if HAVE_LIBWEBP + "+libwebp " + #endif +#endif + "\n", stdout); } void parse_options(int argc, char **argv) |