diff --git a/configure.ac b/configure.ac index c57bd6c..7566850 100644 --- a/configure.ac +++ b/configure.ac @@ -72,6 +72,20 @@ AC_ARG_ENABLE(geodegx-panel, [ PANEL_CPPFLAGS=-DPNL_SUP ]) AC_SUBST(PANEL_CPPFLAGS) +# Define a configure option to disable GX altogether +AC_ARG_ENABLE(geodegx, + AS_HELP_STRING([--disable-geodegx], + [Disable support for the Geode GX and only build LX]), + [geodegx=no], + [geodegx=yes]) + +if test "x$geodegx" != "xno" ; then + BUILD_GX=yes + DEVICE_CPPFLAGS=-DHAVE_GX +fi +AM_CONDITIONAL(BUILD_GX, [test "x$BUILD_GX" = xyes]) +AC_SUBST(DEVICE_CPPFLAGS) + # Define a configure option to enable/disable ztv AC_ARG_ENABLE(ztv, AS_HELP_STRING([--enable-ztv], diff --git a/src/Makefile.am b/src/Makefile.am index ad21034..9dcab65 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -29,7 +29,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/gfx \ -I$(top_srcdir)/src/panel \ $(PANEL_CPPFLAGS) \ - -DHAVE_GX \ + $(DEVICE_CPPFLAGS) \ -DHAVE_LX \ -DOPT_ACCEL @@ -53,13 +53,6 @@ geode_drv_la_SOURCES = \ geode.h \ geode_msr.c \ geode_pcirename.h \ - gx_accel.c \ - gx_cursor.c \ - gx_driver.c \ - gx_randr.c \ - gx_regacc.c \ - gx_rotate.c \ - gx_video.c \ lx_cursor.c \ lx_display.c \ lx_driver.c \ @@ -144,6 +137,19 @@ EXTRA_DIST = \ gx_vga.c \ lx_vga.c +if BUILD_GX + +geode_drv_la_SOURCES += \ + gx_accel.c \ + gx_cursor.c \ + gx_driver.c \ + gx_randr.c \ + gx_regacc.c \ + gx_rotate.c \ + gx_video.c + +endif BUILD_GX + if BUILD_ZTV ztv_drv_la_LTLIBRARIES = ztv_drv.la diff --git a/src/geode.h b/src/geode.h index 5e6d422..e416de6 100644 --- a/src/geode.h +++ b/src/geode.h @@ -112,7 +112,6 @@ typedef struct _CIM_DISPLAYTIMING { #endif -#ifdef HAVE_GX extern void gfx_write_reg32(int offset, int data); extern void gfx_write_reg16(int offset, short data); extern void gfx_write_reg8(int offset, char data); @@ -151,8 +150,6 @@ typedef struct tag_GFX_DISPLAYTIMING { unsigned short wPolarity; } GFX_DISPLAYTIMING; -#endif - typedef struct _VESARec { xf86Int10InfoPtr pInt; } VESARec; @@ -255,6 +252,7 @@ typedef struct _geodeRec { /* ===== GX specific items ===== */ +#ifdef HAVE_GX /* Flags */ Bool Panel; @@ -310,6 +308,7 @@ typedef struct _geodeRec { int video_offset; ScrnInfoPtr video_scrnptr; BOOL OverlayON; +#endif } GeodeRec, *GeodePtr; /* option flags are self-explanatory */