]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
build-aux: simplify grep detection on FreeBSD
authorAlexey Dokuchaev <danfe@FreeBSD.org>
Tue, 20 May 2025 17:23:52 +0000 (19:23 +0200)
committerRoman Bogorodskiy <bogorodskiy@gmail.com>
Wed, 21 May 2025 16:57:21 +0000 (18:57 +0200)
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 <danfe@FreeBSD.org>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
build-aux/meson.build

index bcd10e89f2f4d26170ec821c53fd67683d006707..56c91971cfe4d1b7f1553e116d41256339c7934c 100644 (file)
@@ -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