meson: Make sed optional
authorPeter Eisentraut <peter@eisentraut.org>
Thu, 21 Dec 2023 07:40:32 +0000 (08:40 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Thu, 21 Dec 2023 09:10:05 +0000 (10:10 +0100)
sed is used only if dtrace or selinux are enabled.  Those options are
only used on Unix platforms, which should have sed.  But we don't want
to make sed a hard requirement on Windows, which was the case in meson
until now.

This just changes sed to be not-required by meson.  If you happen to
use a system with, say, dtrace but without sed, you might get a
slightly complicated error from meson during the build, but that seems
better than making the requiredness a complicated conditional that
will need to be maintained.

Discussion: https://www.postgresql.org/message-id/flat/ZQzp_VMJcerM1Cs_%40paquier.xyz

meson.build

index f816283301778c8b8dd5270d7ab3b15c3dc43655..3162d0343bd0a44f6c16c1ded7cefe09f3182612 100644 (file)
@@ -331,7 +331,7 @@ perl = find_program(get_option('PERL'), required: true, native: true)
 python = find_program(get_option('PYTHON'), required: true, native: true)
 flex = find_program(get_option('FLEX'), native: true, version: '>= 2.5.35')
 bison = find_program(get_option('BISON'), native: true, version: '>= 2.3')
-sed = find_program(get_option('SED'), 'sed', native: true)
+sed = find_program(get_option('SED'), 'sed', native: true, required: false)
 prove = find_program(get_option('PROVE'), native: true, required: false)
 tar = find_program(get_option('TAR'), native: true)
 gzip = find_program(get_option('GZIP'), native: true)