From: Alan Coopersmith Date: Tue, 12 Aug 2025 22:00:14 +0000 (-0700) Subject: build: enable solaris_console_owner_file by default on Solaris & illumos X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=095c199e04dd3cce301e42b0625c95528a5795ef;p=thirdparty%2Fdbus.git build: enable solaris_console_owner_file by default on Solaris & illumos Makes the meson config match what the autotools config used to do. v2: include changes suggested by @smcv to allow disabling if desired Signed-off-by: Alan Coopersmith --- diff --git a/meson.build b/meson.build index bcac03702..17167c801 100644 --- a/meson.build +++ b/meson.build @@ -579,16 +579,22 @@ endif have_console_owner_file = false console_owner_file = get_option('solaris_console_owner_file') + +if console_owner_file == 'auto' + if platform_sunos + console_owner_file = '/dev/console' + else + console_owner_file = '' + endif +endif + if console_owner_file != '' if not platform_sunos error('solaris_console_owner_file is only supported on Solaris or illumos') endif have_console_owner_file = true - if console_owner_file == 'auto' - console_owner_file = '/dev/console' - else - endif endif + config.set('HAVE_CONSOLE_OWNER_FILE', have_console_owner_file) config.set_quoted('DBUS_CONSOLE_OWNER_FILE', console_owner_file) diff --git a/meson_options.txt b/meson_options.txt index 38ff03220..6f3824379 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -209,7 +209,7 @@ option( option( 'solaris_console_owner_file', type: 'string', - value: '', + value: 'auto', description: 'File to determine current console owner on Solaris (or "auto")' )