Add compile-in flag to program version output.

Then we can check if tools are compiled with a support for specific
extension/library.
This commit is contained in:
Milan Broz
2022-04-14 13:59:32 +02:00
parent 3363bad8c2
commit ebabf3ffee
5 changed files with 36 additions and 7 deletions

View File

@@ -2899,8 +2899,7 @@ static void help(poptContext popt_context,
struct action_type *action;
const struct crypt_pbkdf_type *pbkdf_luks1, *pbkdf_luks2;
log_std("%s\n",PACKAGE_STRING);
tools_package_version(PACKAGE_NAME, true);
poptPrintHelp(popt_context, stdout, 0);
log_std(_("\n"
@@ -2958,7 +2957,7 @@ static void help(poptContext popt_context,
poptFreeContext(popt_context);
exit(EXIT_SUCCESS);
} else if (key->shortName == 'V') {
log_std("%s %s\n", PACKAGE_NAME, PACKAGE_VERSION);
tools_package_version(PACKAGE_NAME, true);
tools_cleanup();
poptFreeContext(popt_context);
exit(EXIT_SUCCESS);