Index: configure.ac =================================================================== RCS file: /cvs/xorg/xserver/xorg/configure.ac,v retrieving revision 1.131 diff -u -r1.131 configure.ac --- configure.ac 23 Nov 2005 07:14:45 -0000 1.131 +++ configure.ac 25 Nov 2005 09:59:55 -0000 @@ -166,7 +166,6 @@ dnl --------------------------------------------------------------------------- DEFAULT_INT10="x86emu" xorg_bus_sparc="no" -xorg_bus_ix86pci="no" use_x86_asm="no" dnl Override defaults as needed for specific platforms: @@ -182,17 +181,13 @@ ARM_VIDEO=yes ;; i*86) - xorg_bus_ix86pci="yes" use_x86_asm="yes" I386_VIDEO=yes case $host_os in *linux*) DEFAULT_INT10=vm86 ;; - *freebsd*) xorg_bus_ix86pci="no" - AC_DEFINE(USE_DEV_IO) ;; - *netbsd*) xorg_bus_ix86pci="no" - AC_DEFINE(USE_I386_IOPL) ;; - *openbsd*) xorg_bus_ix86pci="no" - AC_DEFINE(USE_I386_IOPL) ;; + *freebsd*) AC_DEFINE(USE_DEV_IO) ;; + *netbsd*) AC_DEFINE(USE_I386_IOPL) ;; + *openbsd*) AC_DEFINE(USE_I386_IOPL) ;; esac ;; powerpc*) @@ -202,13 +197,11 @@ esac ;; sparc*) - xorg_bus_sparc="yes" xorg_loader_sparcmuldiv="yes" SPARC64_VIDEO=yes BSD_ARCH_SOURCES="sparc64_video.c ioperm_noop.c" ;; x86_64*|amd64*) - xorg_bus_ix86pci="yes" use_x86_asm="yes" I386_VIDEO=yes case $host_os in @@ -876,6 +869,14 @@ XORG_CORE_LIBS="$DIX_LIB" AC_SUBST([XORG_CORE_LIBS]) +xorg_bus_linuxpci=no +xorg_bus_freebsdpci=no +xorg_bus_netbsdpci=no +xorg_bus_ix86pci=no +xorg_bus_ppcpci=no +xorg_bus_sparcpci=no +xorg_bus_sparc=no + if test "x$XORG" = xyes; then XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 -I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common' XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os' @@ -890,6 +891,7 @@ XORG_OS="linux" XORG_OS_SUBDIR="linux" XORG_OS_KBD="Lnx" + xorg_bus_linuxpci="yes" case $host_cpu in ia64*) linux_ia64=yes @@ -897,6 +899,7 @@ alpha*) linux_alpha=yes XORG_OS_PCI="axp" + xorg_bus_linuxpci="no" ;; *) ;; @@ -906,16 +909,37 @@ XORG_OS="freebsd" XORG_OS_SUBDIR="bsd" XORG_OS_KBD="BSD" + case $host_cpu in + i*86) + ;; + *) + xorg_bus_freebsdpci="yes" + ;; + esac ;; netbsd*) XORG_OS="netbsd" XORG_OS_SUBDIR="bsd" XORG_OS_KBD="BSD" + case $host_cpu in + i*86|amd64*|x86_64*|ia64*) + ;; + *) + xorg_bus_netbsdpci="yes" + ;; + esac ;; openbsd*) XORG_OS="openbsd" XORG_OS_SUBDIR="bsd" XORG_OS_KBD="BSD" + case $host_cpu in + i*86|amd64*|x86_64*|ia64*) + ;; + *) + xorg_bus_freebsdpci="yes" + ;; + esac ;; solaris*) XORG_OS="solaris" @@ -941,11 +965,9 @@ case $host_cpu in sparc*) - XORG_OS_PCI="sparc" SOLARIS_INOUT_ARCH="sparcv8plus" ;; i*86) - XORG_OS_PCI="ix86" if test x$SOLARIS_64 = xyes ; then SOLARIS_INOUT_ARCH="amd64" else @@ -974,6 +996,36 @@ Xorg to your platform, please email xorg@lists.freedesktop.org.]) ;; esac + + case $host_cpu in + i*86) + xorg_bus_ix86pci=yes + ;; + powerpc*) + case $host_os in + linux*|freebsd*|netbsd*|openbsd*) + ;; + *) + xorg_bus_ppcpci="yes" + ;; + esac + ;; + sparc*) + xorg_bus_sparcpci="yes" + xorg_bus_sparc="yes" + ;; + x86_64*|amd64*) + case $host_os in + freebsd*) + # FreeBSD uses the system pci interface + ;; + *) + xorg_bus_ix86pci="yes" + ;; + esac + ;; + esac + if test "x$XORG_OS_PCI" = x ; then XORG_OS_PCI=$XORG_OS fi @@ -982,7 +1034,6 @@ AC_SUBST([XORG_OS]) AC_SUBST([XORG_OS_SUBDIR]) AC_SUBST([XORG_OS_KBD]) - AC_SUBST([XORG_OS_PCI]) dnl only used in hw/xfree86/scanpci, TTBOMK AC_PATH_PROG(PERL, perl, no) @@ -1050,7 +1101,12 @@ AC_SUBST([logdir]) fi AM_CONDITIONAL([XORG], [test "x$XORG" = xyes]) +AM_CONDITIONAL([XORG_BUS_LINUXPCI], [test "x$xorg_bus_linuxbsdpci" = xyes]) +AM_CONDITIONAL([XORG_BUS_FREEBSDPCI], [test "x$xorg_bus_freebsdpci" = xyes]) +AM_CONDITIONAL([XORG_BUS_NETBSDPCI], [test "x$xorg_bus_netbsdpci" = xyes]) AM_CONDITIONAL([XORG_BUS_IX86PCI], [test "x$xorg_bus_ix86pci" = xyes]) +AM_CONDITIONAL([XORG_BUS_PPCPCI], [test "x$xorg_bus_ppcpci" = xyes]) +AM_CONDITIONAL([XORG_BUS_SPARCPCI], [test "x$xorg_bus_sparcpci" = xyes]) AM_CONDITIONAL([XORG_BUS_SPARC], [test "x$xorg_bus_sparc" = xyes]) AM_CONDITIONAL([XORG_LOADER_SPARC], [test "x$xorg_loader_sparcmuldiv" = xyes]) AM_CONDITIONAL([LINUX_IA64], [test "x$linux_ia64" = xyes]) Index: hw/xfree86/os-support/bus/Makefile.am =================================================================== RCS file: /cvs/xorg/xserver/xorg/hw/xfree86/os-support/bus/Makefile.am,v retrieving revision 1.13 diff -u -r1.13 Makefile.am --- hw/xfree86/os-support/bus/Makefile.am 17 Oct 2005 07:18:58 -0000 1.13 +++ hw/xfree86/os-support/bus/Makefile.am 25 Nov 2005 09:15:14 -0000 @@ -1,44 +1,56 @@ noinst_LTLIBRARIES = libbus.la sdk_HEADERS = xf86Pci.h -PCI_SOURCES = @XORG_OS_PCI@Pci.c +PCI_SOURCES = + +if XORG_BUS_LINUXPCI +PCI_SOURCES += linuxPci.c +endif + +if XORG_BUS_FREEBSDPCI +PCI_SOURCES += freebsdPci.c +endif + +if XORG_BUS_NETBSDPCI +PCI_SOURCES += netbsdPci.c +endif if XORG_BUS_IX86PCI PCI_SOURCES += ix86Pci.c endif +if XORG_BUS_PPCPCI +PCI_SOURCES += ppcPci.c +endif + +if XORG_BUS_SPARCPCI +PCI_SOURCES += sparcPci.c +endif + +if LINUX_ALPHA +PCI_SOURCES += axpPci.c +endif + if LINUX_IA64 -PLATFORM_PCI_SOURCES = 460gxPCI.c altixPCI.c e8870PCI.c zx1PCI.c +PLATFORM_PCI_SOURCES = \ + 460gxPCI.c \ + 460gxPCI.h \ + altixPCI.c \ + altixPCI.h \ + e8870PCI.c \ + e8870PCI.h \ + zx1PCI.c \ + zx1PCI.h endif if XORG_BUS_SPARC -PLATFORM_PCI_SOURCES = sparcPci.c PLATFORM_SOURCES = Sbus.c +sdk_HEADERS += xf86Sbus.h endif -libbus_la_SOURCES = Pci.c $(PCI_SOURCES) $(PLATFORM_PCI_SOURCES) \ +libbus_la_SOURCES = Pci.c Pci.h $(PCI_SOURCES) $(PLATFORM_PCI_SOURCES) \ $(PLATFORM_SOURCES) INCLUDES = $(XORG_INCS) AM_CFLAGS = $(XORG_CFLAGS) - -# hack to keep all the OS PCI support files in the distball even though -# there aren't rules to build them all yet. also the AC_SUBST pattern -# above will defeat automake's EXTRA_DIST logic, woo. -PCIDISTSOURCES = \ - axpPci.c \ - freebsdPci.c \ - linuxPci.c \ - netbsdPci.c \ - ppcPci.c \ - sparcPci.c - -EXTRA_DIST = \ - 460gxPCI.h \ - Pci.h \ - altixPCI.h \ - e8870PCI.h \ - zx1PCI.h \ - xf86Sbus.h \ - $(PCIDISTSOURCES)