meson: Make APM support optional

v2: Define HAVE_APM in dix-config.h

Signed-off-by: Laurent Carlier <lordheavym@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Laurent Carlier 2018-03-01 12:55:11 +01:00 committed by Adam Jackson
parent 2af0a50a4b
commit 238219e731
3 changed files with 13 additions and 1 deletions

View File

@ -198,6 +198,8 @@ 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)
enable_debugging = get_option('buildtype') == 'debug'
conf_data.set('DEBUG', enable_debugging)
@ -255,6 +257,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)
if host_machine.system() == 'freebsd' or host_machine.system() == 'dragonflybsd'
if host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64'

View File

@ -369,8 +369,15 @@ elif get_option('dga') == 'true'
build_dga = true
endif
# XXX: Allow configuration of these.
build_apm = false
if (get_option('linux_apm') == true and
host_machine.system() == 'linux')
if cc.has_header('linux/apm_bios.h')
build_apm = true
endif
endif
# XXX: Allow configuration of these.
build_acpi = false
build_mitshm = true
build_xselinux = false

View File

@ -77,6 +77,8 @@ option('xvmc', type: 'boolean', value: true,
description: 'XvMC extension')
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('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)')