xserver-multidpi/include/xorg-config.h.in
Peter Hutterer a3922cf7f0 Allow compile-time selection of a fallback input driver
A new --with-fallback-input-driver=foo option allows selecting a
fallback driver for the server if the driver configured for the device
is not found.  Note that this only applies when the device has a driver
assigned and that module fails to load, devices without a driver are
ignored as usual.

This avoids the situation where a configuration assigns e.g. the
synaptics driver but that driver is not available on the system,
resulting in a dead device. A fallback driver can at least provides some
functionality.

This becomes more important as we move towards making other driver true
leaf nodes that can be installed/uninstalled as requested. Specifically,
wacom and synaptics, a config that assigns either driver should be
viable even when the driver itself is not (yet) installed on the system.

It is up to the distributions to make sure that the fallback driver is
always installed. The fallback driver can be disabled with
--without-fallback-input-driver and is disabled by default on non-Linux
systems because we don't have generic drivers on those platforms.
Default driver on Linux is libinput, evdev is the only other serious
candidate here.

Sample log output:
[  3274.421] (II) config/udev: Adding input device SynPS/2 Synaptics TouchPad (/dev/input/event4)
[  3274.421] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "touchpad weird driver"
[  3274.421] (II) LoadModule: "banana"
[  3274.422] (WW) Warning, couldn't open module banana
[  3274.422] (II) UnloadModule: "banana"
[  3274.422] (II) Unloading banana
[  3274.422] (EE) Failed to load module "banana" (module does not exist, 0)
[  3274.422] (EE) No input driver matching `banana'
[  3274.422] (II) Falling back to input driver `libinput'
.. server proceeds to assign libinput, init the device, world peace and rainbows
everywhere, truly what a sight. Shame about the banana though.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit c69bd15e00)
2016-09-01 16:32:58 +10:00

158 lines
3.2 KiB
C

/* xorg-config.h.in: not at all generated. -*- c -*-
*
* This file differs from xorg-server.h.in in that -server is installed
* with the rest of the SDK for external drivers/modules to use, whereas
* -config is for internal use only (i.e. building the DDX).
*
*/
#ifndef _XORG_CONFIG_H_
#define _XORG_CONFIG_H_
#include <dix-config.h>
#include <xkb-config.h>
/* Building Xorg server. */
#undef XORGSERVER
/* Current X.Org version. */
#undef XORG_VERSION_CURRENT
/* Name of X server. */
#undef __XSERVERNAME__
/* URL to go to for support. */
#undef __VENDORDWEBSUPPORT__
/* Built-in output drivers. */
#undef DRIVERS
/* Built-in input drivers. */
#undef IDRIVERS
/* Path to configuration file. */
#undef XF86CONFIGFILE
/* Path to configuration file. */
#undef __XCONFIGFILE__
/* Name of configuration directory. */
#undef __XCONFIGDIR__
/* Path to loadable modules. */
#undef DEFAULT_MODULE_PATH
/* Path to installed libraries. */
#undef DEFAULT_LIBRARY_PATH
/* Default log location */
#undef DEFAULT_LOGDIR
/* Default logfile prefix */
#undef DEFAULT_LOGPREFIX
/* Default XDG_DATA dir under HOME */
#undef DEFAULT_XDG_DATA_HOME
/* Default log dir under XDG_DATA_HOME */
#undef DEFAULT_XDG_DATA_HOME_LOGDIR
/* Building DRI-capable DDX. */
#undef XF86DRI
/* Build DRI2 extension */
#undef DRI2
/* Define to 1 if you have the <stropts.h> header file. */
#undef HAVE_STROPTS_H
/* Define to 1 if you have the <sys/kd.h> header file. */
#undef HAVE_SYS_KD_H
/* Define to 1 if you have the <sys/vt.h> header file. */
#undef HAVE_SYS_VT_H
/* Define to 1 if you have the `walkcontext' function (used on Solaris for
xorg_backtrace in hw/xfree86/common/xf86Events.c */
#undef HAVE_WALKCONTEXT
/* Define to 1 if unsigned long is 64 bits. */
#undef _XSERVER64
/* Building vgahw module */
#undef WITH_VGAHW
/* NetBSD PIO alpha IO */
#undef USE_ALPHA_PIO
/* BSD AMD64 iopl */
#undef USE_AMD64_IOPL
/* BSD /dev/io */
#undef USE_DEV_IO
/* BSD i386 iopl */
#undef USE_I386_IOPL
/* System is BSD-like */
#undef CSRG_BASED
/* System has PC console */
#undef PCCONS_SUPPORT
/* System has PCVT console */
#undef PCVT_SUPPORT
/* System has syscons console */
#undef SYSCONS_SUPPORT
/* System has wscons console */
#undef WSCONS_SUPPORT
/* System has /dev/xf86 aperture driver */
#undef HAS_APERTURE_DRV
/* Has backtrace support */
#undef HAVE_BACKTRACE
/* Name of the period field in struct kbd_repeat */
#undef LNX_KBD_PERIOD_NAME
/* Have execinfo.h */
#undef HAVE_EXECINFO_H
/* Define to 1 if you have the <sys/mkdev.h> header file. */
#undef HAVE_SYS_MKDEV_H
/* Path to text files containing PCI IDs */
#undef PCI_TXT_IDS_PATH
/* Use SIGIO handlers for input device events by default */
#undef USE_SIGIO_BY_DEFAULT
/* Build with libdrm support */
#undef WITH_LIBDRM
/* Use libpciaccess */
#undef XSERVER_LIBPCIACCESS
/* Have setugid */
#undef HAVE_ISSETUGID
/* Have getresuid */
#undef HAVE_GETRESUID
/* Have X server platform bus support */
#undef XSERVER_PLATFORM_BUS
/* Define to 1 if you have the `seteuid' function. */
#undef HAVE_SETEUID
/* Support APM/ACPI power management in the server */
#undef XF86PM
/* Fallback input driver if the assigned driver fails */
#undef FALLBACK_INPUT_DRIVER
#endif /* _XORG_CONFIG_H_ */