From: Alexey Dokuchaev <da...@freebsd.org>

For quite some time now FreeBSD provides its own version of the grep(1)
tool, and the GNU grep from the ports collection is available as
ggrep(1). So remove the detection code and just request ggrep.

Signed-off-by: Alexey Dokuchaev <da...@freebsd.org>
---
 build-aux/meson.build | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/build-aux/meson.build b/build-aux/meson.build
index bcd10e89f2..56c91971cf 100644
--- a/build-aux/meson.build
+++ b/build-aux/meson.build
@@ -13,23 +13,10 @@ if git and tests_enabled[0]
   if host_machine.system() == 'freebsd' or host_machine.system() == 'darwin'
     make_prog = find_program('gmake')
     sed_prog = find_program('gsed')
+    grep_prog = find_program('ggrep')
   else
     make_prog = find_program('make')
     sed_prog = find_program('sed')
-  endif
-
-  if host_machine.system() == 'freebsd'
-    grep_prog = find_program('grep')
-    grep_cmd = run_command(grep_prog, '--version', check: true)
-    if grep_cmd.stdout().startswith('grep (BSD grep')
-      grep_prog = find_program('/usr/local/bin/grep', required: false)
-      if not grep_prog.found()
-        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.49.0

Reply via email to