macOS is similar to FreeBSD in that it ships non-GNU versions of several base utilities that we need in the base system. macOS actually includes GNU make already, but unfortunately due to licensing reasons the tool is permanently stuck in 2006, so even in that case users are better off installing a recent version from Homebrew along with the dozens of other libvirt dependencies that already need to be obtained that way. Note that, unlike FreeBSD ports, Homebrew is fully consistent in adding the 'g' prefix to the name of the GNU tools, so we can detect GNU grep without additional hacks. Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx> --- build-aux/meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build-aux/meson.build b/build-aux/meson.build index fe88d6b736..1095982397 100644 --- a/build-aux/meson.build +++ b/build-aux/meson.build @@ -10,7 +10,7 @@ syntax_check_conf.set('flake8_path', flake8_path) syntax_check_conf.set('runutf8', ' '.join(runutf8)) syntax_check_conf.set('PYTHON3', python3_prog.path()) -if host_machine.system() == 'freebsd' +if host_machine.system() == 'freebsd' or host_machine.system() == 'darwin' make_prog = find_program('gmake') sed_prog = find_program('gsed') else @@ -31,6 +31,8 @@ if host_machine.system() == 'freebsd' error('GNU grep not found') endif endif +elif host_machine.system() == 'darwin' + grep_prog = find_program('ggrep') else grep_prog = find_program('grep') endif -- 2.26.3