diff options
author | Daniel Stone <daniel@fooishbar.org> | 2005-08-14 16:14:51 +0000 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2005-08-14 16:14:51 +0000 |
commit | 204290412fbe8b4ac1a0f4f97bc7aec2847a1df7 (patch) | |
tree | 61286fddb87aa37cb1006ff8c825e15e101a81ce | |
parent | adb093bdf3cea8108a40bcd72f09924b416de0c1 (diff) |
Make DGA, CPIO, non-PCI, and TV-Out support detected per-platform, using
the same semantics as in drivers/ati/Imakefile.
-rw-r--r-- | configure.ac | 68 | ||||
-rw-r--r-- | src/Makefile.am | 15 |
2 files changed, 80 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 9832f33d..68e9779e 100644 --- a/configure.ac +++ b/configure.ac @@ -88,6 +88,74 @@ if test "$DRI" = yes; then AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support]) fi +# Note that this is sort of inverted from drivers/ati/Imakefile in +# the monolith. We test for foo, not for !foo (i.e. ATMISC_CPIO, not +# ATIMISC_AVOID_CPIO), but the defines are negative. So beware. Oh yeah, +# TV_OUT is the special case where it's a positive define, not AVOID_TV_OUT. + +# AVOID_CPIO: Only x86, amd64, and alpha are cool with CPIO. It needs a +# little-endian, undirected PIO space of at least 64kB. +# AVOID_NON_PCI: Platforms which don't deal with PCI master aborts should +# stick to PCI-only probing, stick their fingers in their ears, and pretend +# that ISA cards simply don't exist. +# AVOID_DGA: ??? +# ATI_TV_OUT: This only works on x86. + +ATIMISC_CPIO=no +ATIMISC_NON_PCI=yes +ATIMISC_DGA=yes +ATIMISC_TV_OUT=no + +case $host_cpu in + i*86) + ATIMISC_TV_OUT=yes + ATIMISC_CPIO=yes + ;; + amd64|alpha) + ATIMISC_CPIO=yes + ;; + sparc) + ATIMISC_DGA=no + ;; + powerpc) + ATIMISC_NON_PCI=no + ;; + *) + ;; +esac + +AC_MSG_CHECKING([whether to include PIO support]) +AM_CONDITIONAL(ATIMISC_CPIO, test "x$ATIMISC_CPIO" = xyes) +if test "x$ATIMISC_CPIO" = xyes; then + echo "yes, PIO" +else + AC_DEFINE(AVOID_CPIO, 1, [Avoid PIO and use MMIO for atimisc.]) + echo "no, MMIO" +fi + +AC_MSG_CHECKING([whether to include support for non-PCI devices]) +AM_CONDITIONAL(ATIMISC_NON_PCI, test "x$ATIMISC_NON_PCI" = xyes) +if test "x$ATI_AVOID_NON_PCI" = xyes; then + echo "yes, PCI and ISA" +else + AC_DEFINE(AVOID_NON_PCI, 1, [Only probe PCI cards; do not probe ISA.]) + echo "no, PCI only" +fi + +AC_MSG_CHECKING([whether to include DGA support]) +AC_MSG_RESULT([$ATIMISC_DGA]) +AM_CONDITIONAL(ATIMISC_DGA, test "x$ATIMISC_DGA" = xyes) +if ! test "x$ATIMISC_DGA" = xyes; then + AC_DEFINE(AVOID_DGA, 1, [Do not build DGA support.]) +fi + +AC_MSG_CHECKING([whether to include TV Out support]) +AC_MSG_RESULT([$ATIMISC_TV_OUT]) +AM_CONDITIONAL(ATIMISC_TV_OUT, test "x$ATIMISC_TV_OUT" = xyes) +if test "x$ATIMISC_TV_OUT" = xyes; then + AC_DEFINE(TV_OUT, 1, [Build TV-Out support for atimisc.]) +fi + AC_SUBST([XORG_CFLAGS]) AC_SUBST([DRI_CFLAGS]) AC_SUBST([moduledir]) diff --git a/src/Makefile.am b/src/Makefile.am index 35fae7dd..e25c46db 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -32,6 +32,15 @@ R128_DRI_SRCS = r128_dri.c RADEON_DRI_SRCS = radeon_dri.c endif +if ATIMISC_CPIO +ATI_CPIO_SOURCES = ativgaio.c +ATIMISC_CPIO_SOURCES = ativga.c atibank.c atiwonder.c atiwonderio.c +endif + +if ATIMISC_DGA +ATIMISC_DGA_SOURCES = atidga.c +endif + AM_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@ ati_drv_la_LTLIBRARIES = ati_drv.la @@ -39,7 +48,7 @@ ati_drv_la_LDFLAGS = -module -avoid-version ati_drv_ladir = @moduledir@/drivers ati_drv_la_SOURCES = \ ati.c atiadapter.c atibus.c atichip.c atiident.c atioption.c \ - atiprobe.c atividmem.c ativgaio.c atimodule.c \ + atiprobe.c atividmem.c atimodule.c $(ATI_CPIO_SOURCES) \ radeon_probe.c r128_probe.c atimisc_drv_la_LTLIBRARIES = atimisc_drv.la @@ -51,8 +60,8 @@ atimisc_drv_la_SOURCES = \ atilock.c atimach64.c atimach64accel.c atimach64cursor.c \ atimach64i2c.c atimach64io.c atimach64xv.c atimode.c atipreinit.c \ atiprint.c atirgb514.c atiscreen.c atituner.c atiutil.c ativalid.c \ - atixv.c atibank.c ativga.c atiwonder.c atiwonderio.c atidga.c \ - atiload.c atimisc.c $(ATIMISC_DRI_SRCS) + atixv.c atiload.c atimisc.c $(ATIMISC_DRI_SRCS) $(ATIMISC_DGA_SOURCES) \ + $(ATIMISC_CPIO_SOURCES) r128_drv_la_LTLIBRARIES = r128_drv.la r128_drv_la_LDFLAGS = -module -avoid-version |