display compilation options (WITH_ flags)
Showing
1 changed file
with
24 additions
and
1 deletions
... | @@ -21,10 +21,33 @@ | ... | @@ -21,10 +21,33 @@ |
21 | * ve[rsion] | 21 | * ve[rsion] |
22 | */ | 22 | */ |
23 | 23 | ||
24 | static char *with_defs[] = | ||
25 | { | ||
26 | #ifdef WITH_PTHREAD | ||
27 | "PTHREAD", | ||
28 | #endif | ||
29 | #ifdef WITH_BDB2 | ||
30 | "BDB2", | ||
31 | #endif | ||
32 | #ifdef WITH_READLINE | ||
33 | "READLINE", | ||
34 | #endif | ||
35 | NULL | ||
36 | }; | ||
37 | |||
24 | 38 | ||
25 | int | 39 | int |
26 | mail_version (int argc, char **argv) | 40 | mail_version (int argc, char **argv) |
27 | { | 41 | { |
28 | fprintf (ofile, "%s\n", argp_program_version); | 42 | fprintf (ofile, "%s", argp_program_version); |
43 | if (with_defs[0] != NULL) | ||
44 | { | ||
45 | int i; | ||
46 | fprintf (ofile, " ("); | ||
47 | for (i = 0; with_defs[i]; i++) | ||
48 | fprintf (ofile, " %s", with_defs[i]); | ||
49 | fprintf (ofile, " )"); | ||
50 | } | ||
51 | fprintf (ofile, "\n"); | ||
29 | return 0; | 52 | return 0; |
30 | } | 53 | } | ... | ... |
-
Please register or sign in to post a comment