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: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
0cb638dc68
commit
b63912ed4c
17
configure.ac
17
configure.ac
|
@ -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)]),
|
AC_ARG_ENABLE(visibility, AC_HELP_STRING([--enable-visibility], [Enable symbol visibility (default: auto)]),
|
||||||
[SYMBOL_VISIBILITY=$enableval],
|
[SYMBOL_VISIBILITY=$enableval],
|
||||||
[SYMBOL_VISIBILITY=auto])
|
[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
|
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)]),
|
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)'
|
XORG_CFLAGS="${XORG_CFLAGS} "'$(SOLARIS_ASM_CFLAGS)'
|
||||||
fi
|
fi
|
||||||
AC_SUBST([SOLARIS_ASM_CFLAGS])
|
AC_SUBST([SOLARIS_ASM_CFLAGS])
|
||||||
|
if test "x$SUPPORT_PC98" = xauto; then
|
||||||
|
SUPPORT_PC98="no"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
gnu*)
|
gnu*)
|
||||||
XORG_OS="gnu"
|
XORG_OS="gnu"
|
||||||
|
@ -1673,8 +1679,19 @@ if test "x$XORG" = xyes; then
|
||||||
sparc*)
|
sparc*)
|
||||||
xorg_bus_sparc="yes"
|
xorg_bus_sparc="yes"
|
||||||
;;
|
;;
|
||||||
|
i*86)
|
||||||
|
if test "x$SUPPORT_PC98" = xauto; then
|
||||||
|
SUPPORT_PC98="yes"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
esac
|
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
|
if test "x$XORG_OS_PCI" = x ; then
|
||||||
XORG_OS_PCI=$XORG_OS
|
XORG_OS_PCI=$XORG_OS
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -71,13 +71,6 @@ extern DeviceAssocRec mouse_assoc;
|
||||||
#include "picture.h"
|
#include "picture.h"
|
||||||
#endif
|
#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
|
* These paths define the way the config file search is done. The escape
|
||||||
* sequences are documented in parser/scan.c.
|
* sequences are documented in parser/scan.c.
|
||||||
|
@ -778,11 +771,10 @@ static OptionInfoRec FlagOptions[] = {
|
||||||
{0}, FALSE },
|
{0}, FALSE },
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef __i386__
|
#ifdef SUPPORT_PC98
|
||||||
static Bool
|
static Bool
|
||||||
detectPC98(void)
|
detectPC98(void)
|
||||||
{
|
{
|
||||||
#ifdef SUPPORT_PC98
|
|
||||||
unsigned char buf[2];
|
unsigned char buf[2];
|
||||||
|
|
||||||
if (xf86ReadBIOS(0xf8000, 0xe80, buf, 2) != 2)
|
if (xf86ReadBIOS(0xf8000, 0xe80, buf, 2) != 2)
|
||||||
|
@ -791,11 +783,8 @@ detectPC98(void)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
#else
|
|
||||||
return FALSE;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif /* __i386__ */
|
#endif
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
|
configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
|
||||||
|
@ -1054,7 +1043,7 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
|
||||||
xf86Info.pixmap24 = Pix24DontCare;
|
xf86Info.pixmap24 = Pix24DontCare;
|
||||||
xf86Info.pix24From = X_DEFAULT;
|
xf86Info.pix24From = X_DEFAULT;
|
||||||
}
|
}
|
||||||
#ifdef __i386__
|
#ifdef SUPPORT_PC98
|
||||||
if (xf86GetOptValBool(FlagOptions, FLAG_PC98, &value)) {
|
if (xf86GetOptValBool(FlagOptions, FLAG_PC98, &value)) {
|
||||||
xf86Info.pc98 = value;
|
xf86Info.pc98 = value;
|
||||||
if (value) {
|
if (value) {
|
||||||
|
|
|
@ -124,7 +124,7 @@ xf86InfoRec xf86Info = {
|
||||||
.miscModInDevAllowNonLocal = FALSE,
|
.miscModInDevAllowNonLocal = FALSE,
|
||||||
.pixmap24 = Pix24DontCare,
|
.pixmap24 = Pix24DontCare,
|
||||||
.pix24From = X_DEFAULT,
|
.pix24From = X_DEFAULT,
|
||||||
#ifdef __i386__
|
#ifdef SUPPORT_PC98
|
||||||
.pc98 = FALSE,
|
.pc98 = FALSE,
|
||||||
#endif
|
#endif
|
||||||
.pmFlag = TRUE,
|
.pmFlag = TRUE,
|
||||||
|
|
|
@ -2140,7 +2140,7 @@ xf86GetAllowMouseOpenFail(void)
|
||||||
Bool
|
Bool
|
||||||
xf86IsPc98(void)
|
xf86IsPc98(void)
|
||||||
{
|
{
|
||||||
#ifdef __i386__
|
#if SUPPORT_PC98
|
||||||
return xf86Info.pc98;
|
return xf86Info.pc98;
|
||||||
#else
|
#else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
@ -91,7 +91,7 @@ typedef struct {
|
||||||
input device events */
|
input device events */
|
||||||
Pix24Flags pixmap24;
|
Pix24Flags pixmap24;
|
||||||
MessageType pix24From;
|
MessageType pix24From;
|
||||||
#ifdef __i386__
|
#ifdef SUPPORT_PC98
|
||||||
Bool pc98;
|
Bool pc98;
|
||||||
#endif
|
#endif
|
||||||
Bool pmFlag;
|
Bool pmFlag;
|
||||||
|
|
|
@ -133,4 +133,7 @@
|
||||||
/* Use SIGIO handlers for input device events by default */
|
/* Use SIGIO handlers for input device events by default */
|
||||||
#undef USE_SIGIO_BY_DEFAULT
|
#undef USE_SIGIO_BY_DEFAULT
|
||||||
|
|
||||||
|
/* Support PC98 */
|
||||||
|
#undef SUPPORT_PC98
|
||||||
|
|
||||||
#endif /* _XORG_CONFIG_H_ */
|
#endif /* _XORG_CONFIG_H_ */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user