Add option to avoid building GX support

One of the checks for HAVE_GX appeared to be in the wrong place. Once it
is in the right place, a configure option can be used to not set HAVE_GX
and avoid compiling the associated files.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
This commit is contained in:
Connor Behan
2024-06-25 02:22:37 -03:00
committed by Martin-Éric Racine
parent 72915687d3
commit 9318797494
3 changed files with 30 additions and 11 deletions

View File

@@ -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],

View File

@@ -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

View File

@@ -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 */