Commit 6c1d7200 authored by Adam Jackson's avatar Adam Jackson 🎧 Committed by Emma Anholt
Browse files

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's avatarAdam Jackson <ajax@redhat.com>
parent 1e3f9ea1
......@@ -193,7 +193,12 @@ AC_CHECK_LIB(m, sqrt)
AC_CHECK_FUNCS([cbrt])
dnl AGPGART headers
AC_CHECK_HEADERS([linux/agpgart.h sys/agpio.h sys/agpgart.h], AGP=yes)
AC_ARG_ENABLE(agp, AS_HELP_STRING([--enable-agp],
[Enable AGP support (default: auto)]),
[AGP=$enableval], [AGP=auto])
if test "x$AGP" = "xauto" ; then
AC_CHECK_HEADERS([linux/agpgart.h sys/agpio.h sys/agpgart.h], AGP=yes)
fi
AM_CONDITIONAL(AGP, [test "x$AGP" = xyes])
dnl fbdev header
......
......@@ -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)
......
......@@ -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'
......
......@@ -98,6 +98,8 @@ option('linux_acpi', type: 'boolean', value: true,
description: 'ACPI support on Linux')
option('mitshm', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
description: 'SHM extension')
option('agp', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
description: 'AGP support')
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)')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment