From d7c246f35b1ba7ecbbc086dd1229b298faddec96 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Tue, 2 Aug 2005 23:57:52 +0000 Subject: [PATCH] Only build ix86Pci.c on x86 & amd64 platforms Set DEFAULT_INT10 to x86emu on everything but Linux/x86 Fix Sbus.c inclusion on sparc platforms --- configure.ac | 23 +++++++++++++++++------ hw/xfree86/os-support/bus/Makefile.am | 8 ++++++-- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 072abb7c3..921c0b61d 100644 --- a/configure.ac +++ b/configure.ac @@ -114,20 +114,30 @@ if test "$ac_cv_sysv_ipc" = yes; then AC_DEFINE(HAVE_SYSV_IPC,1, [Define to 1 if SYSV IPC is available]) fi +### Choose bus options - replaces logic in hw/xfree86/os-support/bus/Imakefile + +# Defaults: + +DEFAULT_INT10="x86emu" +xorg_bus_sbus="no" +xorg_bus_ix86pci="no" + +# Override defaults as needed for specific platforms: + case $host_cpu in sparc*) xorg_bus_sbus="yes" - DEFAULT_INT10=x86emu ;; i*86) + xorg_bus_ix86pci="yes" case $host_os in - solaris*) DEFAULT_INT10=x86emu ;; - *) DEFAULT_INT10=vm86 ;; + *linux*) DEFAULT_INT10=vm86 ;; + *bsd*) xorg_bus_ix86pci="no" ;; esac ;; - *) - DEFAULT_INT10=x86emu - ;; + amd64*) + xorg_bus_ix86pci="yes" + ;; esac REQUIRED_MODULES="randrproto renderproto fixesproto damageproto xextproto xfont xproto xtrans xau xf86dgaproto xf86miscproto xf86rushproto xf86vidmodeproto xf86bigfontproto" @@ -694,6 +704,7 @@ AC_SUBST([XORG_OS]) AC_SUBST([XORG_OS_SUBDIR]) AC_SUBST([XORG_OS_KBD]) AC_SUBST([XORG_OS_PCI]) +AM_CONDITIONAL([XORG_BUS_IX86PCI], [test "x$xorg_bus_ix86pci" = xyes]) AM_CONDITIONAL([XORG_BUS_SBUS], [test "x$xorg_bus_sbus" = xyes]) AM_CONDITIONAL([LINUX_IA64], [test "x$linux_ia64" = xyes]) diff --git a/hw/xfree86/os-support/bus/Makefile.am b/hw/xfree86/os-support/bus/Makefile.am index 8976435ce..786e99c94 100644 --- a/hw/xfree86/os-support/bus/Makefile.am +++ b/hw/xfree86/os-support/bus/Makefile.am @@ -1,7 +1,11 @@ noinst_LTLIBRARIES = libbus.la sdk_HEADERS = xf86Pci.h -PCI_SOURCES = @XORG_OS_PCI@Pci.c ix86Pci.c +PCI_SOURCES = @XORG_OS_PCI@Pci.c + +if XORG_BUS_IX86PCI +PCI_SOURCES += ix86Pci.c +endif if LINUX_IA64 PLATFORM_PCI_SOURCES = 460gxPCI.c altixPCI.c e8870PCI.c zx1PCI.c @@ -10,7 +14,7 @@ endif libbus_la_SOURCES = Pci.c $(PCI_SOURCES) $(PLATFORM_PCI_SOURCES) if XORG_BUS_SBUS - libbus_la_SOURCES += Sbus.c +libbus_la_SOURCES += Sbus.c endif INCLUDES = $(XORG_INCS)