]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
build: enable solaris_console_owner_file by default on Solaris & illumos
authorAlan Coopersmith <alan.coopersmith@oracle.com>
Tue, 12 Aug 2025 22:00:14 +0000 (15:00 -0700)
committerSimon McVittie <smcv@collabora.com>
Tue, 19 Aug 2025 12:34:00 +0000 (12:34 +0000)
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>
meson.build
meson_options.txt

index bcac037028c2eedd2a1460189adbb4ea3445e185..17167c8016852143d0ae8a7cbeda648185a40cc7 100644 (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)
 
index 38ff03220d6dfaa016b111876cd3d37677b0d47d..6f382437931a1dac64c9081039a67a1d66bdbf5d 100644 (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")'
 )