From dff176e2f04c67bf8f4fc1800bd750dca17abeae Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 23 Sep 2021 14:09:35 +0200 Subject: [PATCH] meson: make raw(7) optional Fixes: https://github.com/karelzak/util-linux/issues/1442 Signed-off-by: Karel Zak --- meson.build | 4 +++- meson_options.txt | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index cac9da5ab..9325066f4 100644 --- a/meson.build +++ b/meson.build @@ -160,7 +160,6 @@ headers = ''' linux/gsmmux.h linux/net_namespace.h linux/nsfs.h - linux/raw.h linux/securebits.h linux/tiocl.h linux/version.h @@ -1897,6 +1896,9 @@ if not is_disabler(exe) endif opt = not get_option('build-raw').disabled() +if opt + cc.has_header('xlinux/raw.h', required: opt) +endif exe = executable( 'raw', raw_sources, diff --git a/meson_options.txt b/meson_options.txt index 7542c3825..64c9924a2 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -124,7 +124,7 @@ option('build-line', type : 'feature', description : 'build line') option('build-mesg', type : 'feature', description : 'build mesg') -option('build-raw', type : 'feature', +option('build-raw', type : 'feature', value : 'disabled', description : 'build raw') option('build-rename', type : 'feature', description : 'build rename')