diff options
author | Alex Xu (Hello71) <alex_y_xu@yahoo.ca> | 2021-10-08 09:51:10 -0400 |
---|---|---|
committer | Ran Benita <ran@unusedvar.com> | 2021-12-05 12:55:51 +0200 |
commit | 8531ea723fde41062a2cda7a5b75a01716e30a78 (patch) | |
tree | 4a867c0f9b792adeae125c586fb582b23ce0fa64 | |
parent | 50a24569b88f5cc07f4d382f05fea2dd5e073bf8 (diff) | |
download | xorg-lib-libxkbcommon-8531ea723fde41062a2cda7a5b75a01716e30a78.tar.gz |
build: add enable-tools option
this is mainly useful for multilib, but may be useful for other users as well
Signed-off-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
-rw-r--r-- | meson.build | 4 | ||||
-rw-r--r-- | meson_options.txt | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/meson.build b/meson.build index 590cf1d..2aa74c3 100644 --- a/meson.build +++ b/meson.build @@ -125,8 +125,6 @@ elif cc.has_header_symbol('stdlib.h', '__secure_getenv', prefix: system_ext_defi else message('C library does not support secure_getenv, using getenv instead') endif -have_getopt_long = cc.has_header_symbol('getopt.h', 'getopt_long', - prefix: '#define _GNU_SOURCE') if not cc.has_header_symbol('limits.h', 'PATH_MAX', prefix: system_ext_define) if host_machine.system() == 'windows' # see https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#maximum-path-length-limitation @@ -406,7 +404,7 @@ endif man_pages = [] # Tools -build_tools = have_getopt_long +build_tools = get_option('enable-tools') and cc.has_header_symbol('getopt.h', 'getopt_long', prefix: '#define _GNU_SOURCE') if build_tools libxkbcommon_tools_internal = static_library( 'tools-internal', diff --git a/meson_options.txt b/meson_options.txt index 04982c6..69850b8 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -44,6 +44,12 @@ option( description: 'Default XKB options', ) option( + 'enable-tools', + type: 'boolean', + value: true, + description: 'Enable building tools', +) +option( 'enable-x11', type: 'boolean', value: true, @@ -59,7 +65,7 @@ option( 'enable-wayland', type: 'boolean', value: true, - description: 'Enable support for Wayland utility programs', + description: 'Enable support for Wayland utility programs (requires enable-tools)', ) option( 'enable-xkbregistry', |