diff options
author | Victor Toso <me@victortoso.com> | 2018-10-16 17:17:05 +0200 |
---|---|---|
committer | David Heidelberg <david@ixit.cz> | 2018-10-16 18:51:09 +0200 |
commit | bf0530d807f46659dd899ec02870bf5006c12313 (patch) | |
tree | 8c716249bd1677b5563d6e845d9e42a46f3645e5 | |
parent | 340036f7cb8e7f1203561745d3c34d3621ef6906 (diff) | |
download | iputils-bf0530d807f46659dd899ec02870bf5006c12313.tar.gz |
build-sys: Check if optional idn2 was found
In systems without the headers for idn2, the build is failing as we
always set USE_IDN to 1.
Signed-off-by: Victor Toso <victortoso@redhat.com>
-rw-r--r-- | meson.build | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/meson.build b/meson.build index 2943fb9..142ebe9 100644 --- a/meson.build +++ b/meson.build @@ -69,8 +69,10 @@ endif opt = get_option('USE_IDN') if opt == true idn_dep = cc.find_library('idn2', required : false) - add_project_arguments('-DUSE_IDN', language : 'c') - conf.set('USE_IDN', 1, description : 'If set use Internationalized Domain Name library.') + if idn_dep.found() + add_project_arguments('-DUSE_IDN', language : 'c') + conf.set('USE_IDN', 1, description : 'If set use Internationalized Domain Name library.') + endif else idn_dep = dependency('disabler-appears-to-disable-executable-build', required : false) endif |