diff options
author | Adam Jackson <ajax@redhat.com> | 2018-10-30 11:37:32 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2019-01-16 19:50:15 +0000 |
commit | 6c1d720047b193f138e877e994cb4a4fb8e73753 (patch) | |
tree | e07ef8d12f91e5405f429dfb077beb164c7503c8 /hw/xfree86/os-support | |
parent | 1e3f9ea14cced2ee894d072c977507ad43cb59c5 (diff) |
agp: Make the legacy AGP interface optional
The only thing using this anymore is the i810 driver, so this can safely
be disabled on non-i686 builds.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'hw/xfree86/os-support')
-rw-r--r-- | hw/xfree86/os-support/linux/Makefile.am | 9 | ||||
-rw-r--r-- | hw/xfree86/os-support/meson.build | 16 |
2 files changed, 20 insertions, 5 deletions
diff --git a/hw/xfree86/os-support/linux/Makefile.am b/hw/xfree86/os-support/linux/Makefile.am index 7d4cf4222..4392fe8d4 100644 --- a/hw/xfree86/os-support/linux/Makefile.am +++ b/hw/xfree86/os-support/linux/Makefile.am @@ -24,15 +24,20 @@ LOGIND_SRCS = systemd-logind.c XORG_CFLAGS += $(DBUS_CFLAGS) endif +if AGP +AGP_SRCS = lnx_agp.c +endif + liblinux_la_SOURCES = linux.h lnx_init.c lnx_video.c \ - lnx_agp.c lnx_kmod.c lnx_bell.c lnx_platform.c \ + lnx_kmod.c lnx_bell.c lnx_platform.c \ $(srcdir)/../shared/VTsw_usl.c \ $(srcdir)/../shared/posix_tty.c \ $(srcdir)/../shared/vidmem.c \ $(srcdir)/../shared/sigio.c \ $(ACPI_SRCS) \ $(APM_SRCS) \ - $(LOGIND_SRCS) + $(LOGIND_SRCS) \ + $(AGP_SRCS) AM_CFLAGS = -DHAVE_SYSV_IPC $(DIX_CFLAGS) $(XORG_CFLAGS) $(PLATFORM_DEFINES) diff --git a/hw/xfree86/os-support/meson.build b/hw/xfree86/os-support/meson.build index 65418b74a..484a118e7 100644 --- a/hw/xfree86/os-support/meson.build +++ b/hw/xfree86/os-support/meson.build @@ -25,9 +25,14 @@ if get_option('pciaccess') endif endif +if get_option('agp') == 'auto' + build_agp = cc.has_header('sys/agpio.h') or cc.has_header('sys/agpgart.h') or cc.has_header('linux/agpgart.h') +else + build_agp = get_option('agp') == 'true' +endif + if host_machine.system() == 'linux' srcs_xorg_os_support += [ - 'linux/lnx_agp.c', 'linux/lnx_bell.c', 'linux/lnx_init.c', 'linux/lnx_kmod.c', @@ -36,6 +41,11 @@ if host_machine.system() == 'linux' 'misc/SlowBcopy.c', 'shared/VTsw_usl.c', ] + if build_agp + srcs_xorg_os_support += 'linux/lnx_agp.c' + else + srcs_xorg_os_support += 'shared/agp_noop.c' + endif if build_systemd_logind srcs_xorg_os_support += 'linux/systemd-logind.c' endif @@ -65,7 +75,7 @@ elif host_machine.system() == 'solaris' srcs_xorg_os_support += 'shared/VTsw_noop.c' endif - if cc.has_header('sys/agpio.h') or cc.has_header('sys/agpgart.h') + if build_agp srcs_xorg_os_support += 'solaris/sun_agp.c' else srcs_xorg_os_support += 'shared/agp_noop.c' @@ -132,7 +142,7 @@ elif host_machine.system().endswith('bsd') srcs_xorg_os_support += 'shared/kmod_noop.c' endif - if cc.has_header('sys/agpio.h') or cc.has_header('sys/agpgart.h') + if build_agp srcs_xorg_os_support += 'linux/lnx_agp.c' else srcs_xorg_os_support += 'shared/agp_noop.c' |