Commit b63912ed authored by Alan Coopersmith's avatar Alan Coopersmith Committed by Keith Packard
Browse files

Convert checks for PC98 support from platform #ifdefs to configure flag



Default remains the same - on for most OS'es on i386 (except Solaris),
off for everyone else.   Can be manually toggled via --enable-pc98 or
--disable-pc98.
Signed-off-by: default avatarAlan Coopersmith <alan.coopersmith@sun.com>
Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
parent 0cb638dc
......@@ -577,6 +577,9 @@ AC_ARG_ENABLE(null-root-cursor, AS_HELP_STRING([--enable-null-root-cursor], [Use
AC_ARG_ENABLE(visibility, AC_HELP_STRING([--enable-visibility], [Enable symbol visibility (default: auto)]),
[SYMBOL_VISIBILITY=$enableval],
[SYMBOL_VISIBILITY=auto])
AC_ARG_ENABLE(pc98, AC_HELP_STRING([--enable-pc98], [Enable PC98 support in Xorg (default: auto)]),
[SUPPORT_PC98=$enableval],
[SUPPORT_PC98=auto])
dnl GLX build options
AC_ARG_WITH(dri-driver-path, AS_HELP_STRING([--with-dri-driver-path=PATH], [Path to DRI drivers (default: ${libdir}/dri)]),
......@@ -1652,6 +1655,9 @@ if test "x$XORG" = xyes; then
XORG_CFLAGS="${XORG_CFLAGS} "'$(SOLARIS_ASM_CFLAGS)'
fi
AC_SUBST([SOLARIS_ASM_CFLAGS])
if test "x$SUPPORT_PC98" = xauto; then
SUPPORT_PC98="no"
fi
;;
gnu*)
XORG_OS="gnu"
......@@ -1673,8 +1679,19 @@ if test "x$XORG" = xyes; then
sparc*)
xorg_bus_sparc="yes"
;;
i*86)
if test "x$SUPPORT_PC98" = xauto; then
SUPPORT_PC98="yes"
fi
;;
esac
if test "x$SUPPORT_PC98" = xauto; then
SUPPORT_PC98="no"
fi
if test "x$SUPPORT_PC98" = xyes; then
AC_DEFINE(SUPPORT_PC98, 1, [Support PC98])
fi
if test "x$XORG_OS_PCI" = x ; then
XORG_OS_PCI=$XORG_OS
fi
......
......@@ -71,13 +71,6 @@ extern DeviceAssocRec mouse_assoc;
#include "picture.h"
#endif
#if (defined(__i386__)) && \
(defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
defined(__NetBSD__) || defined(linux) || \
(defined(SVR4) && !defined(sun)) || defined(__GNU__))
#define SUPPORT_PC98
#endif
/*
* These paths define the way the config file search is done. The escape
* sequences are documented in parser/scan.c.
......@@ -778,11 +771,10 @@ static OptionInfoRec FlagOptions[] = {
{0}, FALSE },
};
#ifdef __i386__
#ifdef SUPPORT_PC98
static Bool
detectPC98(void)
{
#ifdef SUPPORT_PC98
unsigned char buf[2];
if (xf86ReadBIOS(0xf8000, 0xe80, buf, 2) != 2)
......@@ -791,11 +783,8 @@ detectPC98(void)
return TRUE;
else
return FALSE;
#else
return FALSE;
#endif
}
#endif /* __i386__ */
#endif
static Bool
configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
......@@ -1054,7 +1043,7 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
xf86Info.pixmap24 = Pix24DontCare;
xf86Info.pix24From = X_DEFAULT;
}
#ifdef __i386__
#ifdef SUPPORT_PC98
if (xf86GetOptValBool(FlagOptions, FLAG_PC98, &value)) {
xf86Info.pc98 = value;
if (value) {
......
......@@ -124,7 +124,7 @@ xf86InfoRec xf86Info = {
.miscModInDevAllowNonLocal = FALSE,
.pixmap24 = Pix24DontCare,
.pix24From = X_DEFAULT,
#ifdef __i386__
#ifdef SUPPORT_PC98
.pc98 = FALSE,
#endif
.pmFlag = TRUE,
......
......@@ -2140,7 +2140,7 @@ xf86GetAllowMouseOpenFail(void)
Bool
xf86IsPc98(void)
{
#ifdef __i386__
#if SUPPORT_PC98
return xf86Info.pc98;
#else
return FALSE;
......
......@@ -91,7 +91,7 @@ typedef struct {
input device events */
Pix24Flags pixmap24;
MessageType pix24From;
#ifdef __i386__
#ifdef SUPPORT_PC98
Bool pc98;
#endif
Bool pmFlag;
......
......@@ -133,4 +133,7 @@
/* Use SIGIO handlers for input device events by default */
#undef USE_SIGIO_BY_DEFAULT
/* Support PC98 */
#undef SUPPORT_PC98
#endif /* _XORG_CONFIG_H_ */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment