[gimp] Issue #8604: Linux Input is enabled even though it is not Linux.



commit a78651aca45ca4bac8d1b88cdcdd56285a7f1a50
Author: Jehan <jehan girinstud io>
Date:   Sat Sep 10 14:49:38 2022 +0200

    Issue #8604: Linux Input is enabled even though it is not Linux.
    
    Fix the Linux Input test to correctly only depend on whether or not the
    header is present. Having X11 target is not enough (e.g. it breaks the
    build for NetBSD and probably on all BSDs).

 meson.build | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/meson.build b/meson.build
index e777f5e6dc..57a25411f1 100644
--- a/meson.build
+++ b/meson.build
@@ -852,15 +852,23 @@ endif
 alsa = dependency('alsa', version: '>=1.0.0', required: get_option('alsa'))
 conf.set('HAVE_ALSA', alsa.found())
 
+# Linux Input
 
 if get_option('linux-input').disabled()
   have_linuxinput = false
-elif get_option('linux-input').enabled() and not cc.has_header('linux/input.h')
-  error('linux/input.h header not found.')
 else
-  have_linuxinput = x11_target
+  have_linuxinput = cc.has_header('linux/input.h',
+                                  required: get_option('linux-input'))
 endif
 
+if have_linuxinput
+  gudev = dependency('gudev-1.0', version: '>=167', required: get_option('gudev'))
+else
+  gudev = no_dep
+endif
+conf.set('HAVE_LIBGUDEV', gudev.found())
+
+
 # DirectX DirectInput
 directx = no_dep
 directx_sdk_path = get_option('directx-sdk-dir')
@@ -881,9 +889,6 @@ if directx_sdk_path != '' and platform_windows
 endif
 conf.set('HAVE_DX_DINPUT', directx.found())
 
-gudev = dependency('gudev-1.0', version: '>=167', required: get_option('gudev'))
-conf.set('HAVE_LIBGUDEV', gudev.found())
-
 
 ################################################################################
 # Email sending


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]