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

Laurent Carlier lordheavym at gmail.com
Thu Mar 1 11:56:28 UTC 2018


v2: Define HAVE_ACPI in dix-config.h

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

diff --git a/include/meson.build b/include/meson.build
index 45d2777..c559732 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -199,6 +199,7 @@ conf_data.set('XvMCExtension', build_xvmc)
 conf_data.set('HAVE_SHA1_IN_LIBNETTLE', '1') # XXX
 
 conf_data.set('HAVE_APM', build_apm or build_acpi)
+conf_data.set('HAVE_ACPI', build_acpi)
 
 enable_debugging = get_option('buildtype') == 'debug'
 conf_data.set('DEBUG', enable_debugging)
@@ -257,7 +258,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