Commit 6c2b3a42 authored by Mikhail Gusarov's avatar Mikhail Gusarov

kdrive: Add option to compile out input drivers

Add --without-kdrive-{kbd,mouse,evdev} configure options disabling
Linux keyboard driver, Linux mouse drivers (ps2, bus,ms),
and Linux evdev driver.

Build all drivers by default as before.
Acked-by: Dan Nicholson's avatarDan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
Signed-off-by: Mikhail Gusarov's avatarMikhail Gusarov <dottedmag@dottedmag.net>
parent 72ba717b
......@@ -640,6 +640,10 @@ AC_ARG_ENABLE(kdrive, AS_HELP_STRING([--enable-kdrive], [Build kdrive se
AC_ARG_ENABLE(xephyr, AS_HELP_STRING([--enable-xephyr], [Build the kdrive Xephyr server (default: auto)]), [XEPHYR=$enableval], [XEPHYR=auto])
AC_ARG_ENABLE(xfake, AS_HELP_STRING([--enable-xfake], [Build the kdrive 'fake' server (default: auto)]), [XFAKE=$enableval], [XFAKE=auto])
AC_ARG_ENABLE(xfbdev, AS_HELP_STRING([--enable-xfbdev], [Build the kdrive framebuffer device server (default: auto)]), [XFBDEV=$enableval], [XFBDEV=auto])
dnl kdrive options
AC_ARG_ENABLE(kdrive-kbd, AS_HELP_STRING([--enable-kdrive-kbd], [Build kbd driver for kdrive (default: enabled)]), [KDRIVE_KBD=$enableval], [KDRIVE_KBD=yes])
AC_ARG_ENABLE(kdrive-mouse, AC_HELP_STRING([--enable-kdrive-mouse], [Build mouse driver for kdrive (default: enabled)]), [KDRIVE_MOUSE=$enableval], [KDRIVE_MOUSE=yes])
AC_ARG_ENABLE(kdrive-evdev, AC_HELP_STRING([--enable-kdrive-evdev], [Build evdev driver for kdrive (default: enabled)]), [KDRIVE_EVDEV=$enableval], [KDRIVE_EVDEV=yes])
dnl chown/chmod to be setuid root as part of build
......@@ -1991,6 +1995,10 @@ XEPHYR_LIBS=
XEPHYR_INCS=
AM_CONDITIONAL(KDRIVE, [test x$KDRIVE = xyes])
AM_CONDITIONAL(KDRIVE_KBD, test "x$KDRIVE_KBD" = xyes)
AM_CONDITIONAL(KDRIVE_EVDEV, test "x$KDRIVE_EVDEV" = xyes)
AM_CONDITIONAL(KDRIVE_MOUSE, test "x$KDRIVE_MOUSE" = xyes)
if test "$KDRIVE" = yes; then
AC_DEFINE(KDRIVESERVER,1,[Build Kdrive X server])
AC_DEFINE(KDRIVEDDXACTIONS,,[Build kdrive ddx])
......@@ -2023,6 +2031,16 @@ if test "$KDRIVE" = yes; then
fi
fi
if test "x$KDRIVE_KBD" = xyes; then
AC_DEFINE(KDRIVE_KBD, 1, [Enable KDrive kbd driver])
fi
if test "x$KDRIVE_EVDEV" = xyes; then
AC_DEFINE(KDRIVE_EVDEV, 1, [Enable KDrive evdev driver])
fi
if test "x$KDRIVE_MOUSE" = xyes; then
AC_DEFINE(KDRIVE_MOUSE, 1, [Enable KDrive mouse driver])
fi
XEPHYR_REQUIRED_LIBS="x11 $LIBXEXT xfont xau xdmcp"
if test "x$XV" = xyes; then
XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS xv"
......
......@@ -40,6 +40,11 @@ extern Bool noGlxVisualInit;
#endif
extern Bool ephyrNoXV;
#ifdef KDRIVE_EVDEV
extern KdPointerDriver LinuxEvdevMouseDriver;
extern KdKeyboardDriver LinuxEvdevKeyboardDriver;
#endif
void processScreenArg (char *screen_size, char *parent_id) ;
void
......@@ -66,11 +71,11 @@ InitInput (int argc, char **argv)
KdPointerInfo *pi;
KdAddKeyboardDriver(&EphyrKeyboardDriver);
#ifdef linux
#ifdef KDRIVE_EVDEV
KdAddKeyboardDriver(&LinuxEvdevKeyboardDriver);
#endif
KdAddPointerDriver(&EphyrMouseDriver);
#ifdef linux
#ifdef KDRIVE_EVDEV
KdAddPointerDriver(&LinuxEvdevMouseDriver);
#endif
......
......@@ -6,19 +6,22 @@ AM_CFLAGS = -DHAVE_DIX_CONFIG_H
noinst_LTLIBRARIES = liblinux.la
if TSLIB
TSLIB_C = tslib.c
liblinux_la_SOURCES =
liblinux_la_SOURCES += linux.c klinux.h
if KDRIVE_KBD
liblinux_la_SOURCES += keyboard.c
endif
if KDRIVE_EVDEV
liblinux_la_SOURCES += evdev.c
endif
KDRIVE_HW_SOURCES = \
evdev.c \
keyboard.c \
linux.c
liblinux_la_SOURCES = \
bus.c \
mouse.c \
ms.c \
ps2.c \
$(KDRIVE_HW_SOURCES) \
$(TSLIB_C)
if KDRIVE_MOUSE
liblinux_la_SOURCES += mouse.c bus.c ms.c ps2.c
endif
if TSLIB
liblinux_la_SOURCES += tslib.c
endif
......@@ -33,6 +33,22 @@
#include <X11/keysym.h>
#include <linux/apm_bios.h>
#ifdef KDRIVE_MOUSE
extern KdPointerDriver LinuxMouseDriver;
extern KdPointerDriver Ps2MouseDriver;
extern KdPointerDriver MsMouseDriver;
#endif
#ifdef TSLIB
extern KdPointerDriver TsDriver;
#endif
#ifdef KDRIVE_EVDEV
extern KdPointerDriver LinuxEvdevMouseDriver;
extern KdKeyboardDriver LinuxEvdevKeyboardDriver;
#endif
#ifdef KDRIVE_KBD
extern KdKeyboardDriver LinuxKeyboardDriver;
#endif
static int vtno;
int LinuxConsoleFd;
int LinuxApmFd = -1;
......@@ -345,15 +361,21 @@ LinuxFini (void)
void
KdOsAddInputDrivers (void)
{
#ifdef KDRIVE_MOUSE
KdAddPointerDriver(&LinuxMouseDriver);
KdAddPointerDriver(&MsMouseDriver);
KdAddPointerDriver(&Ps2MouseDriver);
#endif
#ifdef TSLIB
KdAddPointerDriver(&TsDriver);
#endif
#ifdef KDRIVE_EVDEV
KdAddPointerDriver(&LinuxEvdevMouseDriver);
KdAddKeyboardDriver(&LinuxKeyboardDriver);
KdAddKeyboardDriver(&LinuxEvdevKeyboardDriver);
#endif
#ifdef KDRIVE_KBD
KdAddKeyboardDriver(&LinuxKeyboardDriver);
#endif
}
static void
......
......@@ -623,16 +623,6 @@ KdRingBell (KdKeyboardInfo *ki,
int pitch,
int duration);
extern KdPointerDriver LinuxMouseDriver;
extern KdPointerDriver LinuxEvdevMouseDriver;
extern KdPointerDriver Ps2MouseDriver;
extern KdPointerDriver BusMouseDriver;
extern KdPointerDriver MsMouseDriver;
extern KdPointerDriver TsDriver;
extern KdKeyboardDriver LinuxKeyboardDriver;
extern KdKeyboardDriver LinuxEvdevKeyboardDriver;
extern KdOsFuncs LinuxFuncs;
extern KdPointerDriver VxWorksMouseDriver;
extern KdKeyboardDriver VxWorksKeyboardDriver;
extern KdOsFuncs VxWorksFuncs;
......
......@@ -19,6 +19,15 @@
/* Support tslib touchscreen abstraction library */
#undef TSLIB
/* Support KDrive kbd driver */
#undef KDRIVE_KBD
/* Support KDrive mouse driver */
#undef KDRIVE_MOUSE
/* Support KDrive evdev driver */
#undef KDRIVE_EVDEV
/* Verbose debugging output hilarity */
#undef DEBUG
......
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