diff --git a/include/meson.build b/include/meson.build index 45d27774a..c5597321d 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 6a671587e..8e17c4f82 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 54cf61d78..c674d750a 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)')