mirror of
https://github.com/labwc/labwc.git
synced 2026-02-28 01:40:29 -05:00
main: add feature flags to --version
This commit is contained in:
parent
e0d1dc436d
commit
ca01dcaa95
1 changed files with 15 additions and 1 deletions
16
src/main.c
16
src/main.c
|
|
@ -52,6 +52,20 @@ usage(void)
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
print_version(void)
|
||||||
|
{
|
||||||
|
#define FEATURE_ENABLED(feature) (HAVE_##feature ? "+" : "-")
|
||||||
|
printf("labwc %s (%sxwayland %snls %srsvg %slibsfdo)\n",
|
||||||
|
LABWC_VERSION,
|
||||||
|
FEATURE_ENABLED(XWAYLAND),
|
||||||
|
FEATURE_ENABLED(NLS),
|
||||||
|
FEATURE_ENABLED(RSVG),
|
||||||
|
FEATURE_ENABLED(LIBSFDO)
|
||||||
|
);
|
||||||
|
#undef FEATURE_ENABLED
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
die_on_detecting_suid(void)
|
die_on_detecting_suid(void)
|
||||||
{
|
{
|
||||||
|
|
@ -175,7 +189,7 @@ main(int argc, char *argv[])
|
||||||
primary_client = optarg;
|
primary_client = optarg;
|
||||||
break;
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
printf("labwc " LABWC_VERSION "\n");
|
print_version();
|
||||||
exit(0);
|
exit(0);
|
||||||
case 'V':
|
case 'V':
|
||||||
verbosity = WLR_INFO;
|
verbosity = WLR_INFO;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue