build-sys: omit mustach compilation when it cannot work

For example mac does not have open_memstream(3), and strndupa(3) can also be
missing.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2017-11-11 16:13:14 +00:00
parent b96f8cd8ad
commit 39b2811aa7
No known key found for this signature in database
GPG key ID: A9553245FDE9B739
6 changed files with 31 additions and 4 deletions

View file

@ -127,7 +127,9 @@ int main(int argc, char **argv)
{"reverse", no_argument, NULL, 'r'},
{"output", required_argument, NULL, 'o'},
{"limit", required_argument, NULL, 'L'},
#ifdef BUILD_MUSTACH
{"mustach", required_argument, NULL, OPT_MUSTACH},
#endif
{"version", no_argument, NULL, 'v'},
{"help", no_argument, NULL, 'h'},
{"snet-alarms", no_argument, NULL, OPT_SNET_ALARMS},
@ -227,10 +229,12 @@ int main(int argc, char **argv)
config.header_limit = return_limit(optarg[0]);
config.number_limit = return_limit(optarg[1]);
break;
#ifdef BUILD_MUSTACH
case OPT_MUSTACH:
config.mustach_template = optarg;
output_format = 'm';
break;
#endif
case OPT_COLOR:
config.color_mode = parse_color_mode(optarg);
if (config.color_mode == color_unknown)