$ meson --version 1.2.2
Its an autotoolsism, use "1" for true but "false" for, well false, and older mesons accepted it, but modern meson doesn't, at least https://github.com/geany/geany/blob/0fd68e4182bf2540249810da52382e2f1c4810aa... and https://github.com/geany/geany/blob/0fd68e4182bf2540249810da52382e2f1c4810aa...
Actually, its has nothing to do with the Meson version I think, it's just that `fnmatch` isn't found on the OP system, and the code uses either [`cfg_data.set(varname, 1)`](https://mesonbuild.com/Reference-manual_returned_cfg_data.html#cfg_dataset) or [`cfg_data.set(name, false)`](https://mesonbuild.com/Reference-manual_returned_cfg_data.html#cfg_dataset) depending on whether it's found or not, so it doesn't have the same type in both cases when fetching it with [`cfg_data.get()`](https://mesonbuild.com/Reference-manual_returned_cfg_data.html#cfg_dataget).
Maybe something like this would be a solution (disclaimer: thoroughly untested): ```diff diff --git a/meson.build b/meson.build index 5c7bc0a04..0d714d391 100644 --- a/meson.build +++ b/meson.build @@ -94,8 +94,6 @@ foreach h : check_headers define = 'HAVE_' + h.underscorify().to_upper() if cc.has_header(h) cdata.set(define, 1) - else - cdata.set(define, false) endif endforeach
@@ -104,8 +102,6 @@ foreach f : check_functions ccprefix = '\n'.join([gnu_source ? '#define _GNU_SOURCE' : '', f.get(1)]) if cc.has_function(f.get(0), prefix: ccprefix, dependencies: deps) cdata.set(define, 1) - else - cdata.set(define, false) endif endforeach
@@ -127,10 +123,8 @@ cdata.set_quoted('PACKAGE_VERSION', meson.project_version()) cdata.set('GETTEXT_PACKAGE', 'PACKAGE') cdata.set('VERSION', meson.project_version()) cdata.set('ENABLE_NLS', 1) -if (host_machine.system() == 'windows') - cdata.set('HAVE_VTE', false) -else - cdata.set('HAVE_VTE', get_option('vte')) +if (host_machine.system() != 'windows' and get_option('vte')) + cdata.set('HAVE_VTE', 1) endif cdata.set('HAVE_PLUGINS', get_option('plugins')) cdata.set('HAVE_SOCKET', get_option('socket')) @@ -443,7 +437,7 @@ dep_scintilla = declare_dependency( include_directories: include_directories('scintilla/include') )
-if cdata.get('HAVE_FNMATCH') == 1 +if cdata.get('HAVE_FNMATCH', 0) == 1 dep_fnmatch = dependency('', required: false) else # use fnmatch bundled with ctags @@ -456,7 +450,7 @@ else dep_fnmatch = declare_dependency(link_with: [fnmatch], include_directories: [ifnmatch]) endif
-if cdata.get('HAVE_REGCOMP') == 1 +if cdata.get('HAVE_REGCOMP', 0) == 1 dep_regex = dependency('', required: false) else # use regcomp bundled with ctags ``` The difference is that it doesn't generate *anything* for the unset values, not even `#undef`s.
Closed #3618 as completed via 215271b02dbfa13e54bee77b6d3a8a76ec1fad68.
github-comments@lists.geany.org