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 <alan.coopersmith@oracle.com>
This commit is contained in:
Alan Coopersmith 2025-08-12 15:00:14 -07:00 committed by Simon McVittie
parent 6cda1e82a1
commit 095c199e04
2 changed files with 11 additions and 5 deletions

View file

@ -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)

View file

@ -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")'
)