[PATCH xserver 06/10] meson: Make ACPI support optional

Laurent Carlier lordheavym at gmail.com
Sun Feb 18 09:58:37 UTC 2018


Signed-off-by: Laurent Carlier <lordheavym at gmail.com>
---
 hw/xfree86/meson.build |  4 ++++
 include/meson.build    |  2 +-
 meson.build            | 11 ++++++++++-
 meson_options.txt      |  2 ++
 4 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/hw/xfree86/meson.build b/hw/xfree86/meson.build
index 8fc53e4..f1688c3 100644
--- a/hw/xfree86/meson.build
+++ b/hw/xfree86/meson.build
@@ -18,6 +18,10 @@ xorg_c_args = []
 xorg_c_args += '-DHAVE_XORG_CONFIG_H'
 xorg_c_args += '-DXORG_NO_SDKSYMS'
 
+if build_acpi
+    xorg_c_args += '-DHAVE_ACPI'
+endif
+
 pciaccess_dep = []
 if get_option('pciaccess')
     pciaccess_dep = dependency('pciaccess', version: '>= 0.12.901')
diff --git a/include/meson.build b/include/meson.build
index 2c365c0..3bb3b72 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -255,7 +255,7 @@ xorg_data.set('XSERVER_LIBPCIACCESS', get_option('pciaccess'))
 xorg_data.set_quoted('PCI_TXT_IDS_PATH', '')
 xorg_data.set('XSERVER_PLATFORM_BUS', build_udev)
 xorg_data.set('WSCONS_SUPPORT', host_machine.system() == 'netbsd' or host_machine.system() == 'openbsd')
-xorg_data.set('XF86PM', build_apm)
+xorg_data.set('XF86PM', build_apm or build_acpi)
 
 if host_machine.system() == 'freebsd' or host_machine.system() == 'dragonflybsd'
     if host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64'
diff --git a/meson.build b/meson.build
index c7d9228..107c055 100644
--- a/meson.build
+++ b/meson.build
@@ -377,8 +377,17 @@ if (get_option('linux_apm') == true and
     endif
 endif
 
-# XXX: Allow configuration of these.
 build_acpi = false
+if (get_option('linux_acpi') == true and
+   host_machine.system() == 'linux')
+    if (host_machine.cpu() == 'x86' or
+       host_machine.cpu() == 'x86_64' or
+       host_machine.cpu() == 'ia64')
+        build_acpi = true
+    endif
+endif
+
+# XXX: Allow configuration of these.
 build_mitshm = true
 build_xselinux = false
 build_xf86vidmode = xf86vidmodeproto_dep.found()
diff --git a/meson_options.txt b/meson_options.txt
index 54cf61d..c674d75 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -79,6 +79,8 @@ option('dga', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
        description: 'DGA extension')
 option('linux_apm', type: 'boolean', value: true,
        description: 'APM support on Linux')
+option('linux_acpi', type: 'boolean', value: true,
+       description: 'ACPI support on Linux')
 
 option('dri1', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Build DRI1 extension (default: auto)')
 option('dri2', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Build DRI2 extension (default: auto)')
-- 
2.16.2



More information about the xorg-devel mailing list