summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2009-12-17 18:24:37 -0800
committerAlan Coopersmith <alan.coopersmith@sun.com>2009-12-23 16:05:42 -0800
commit17a1587d1606351d3f0b9b148e9c3cbfb6026193 (patch)
tree45a895d738d99e89465d3e9510fc2adcf0bdb410
parent2d6a8f668342a5190cdf43b5d385f592d10f5900 (diff)
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> (cherry picked from commit b63912ed4c69fedd1bea92274d6cae0429a79677)
-rw-r--r--configure.ac17
-rw-r--r--hw/xfree86/common/xf86Config.c17
-rw-r--r--hw/xfree86/common/xf86Globals.c2
-rw-r--r--hw/xfree86/common/xf86Helper.c2
-rw-r--r--hw/xfree86/common/xf86Privstr.h2
-rw-r--r--include/xorg-config.h.in3
6 files changed, 26 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac
index e501a37a9..635321676 100644
--- a/configure.ac
+++ b/configure.ac
@@ -560,6 +560,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)]),
@@ -1575,6 +1578,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"
@@ -1596,8 +1602,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
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index a6d66f35a..6fbf61346 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -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) {
diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index d8f7f7f27..98f828483 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -124,7 +124,7 @@ xf86InfoRec xf86Info = {
.miscModInDevAllowNonLocal = FALSE,
.pixmap24 = Pix24DontCare,
.pix24From = X_DEFAULT,
-#ifdef __i386__
+#ifdef SUPPORT_PC98
.pc98 = FALSE,
#endif
.pmFlag = TRUE,
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 56ab266ae..1cc1526c9 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -2140,7 +2140,7 @@ xf86GetAllowMouseOpenFail(void)
Bool
xf86IsPc98(void)
{
-#ifdef __i386__
+#if SUPPORT_PC98
return xf86Info.pc98;
#else
return FALSE;
diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h
index 998260142..b2095aab1 100644
--- a/hw/xfree86/common/xf86Privstr.h
+++ b/hw/xfree86/common/xf86Privstr.h
@@ -91,7 +91,7 @@ typedef struct {
input device events */
Pix24Flags pixmap24;
MessageType pix24From;
-#ifdef __i386__
+#ifdef SUPPORT_PC98
Bool pc98;
#endif
Bool pmFlag;
diff --git a/include/xorg-config.h.in b/include/xorg-config.h.in
index 794de7ae3..9fe7cdef5 100644
--- a/include/xorg-config.h.in
+++ b/include/xorg-config.h.in
@@ -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_ */