From d791ee9897108fe301e39f7daba145130d78939d Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Sun, 23 Nov 2008 17:48:00 -0500 Subject: Make ISA optional --- configure.ac | 8 ++++++++ src/ct_driver.c | 9 +++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 776f250..7dc6f0b 100644 --- a/configure.ac +++ b/configure.ac @@ -73,6 +73,14 @@ if test "x$XSERVER_LIBPCIACCESS" = xyes; then fi AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes) +save_CFLAGS="$CFLAGS" +CFLAGS="$XORG_CFLAGS" +AC_CHECK_DECL(xf86ConfigIsaEntity, + [AC_DEFINE(HAVE_ISA, 1, [Have ISA support])], + [], + [#include "xf86.h"]) +CFLAGS="$save_CFLAGS" + # Checks for header files. AC_HEADER_STDC diff --git a/src/ct_driver.c b/src/ct_driver.c index 1c791c8..4bc5e68 100644 --- a/src/ct_driver.c +++ b/src/ct_driver.c @@ -1,4 +1,3 @@ - /* * Copyright 1993 by Jon Block * Modified by Mike Hollick @@ -555,6 +554,7 @@ static PciChipsets CHIPSPCIchipsets[] = { { -1, -1, RES_UNDEFINED} }; +#ifdef HAVE_ISA static IsaChipsets CHIPSISAchipsets[] = { { CHIPS_CT65520, RES_EXCLUSIVE_VGA }, { CHIPS_CT65525, RES_EXCLUSIVE_VGA }, @@ -574,6 +574,7 @@ static IsaChipsets CHIPSISAchipsets[] = { { CHIPS_CT64300, RES_EXCLUSIVE_VGA }, { -1, RES_UNDEFINED } }; +#endif /* The options supported by the Chips and Technologies Driver */ typedef enum { @@ -1040,7 +1041,8 @@ CHIPSProbe(DriverPtr drv, int flags) xfree(usedChips); } } - + +#ifdef HAVE_ISA /* Isa Bus */ numUsed = xf86MatchIsaInstances(CHIPS_NAME,CHIPSChipsets,CHIPSISAchipsets, drv,chipsFindIsaDevice,devSections, @@ -1071,12 +1073,14 @@ CHIPSProbe(DriverPtr drv, int flags) xfree(usedChips); } } +#endif xfree(devSections); return foundScreen; } #endif +#ifdef HAVE_ISA static int chipsFindIsaDevice(GDevPtr dev) { @@ -1160,6 +1164,7 @@ chipsFindIsaDevice(GDevPtr dev) } return found; } +#endif /* Mandatory */ Bool -- cgit v1.2.3