diff --git a/driver/xf86-input-joystick/COPYING b/driver/xf86-input-joystick/COPYING index 2f3bc01c2..7f33cbfd2 100644 --- a/driver/xf86-input-joystick/COPYING +++ b/driver/xf86-input-joystick/COPYING @@ -1,41 +1,12 @@ -Copyright 2007-2008 by Sascha Hlusiak. - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation, and that the name of Sascha Hlusiak not be used in -advertising or publicity pertaining to distribution of the software without -specific, written prior permission. Sascha Hlusiak makes no -representations about the suitability of this software for any purpose. It -is provided "as is" without express or implied warranty. - -SASCHA HLUSIAK DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO -EVENT SHALL SASCHA HLUSIAK BE LIABLE FOR ANY SPECIAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. +This is a stub file. This package has not yet had its complete licensing +information compiled. Please see the individual source files for details on +your rights to use and modify this software. -Copyright 2007-2009 by Sascha Hlusiak. -Copyright 1995-1999 by Frederic Lepied, France. - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation, and that the names of copyright holders not be used in -advertising or publicity pertaining to distribution of the software without -specific, written prior permission. The copyright holders make no -representations about the suitability of this software for any purpose. It -is provided "as is" without express or implied warranty. - -THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO -EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. +Please submit updated COPYING files to the Xorg bugzilla: +https://bugs.freedesktop.org/enter_bug.cgi?product=xorg + +All licensing questions regarding this software should be directed at the +Xorg mailing list: + +http://lists.freedesktop.org/mailman/listinfo/xorg diff --git a/driver/xf86-input-joystick/ChangeLog b/driver/xf86-input-joystick/ChangeLog index 6b0087f12..cf568f269 100644 --- a/driver/xf86-input-joystick/ChangeLog +++ b/driver/xf86-input-joystick/ChangeLog @@ -1,429 +1,3 @@ -commit bd6c54fe672a913334bfba1ca5dc0f2e0f1f1152 -Author: Sascha Hlusiak -Date: Wed Apr 20 20:55:24 2011 +0200 - - joystick 1.6.0 - - Signed-off-by: Sascha Hlusiak - -commit f1b8ef560049f1bb1bca9caa12c1529c9f992a09 -Author: Sascha Hlusiak -Date: Wed Apr 20 20:48:28 2011 +0200 - - Updated man page to reflect latest changes - -commit aa78e01edabb27d1b5dcd4ffe2be32878a45e342 -Author: Sascha Hlusiak -Date: Wed Apr 20 20:47:33 2011 +0200 - - Added xorg.conf.d example snipped - - Not installed by default, left for distributors. - - Copy 50-joystick-all.conf to /etc/X11/xorg.conf.d/ and modify to your needs. - -commit 29d3745e73d266db173828f40231cb78ec1c383a -Author: Sascha Hlusiak -Date: Wed Apr 20 19:48:28 2011 +0200 - - Revert "config: fdi file must be installed in $(datadir)/hal/fdi/policy/20thirdparty" - - The fdi file was never meant to be installed by default but exists merely as an - example and documentation for distributors who may decide to ship it by default or - install it in share/doc/... - - This reverts commit 1d67a2da26fa3ba0b8f5498da89c01aeaa551515. - -commit 4358209e7e4383b4ebdec93cc116bb1c21d373a7 -Author: Sascha Hlusiak -Date: Wed Apr 20 19:33:10 2011 +0200 - - Free pInfo->private only once to fix server crash on unplug (bug #35391) - - The hotplugged keyboard device and the main device share the same pInfo->private data - and the same jstkCoreUnInit, so the data is freed twice. Furthermore, since the keyboard - device will delete itself, we must not delete it from within the deletion of the main device. - - Freeing pInfo->private is done by the main device, hopefully done independently of the order - in which the two devices will be removed by the server. - - Should fix bug #35391 - -commit 3f03fa76f8fb152210c6ed80191f34e428af2c00 -Author: Peter Hutterer -Date: Wed Apr 6 21:02:49 2011 +1000 - - joystick 1.5.99.901 - - Signed-off-by: Peter Hutterer - -commit 8c7ad54d6d869bb4202aee8408c72ed72bf929a7 -Author: Peter Hutterer -Date: Tue Dec 14 17:00:28 2010 +1000 - - Support input ABI 12 - - This commit adds support for input ABI 12, consisting of a number of - changes: - - requires an X server with an ABI of 12 - - valuators have a per-mode setting - - new PreInit prototype. - - Because of the new PreInit prototype, the hotplug system has been switched - around too (should have probably been done in a separate commit before, - but...). - - The old hotplug mechanism added a separate ModuleInfoRec for the keyboard - part of the driver. This isn't feasable for InputClass configurations, the - driver part may get overwritten. - - On entering the driver, after checking a few default values, hotplug the - keyboard device (wacom-style) and let it initialize. Because NIDR calls - DEVICE_INIT and DEVICE_ON the keyboard must initialise the private pointer - and pass it back to the original device. - - Call order is: - NewInputDeviceRequest - - jstkCorePreInit - - jstkKeyboardHotplug - - NewInputDeviceRequest - - jstkCorePreInit - immediately return jstkKeyboardPreInit() - - keyboard DEVICE_INIT - - keyboard DEVICE_ON - return keyboard device - - copy keyboard->priv to joystick->priv - - finish jstkCorePreInit as normal - - joystick DEVICE_INIT - - joystick DEVICE_ON - - Signed-off-by: Peter Hutterer - Reviewed-by: Trevor Woerner - -commit f2050e6be5b6b3f8c429060992cc3ead0cfe86c1 -Author: Peter Hutterer -Date: Tue Dec 14 16:51:15 2010 +1000 - - Get the option values from pInfo instead of from the IDevRec. - - Doesn't matter which one we take, but ABI 12 dropped the IDevRec. - - Signed-off-by: Peter Hutterer - Reviewed-by: Trevor Woerner - -commit df0567d2fa2d67a00dce78a89803e8925d20e324 -Author: Peter Hutterer -Date: Tue Dec 14 16:48:50 2010 +1000 - - Don't call xf86OptionListReport() - - All options used by the driver will show up in the log anyway. - And new xserver versions will call this for debugging purposes for us. - - Signed-off-by: Peter Hutterer - Reviewed-by: Trevor Woerner - -commit 135aaf612bcb591ae1692ae47b2d36a814230cbe -Author: Peter Hutterer -Date: Tue Dec 14 15:19:08 2010 +1000 - - Purge use of XI_PRIVATE macro. - - Signed-off-by: Peter Hutterer - Reviewed-by: Trevor Woerner - -commit 29a486ba56bc6279297a716b018ba24880680e82 -Author: Peter Hutterer -Date: Tue Dec 14 15:14:47 2010 +1000 - - Drop close_proc, conversion_proc, reverse_conversion_proc - - All three aren't called by the server. - - Signed-off-by: Peter Hutterer - Reviewed-by: Trevor Woerner - -commit 0674bdfdb67e9195af7cb5982ae2eda0fa03ce57 -Author: Peter Hutterer -Date: Tue Dec 14 15:09:32 2010 +1000 - - Don't handle history_size in the driver. - - This has been handled in the server for quite a while now, just initialize - with the defaults and ignore it otherwise. - - Signed-off-by: Peter Hutterer - Reviewed-by: Trevor Woerner - -commit 39205d76cb45242ee9b47594ec5be7edc509edc7 -Author: Peter Hutterer -Date: Tue Dec 14 15:08:49 2010 +1000 - - Require server 1.9, drop pre-ABI 11 support. - - Signed-off-by: Peter Hutterer - Reviewed-by: Trevor Woerner - -commit 074dc4a2a06aebae144afc21de5c4f8bc365937d -Author: Peter Hutterer -Date: Tue Dec 14 15:04:44 2010 +1000 - - Remove usage of XI86_POINTER_CAPABLE flag. - - Flag was write-only for a number of server generations already. - - Signed-off-by: Peter Hutterer - Reviewed-by: Trevor Woerner - -commit 107e4b14d90d06864247c7878ee0cc5f59e4bc5a -Author: Peter Hutterer -Date: Tue Dec 14 14:47:31 2010 +1000 - - Replace LocalDevicePtr with InputInfoPtr - - Both typedefs describe the same struct, LocalDevicePtr has been removed with - input ABI 12. - - Signed-off-by: Peter Hutterer - Reviewed-by: Trevor Woerner - -commit a23a4a77c7157c516a8194e05e9f07b64d8e8089 -Author: Peter Hutterer -Date: Tue Dec 14 15:03:45 2010 +1000 - - Bump to 1.5.99 - -commit cd6b81d377a5d541100996fa4e2ac2decffe65f1 -Author: Trevor Woerner -Date: Sun Oct 17 21:26:16 2010 -0400 - - Code cleanup, bad structure initialization. - - The InputDriverRec data structure in xserver/hw/xfree86/common/xf86Xinput.h - no longer contains an integer refCount member; as per commit - d568221710959cf7d783e6ff0fb80fb43a231124. - - Signed-off-by: Trevor Woerner - Signed-off-by: Peter Hutterer - -commit 38363bde5d94c9a8f163fde31ede067f6d0d1669 -Author: Trevor Woerner -Date: Sun Oct 17 21:25:56 2010 -0400 - - Deprecated code cleanup. - - Replace calls to deprecated functions (Xfree(), Xcalloc(), Xmalloc(), etc) - with calls to standard dynamic memory functions (free(), calloc(), malloc(), - etc) in driver code. - - Signed-off-by: Trevor Woerner - Signed-off-by: Peter Hutterer - -commit d209590c06e7a4df9d921ff53cb9792e9beb1aeb -Author: Gaetan Nadon -Date: Fri Jun 11 22:00:45 2010 -0400 - - COPYING: replace stub file with Copyright notices - - Signed-off-by: Gaetan Nadon - -commit 1d67a2da26fa3ba0b8f5498da89c01aeaa551515 -Author: Gaetan Nadon -Date: Fri Jun 11 21:50:34 2010 -0400 - - config: fdi file must be installed in $(datadir)/hal/fdi/policy/20thirdparty - - Signed-off-by: Gaetan Nadon - -commit 09ca64e76568868e8f9c7bf48e8858669fc5aaa7 -Author: Gaetan Nadon -Date: Fri Jun 11 21:47:23 2010 -0400 - - config: EXTRA_DIST is redundant - - sdkdir provides the install path for sdk_HEADERS primary - - Signed-off-by: Gaetan Nadon - -commit 55783bf0cd5e0ae29b008dd3fc3a47c66eabffbd -Author: Gaetan Nadon -Date: Fri Jun 11 17:46:37 2010 -0400 - - config: upgrade to util-macros 1.8 for additional man page support - - Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS - The value of MAN_SUBST is the same for all X.Org packages. - Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS - Use $(AM_V_GEN)$(SED) to support silent rule - - Signed-off-by: Gaetan Nadon - -commit 342908f4d06c8000789d659b9f8871e56812b78e -Author: Gaetan Nadon -Date: Fri Jun 11 17:41:59 2010 -0400 - - config: fix warnings, m4 quoting and layout - - Fix some m4 quoting - Fix some autoconf warnings - Regroup statements per section - Add comments - Remove unused NDEBUG define - - Signed-off-by: Gaetan Nadon - -commit e98f0d0349222a4d981086f944398d32a548d953 -Author: Gaetan Nadon -Date: Sun Apr 18 15:37:29 2010 -0400 - - config: remove AC_PROG_CC as it overrides AC_PROG_C_C99 - - XORG_STRICT_OPTION from XORG_DEFAULT_OPTIONS calls - AC_PROG_C_C99. This sets gcc with -std=gnu99. - If AC_PROG_CC macro is called afterwards, it resets CC to gcc. - - Signed-off-by: Gaetan Nadon - -commit c6908579b56b7d8c478ebe8c07e2a68a30c5de44 -Author: Gaetan Nadon -Date: Sun Apr 18 15:36:32 2010 -0400 - - config: remove unrequired AC_HEADER_STDC - - Autoconf says: - "This macro is obsolescent, as current systems have conforming - header files. New programs need not use this macro". - - Signed-off-by: Gaetan Nadon - -commit ab6308ed177fc341ba0cca3e4a9048f858d80007 -Author: Gaetan Nadon -Date: Sun Apr 18 15:35:45 2010 -0400 - - config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS - - Regroup AC statements at the top. - - Signed-off-by: Gaetan Nadon - -commit 2252c78fb11b09c688b1b2cc82a542fc2470b8e2 -Author: Gaetan Nadon -Date: Sun Apr 18 15:26:16 2010 -0400 - - config: update AC_PREREQ statement to 2.60 - - Unrelated to the previous patches, the new value simply reflects - the reality that the minimum level for autoconf to configure - all x.org modules is 2.60 dated June 2006. - - ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz - - Signed-off-by: Gaetan Nadon - -commit 25722aa12bfbb5675a02d7d8520ae83fdc5735c8 -Author: Gaetan Nadon -Date: Sun Apr 18 15:24:59 2010 -0400 - - config: remove AH_TOP autoheader statement - - The generated config.h does not need to include xorg-server.h - for the content it provides. - Add #include in .[hc] files as needed. - - Signed-off-by: Gaetan Nadon - -commit 3de065d6822206695c0aee2fd68cd9db8b2f3063 -Author: Gaetan Nadon -Date: Thu Feb 11 10:08:07 2010 -0500 - - config: move CWARNFLAGS from configure.ac to Makefile.am - - Compiler warning flags should be explicitly set in the makefile - rather than being merged with other packages compiler flags. - - Signed-off-by: Gaetan Nadon - -commit 30d1089cffc9afd9fd468a6c30989e77c7884248 -Author: Alan Coopersmith -Date: Fri Jan 15 15:08:26 2010 -0800 - - Update Sun license notices to current X.Org standard form - - Signed-off-by: Alan Coopersmith - -commit efe94ccfb4505f18a44b39ada256df8ba16b3ec5 -Author: Gaetan Nadon -Date: Mon Dec 28 15:05:39 2009 -0500 - - configure.ac: use backticks rather than $() for cmd subs - - Use "$PKG_CONFIG" rather than hard coded "pkg-config" - - Acked-by: Dan Nicholson - Acked-by: Daniel Stone - - Signed-off-by: Gaetan Nadon - -commit ad0abb97a19e311988deffd385ca69e96bd106a4 -Author: Gaetan Nadon -Date: Mon Nov 23 09:25:05 2009 -0500 - - Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES - - Now that the INSTALL file is generated. - Allows running make maintainer-clean. - -commit 260c441981c1fe1c6e076bde1a6a26328e6b5675 -Author: Gaetan Nadon -Date: Wed Oct 28 14:41:41 2009 -0400 - - INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206 - - Automake 'foreign' option is specified in configure.ac. - Remove from Makefile.am - -commit 877f13a6056cc8b17a73a5d4c839cd8b30065f9b -Author: Gaetan Nadon -Date: Wed Oct 28 14:09:09 2009 -0400 - - INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206 - - Add missing INSTALL file. Use standard GNU file on building tarball - README may have been updated - Remove AUTHORS file as it is empty and no content available yet. - Remove NEWS file as it is empty and no content available yet. - -commit 9fc986bd5dc3bd1741b1ad4e4da152edfaf928d9 -Author: Gaetan Nadon -Date: Mon Oct 26 12:54:20 2009 -0400 - - Several driver modules do not have a ChangeLog target in Makefile.am #23814 - - The git generated ChangeLog replaces the hand written one. - Update configure.ac to xorg-macros level 1.3. - Use XORG_DEFAULT_OPTIONS which replaces four XORG_* macros - Update Makefile.am to add ChangeLog target if missing - Remove ChangeLog from EXTRA_DIST or *CLEAN variables - This is a pre-req for the INSTALL_CMD - -commit cd4e5ab0c64f477c343ab161ec309c42b9737450 -Author: Gaetan Nadon -Date: Thu Oct 22 12:34:16 2009 -0400 - - .gitignore: use common defaults with custom section # 24239 - - Using common defaults will reduce errors and maintenance. - Only the very small or inexistent custom section need periodic maintenance - when the structure of the component changes. Do not edit defaults. - -commit eaf8d1a1d87af9f67ca3e3d0436bb9d9a7cfc17a -Author: Sascha Hlusiak -Date: Sat Oct 31 12:41:15 2009 +0100 - - Bump to 1.5.0 - - Signed-off-by: Sascha Hlusiak - commit 657c01c8ebb9e0571d498356e6d3d03917199328 Author: Sascha Hlusiak Date: Wed Oct 7 09:24:39 2009 +0200 diff --git a/driver/xf86-input-joystick/Makefile.am b/driver/xf86-input-joystick/Makefile.am index 13946b88d..be8812fc7 100644 --- a/driver/xf86-input-joystick/Makefile.am +++ b/driver/xf86-input-joystick/Makefile.am @@ -18,19 +18,19 @@ # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +AUTOMAKE_OPTIONS = foreign DISTCHECK_CONFIGURE_FLAGS = --with-sdkdir=\$${includedir}/xorg SUBDIRS = src man config include -MAINTAINERCLEANFILES = ChangeLog INSTALL pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = xorg-joystick.pc -.PHONY: ChangeLog INSTALL +EXTRA_DIST = ChangeLog +MAINTAINERCLEANFILES = ChangeLog -INSTALL: - $(INSTALL_CMD) +.PHONY: ChangeLog ChangeLog: $(CHANGELOG_CMD) -dist-hook: ChangeLog INSTALL +dist-hook: ChangeLog diff --git a/driver/xf86-input-joystick/Makefile.in b/driver/xf86-input-joystick/Makefile.in index 15957b607..06368bb4f 100644 --- a/driver/xf86-input-joystick/Makefile.in +++ b/driver/xf86-input-joystick/Makefile.in @@ -43,9 +43,9 @@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ -install_sh_DATA = ${SHELL} $(install_sh) -c -m 644 -install_sh_PROGRAM = ${SHELL} $(install_sh) -c -install_sh_SCRIPT = ${SHELL} $(install_sh) -c +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : @@ -59,8 +59,8 @@ host_triplet = @host@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/xorg-joystick.pc.in $(top_srcdir)/configure COPYING \ - ChangeLog INSTALL config.guess config.sub depcomp install-sh \ - ltmain.sh missing + ChangeLog config.guess config.sub depcomp install-sh ltmain.sh \ + missing subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac @@ -108,7 +108,6 @@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -151,7 +150,6 @@ FFLAGS = @FFLAGS@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ GREP = @GREP@ -INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -241,11 +239,13 @@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +AUTOMAKE_OPTIONS = foreign DISTCHECK_CONFIGURE_FLAGS = --with-sdkdir=\$${includedir}/xorg SUBDIRS = src man config include -MAINTAINERCLEANFILES = ChangeLog INSTALL pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = xorg-joystick.pc +EXTRA_DIST = ChangeLog +MAINTAINERCLEANFILES = ChangeLog all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -710,15 +710,12 @@ uninstall-info: uninstall-info-recursive uninstall-pkgconfigDATA -.PHONY: ChangeLog INSTALL - -INSTALL: - $(INSTALL_CMD) +.PHONY: ChangeLog ChangeLog: $(CHANGELOG_CMD) -dist-hook: ChangeLog INSTALL +dist-hook: ChangeLog # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/driver/xf86-input-joystick/aclocal.m4 b/driver/xf86-input-joystick/aclocal.m4 index 50aad887e..b8fd22345 100644 --- a/driver/xf86-input-joystick/aclocal.m4 +++ b/driver/xf86-input-joystick/aclocal.m4 @@ -7134,6 +7134,18 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 + +# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. +AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) + # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 diff --git a/driver/xf86-input-joystick/config.h.in b/driver/xf86-input-joystick/config.h.in index 0cf43dd24..5982cc09f 100644 --- a/driver/xf86-input-joystick/config.h.in +++ b/driver/xf86-input-joystick/config.h.in @@ -1,5 +1,7 @@ /* config.h.in. Generated from configure.ac by autoheader. */ +#include "xorg-server.h" + /* Compile BSD usbhid backend */ #undef BSD_BACKEND @@ -63,6 +65,9 @@ /* Compile Linux joystick backend */ #undef LINUX_BACKEND +/* Disable some debugging code */ +#undef NDEBUG + /* Name of package */ #undef PACKAGE diff --git a/driver/xf86-input-joystick/config/Makefile.am b/driver/xf86-input-joystick/config/Makefile.am index 2aef07118..c96ffeb54 100644 --- a/driver/xf86-input-joystick/config/Makefile.am +++ b/driver/xf86-input-joystick/config/Makefile.am @@ -1 +1 @@ -EXTRA_DIST = 50-x11-input-joystick.fdi 50-joystick-all.conf +EXTRA_DIST = 50-x11-input-joystick.fdi diff --git a/driver/xf86-input-joystick/config/Makefile.in b/driver/xf86-input-joystick/config/Makefile.in index 180f2e03b..bed5622a8 100644 --- a/driver/xf86-input-joystick/config/Makefile.in +++ b/driver/xf86-input-joystick/config/Makefile.in @@ -22,9 +22,9 @@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ -install_sh_DATA = ${SHELL} $(install_sh) -c -m 644 -install_sh_PROGRAM = ${SHELL} $(install_sh) -c -install_sh_SCRIPT = ${SHELL} $(install_sh) -c +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : @@ -53,7 +53,6 @@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -96,7 +95,6 @@ FFLAGS = @FFLAGS@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ GREP = @GREP@ -INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -186,7 +184,7 @@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -EXTRA_DIST = 50-x11-input-joystick.fdi 50-joystick-all.conf +EXTRA_DIST = 50-x11-input-joystick.fdi all: all-am .SUFFIXES: @@ -199,9 +197,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign config/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign config/Makefile + $(AUTOMAKE) --gnu config/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/driver/xf86-input-joystick/configure b/driver/xf86-input-joystick/configure index 9b7d4458c..ad1f14b54 100644 --- a/driver/xf86-input-joystick/configure +++ b/driver/xf86-input-joystick/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.62 for xf86-input-joystick 1.6.0. +# Generated by GNU Autoconf 2.62 for xf86-input-joystick 1.5.0. # # Report bugs to . # @@ -750,8 +750,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='xf86-input-joystick' PACKAGE_TARNAME='xf86-input-joystick' -PACKAGE_VERSION='1.6.0' -PACKAGE_STRING='xf86-input-joystick 1.6.0' +PACKAGE_VERSION='1.5.0' +PACKAGE_STRING='xf86-input-joystick 1.5.0' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' ac_unique_file="Makefile.am" @@ -898,9 +898,20 @@ FFLAGS ac_ct_F77 LIBTOOL CWARNFLAGS -CHANGELOG_CMD +DEBUG_TRUE +DEBUG_FALSE +inputdir PKG_CONFIG -INSTALL_CMD +XORG_CFLAGS +XORG_LIBS +sdkdir +LINUX_BACKEND_TRUE +LINUX_BACKEND_FALSE +BSD_BACKEND_TRUE +BSD_BACKEND_FALSE +EVDEV_BACKEND_TRUE +EVDEV_BACKEND_FALSE +DRIVER_NAME APP_MAN_SUFFIX LIB_MAN_SUFFIX FILE_MAN_SUFFIX @@ -915,20 +926,7 @@ DRIVER_MAN_DIR ADMIN_MAN_DIR XORG_MAN_PAGE MAN_SUBSTS -AM_DEFAULT_VERBOSITY -XORG_CFLAGS -XORG_LIBS -DRIVER_NAME -inputdir -sdkdir -DEBUG_TRUE -DEBUG_FALSE -LINUX_BACKEND_TRUE -LINUX_BACKEND_FALSE -BSD_BACKEND_TRUE -BSD_BACKEND_FALSE -EVDEV_BACKEND_TRUE -EVDEV_BACKEND_FALSE +CHANGELOG_CMD LIBOBJS LTLIBOBJS' ac_subst_files='' @@ -943,10 +941,9 @@ with_gnu_ld enable_libtool_lock with_pic with_tags -enable_strict_compilation with_xorg_module_dir -with_sdkdir enable_debug +with_sdkdir ' ac_precious_vars='build_alias host_alias @@ -1518,7 +1515,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures xf86-input-joystick 1.6.0 to adapt to many kinds of systems. +\`configure' configures xf86-input-joystick 1.5.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1589,7 +1586,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xf86-input-joystick 1.6.0:";; + short | recursive ) echo "Configuration of xf86-input-joystick 1.5.0:";; esac cat <<\_ACEOF @@ -1606,10 +1603,7 @@ Optional Features: --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-libtool-lock avoid locking (might break parallel builds) - --enable-strict-compilation - Enable all warnings from compiler and make them - errors (default: disabled) - --enable-debug Enable debugging (default: disabled) + --enable-debug Enable debugging (default: enabled) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1707,7 +1701,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -xf86-input-joystick configure 1.6.0 +xf86-input-joystick configure 1.5.0 generated by GNU Autoconf 2.62 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1721,7 +1715,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xf86-input-joystick $as_me 1.6.0, which was +It was created by xf86-input-joystick $as_me 1.5.0, which was generated by GNU Autoconf 2.62. Invocation command line was $ $0 $@ @@ -2088,7 +2082,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_config_headers="$ac_config_headers config.h" ac_aux_dir= for ac_dir in . "$srcdir"/.; do @@ -2121,8 +2114,6 @@ ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - -# Initialize Automake am__api_version="1.9" # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -2375,7 +2366,7 @@ fi # Define the identity of the package. PACKAGE='xf86-input-joystick' - VERSION='1.6.0' + VERSION='1.5.0' cat >>confdefs.h <<_ACEOF @@ -2521,6 +2512,7 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + { $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. @@ -2546,7 +2538,22 @@ fi -# Initialize libtool +# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG + + + + + + + + + + + +ac_config_headers="$ac_config_headers config.h" + + +# Checks for programs. # Check whether --enable-static was given. if test "${enable_static+set}" = set; then enableval=$enable_static; p=${PACKAGE-default} @@ -4433,7 +4440,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4436 "configure"' > conftest.$ac_ext + echo '#line 4443 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7541,11 +7548,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7544: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7551: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7548: \$? = $ac_status" >&5 + echo "$as_me:7555: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7831,11 +7838,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7834: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7841: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7838: \$? = $ac_status" >&5 + echo "$as_me:7845: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7935,11 +7942,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7938: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7945: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7942: \$? = $ac_status" >&5 + echo "$as_me:7949: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -10335,7 +10342,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:12854: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12851: \$? = $ac_status" >&5 + echo "$as_me:12858: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -12948,11 +12955,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12951: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12958: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12955: \$? = $ac_status" >&5 + echo "$as_me:12962: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14531,11 +14538,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14534: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14541: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14538: \$? = $ac_status" >&5 + echo "$as_me:14545: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -14635,11 +14642,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14638: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14645: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14642: \$? = $ac_status" >&5 + echo "$as_me:14649: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -16850,11 +16857,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16853: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16860: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16857: \$? = $ac_status" >&5 + echo "$as_me:16864: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17140,11 +17147,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17143: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17150: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17147: \$? = $ac_status" >&5 + echo "$as_me:17154: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17244,11 +17251,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17247: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17254: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17251: \$? = $ac_status" >&5 + echo "$as_me:17258: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -19929,17 +19936,802 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS -# Initialize X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS - - - - - - +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:$LINENO: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:$LINENO: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type +if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C99" >&5 @@ -20146,6 +20938,131 @@ esac +if test "x$GCC" = xyes ; then + CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ +-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ +-Wbad-function-cast -Wformat=2" + case `$CC -dumpversion` in + 3.4.* | 4.*) + CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" + ;; + esac +else + { $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5 +$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; } +if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef __SUNPRO_C + (void) __SUNPRO_C; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl___SUNPRO_C=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl___SUNPRO_C=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5 +$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; } +if test $ac_cv_have_decl___SUNPRO_C = yes; then + SUNCC="yes" +else + SUNCC="no" +fi + + if test "x$SUNCC" = "xyes"; then + CWARNFLAGS="-v" + fi +fi + + + + + + + +# Check whether --with-xorg-module-dir was given. +if test "${with_xorg_module_dir+set}" = set; then + withval=$with_xorg_module_dir; moduledir="$withval" +else + moduledir="$libdir/xorg/modules" +fi + + +# Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then + enableval=$enable_debug; DEBUGGING=$enableval +else + DEBUGGING=yes +fi + +if test "x$DEBUGGING" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define DEBUG 1 +_ACEOF + +else + +cat >>confdefs.h <<\_ACEOF +#define NDEBUG 1 +_ACEOF + +fi + + +if test "x$DEBUGGING" = xyes; then + DEBUG_TRUE= + DEBUG_FALSE='#' +else + DEBUG_TRUE='#' + DEBUG_FALSE= +fi + + +inputdir=${moduledir}/input + + +# Checks for extensions + + if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. @@ -20264,434 +21181,6 @@ $as_echo "no" >&6; } fi fi -{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - $as_unset ac_script || ac_script= - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done -done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5 -$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;} - { (exit 1); exit 1; }; } - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - - - - - -if test "x$GCC" = xyes ; then - CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ --Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ --Wbad-function-cast -Wformat=2" - case `$CC -dumpversion` in - 3.4.* | 4.*) - CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" - ;; - esac -else - { $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5 -$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; } -if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef __SUNPRO_C - (void) __SUNPRO_C; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl___SUNPRO_C=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_have_decl___SUNPRO_C=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5 -$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; } -if test $ac_cv_have_decl___SUNPRO_C = yes; then - SUNCC="yes" -else - SUNCC="no" -fi - - if test "x$SUNCC" = "xyes"; then - CWARNFLAGS="-v" - fi -fi - - - -# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89 - - - -# Check whether --enable-strict-compilation was given. -if test "${enable_strict_compilation+set}" = set; then - enableval=$enable_strict_compilation; STRICT_COMPILE=$enableval -else - STRICT_COMPILE=no -fi - -if test "x$STRICT_COMPILE" = "xyes"; then - { $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5 -$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; } -if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef __SUNPRO_C - (void) __SUNPRO_C; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl___SUNPRO_C=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_have_decl___SUNPRO_C=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5 -$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; } -if test $ac_cv_have_decl___SUNPRO_C = yes; then - SUNCC="yes" -else - SUNCC="no" -fi - - { $as_echo "$as_me:$LINENO: checking whether __INTEL_COMPILER is declared" >&5 -$as_echo_n "checking whether __INTEL_COMPILER is declared... " >&6; } -if test "${ac_cv_have_decl___INTEL_COMPILER+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef __INTEL_COMPILER - (void) __INTEL_COMPILER; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl___INTEL_COMPILER=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_have_decl___INTEL_COMPILER=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___INTEL_COMPILER" >&5 -$as_echo "$ac_cv_have_decl___INTEL_COMPILER" >&6; } -if test $ac_cv_have_decl___INTEL_COMPILER = yes; then - INTELCC="yes" -else - INTELCC="no" -fi - - if test "x$GCC" = xyes ; then - STRICT_CFLAGS="-pedantic -Werror" - elif test "x$SUNCC" = "xyes"; then - STRICT_CFLAGS="-errwarn" - elif test "x$INTELCC" = "xyes"; then - STRICT_CFLAGS="-Werror" - fi -fi -CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" - - - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1` -_ACEOF - - PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` - if test "x$PVM" = "x"; then - PVM="0" - fi - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION_MINOR $PVM -_ACEOF - - PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` - if test "x$PVP" = "x"; then - PVP="0" - fi - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION_PATCHLEVEL $PVP -_ACEOF - - - -CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ -mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ -|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ -echo 'git directory not found: installing possibly empty changelog.' >&2)" - - - - -macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` -INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ -mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ -|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ -echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" - - - - - - -if test x$APP_MAN_SUFFIX = x ; then - APP_MAN_SUFFIX=1 -fi -if test x$APP_MAN_DIR = x ; then - APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' -fi - -if test x$LIB_MAN_SUFFIX = x ; then - LIB_MAN_SUFFIX=3 -fi -if test x$LIB_MAN_DIR = x ; then - LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' -fi - -if test x$FILE_MAN_SUFFIX = x ; then - case $host_os in - solaris*) FILE_MAN_SUFFIX=4 ;; - *) FILE_MAN_SUFFIX=5 ;; - esac -fi -if test x$FILE_MAN_DIR = x ; then - FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' -fi - -if test x$MISC_MAN_SUFFIX = x ; then - case $host_os in - solaris*) MISC_MAN_SUFFIX=5 ;; - *) MISC_MAN_SUFFIX=7 ;; - esac -fi -if test x$MISC_MAN_DIR = x ; then - MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' -fi - -if test x$DRIVER_MAN_SUFFIX = x ; then - case $host_os in - solaris*) DRIVER_MAN_SUFFIX=7 ;; - *) DRIVER_MAN_SUFFIX=4 ;; - esac -fi -if test x$DRIVER_MAN_DIR = x ; then - DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' -fi - -if test x$ADMIN_MAN_SUFFIX = x ; then - case $host_os in - solaris*) ADMIN_MAN_SUFFIX=1m ;; - *) ADMIN_MAN_SUFFIX=8 ;; - esac -fi -if test x$ADMIN_MAN_DIR = x ; then - ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' -fi - - - - - - - - - - - - - - - -XORG_MAN_PAGE="X Version 11" - -MAN_SUBSTS="\ - -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ - -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ - -e 's|__xservername__|Xorg|g' \ - -e 's|__xconfigfile__|xorg.conf|g' \ - -e 's|__projectroot__|\$(prefix)|g' \ - -e 's|__apploaddir__|\$(appdefaultdir)|g' \ - -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ - -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ - -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ - -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ - -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ - -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" - - - -AM_DEFAULT_VERBOSITY=1 - - - -# Checks for extensions SAVE_CFLAGS="$CFLAGS" @@ -20824,12 +21313,12 @@ if test -n "$PKG_CONFIG"; then pkg_cv_XORG_CFLAGS="$XORG_CFLAGS" else if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xorg-server >= 1.9.99.2 xproto \$REQUIRED_MODULES\"") >&5 - ($PKG_CONFIG --exists --print-errors "xorg-server >= 1.9.99.2 xproto $REQUIRED_MODULES") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xorg-server >= 1.3.99.901 xproto \$REQUIRED_MODULES\"") >&5 + ($PKG_CONFIG --exists --print-errors "xorg-server >= 1.3.99.901 xproto $REQUIRED_MODULES") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_XORG_CFLAGS=`$PKG_CONFIG --cflags "xorg-server >= 1.9.99.2 xproto $REQUIRED_MODULES" 2>/dev/null` + pkg_cv_XORG_CFLAGS=`$PKG_CONFIG --cflags "xorg-server >= 1.3.99.901 xproto $REQUIRED_MODULES" 2>/dev/null` else pkg_failed=yes fi @@ -20842,12 +21331,12 @@ if test -n "$PKG_CONFIG"; then pkg_cv_XORG_LIBS="$XORG_LIBS" else if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xorg-server >= 1.9.99.2 xproto \$REQUIRED_MODULES\"") >&5 - ($PKG_CONFIG --exists --print-errors "xorg-server >= 1.9.99.2 xproto $REQUIRED_MODULES") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xorg-server >= 1.3.99.901 xproto \$REQUIRED_MODULES\"") >&5 + ($PKG_CONFIG --exists --print-errors "xorg-server >= 1.3.99.901 xproto $REQUIRED_MODULES") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_XORG_LIBS=`$PKG_CONFIG --libs "xorg-server >= 1.9.99.2 xproto $REQUIRED_MODULES" 2>/dev/null` + pkg_cv_XORG_LIBS=`$PKG_CONFIG --libs "xorg-server >= 1.3.99.901 xproto $REQUIRED_MODULES" 2>/dev/null` else pkg_failed=yes fi @@ -20866,14 +21355,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XORG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xorg-server >= 1.9.99.2 xproto $REQUIRED_MODULES"` + XORG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xorg-server >= 1.3.99.901 xproto $REQUIRED_MODULES"` else - XORG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xorg-server >= 1.9.99.2 xproto $REQUIRED_MODULES"` + XORG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xorg-server >= 1.3.99.901 xproto $REQUIRED_MODULES"` fi # Put the nasty error message in config.log where it belongs echo "$XORG_PKG_ERRORS" >&5 - { { $as_echo "$as_me:$LINENO: error: Package requirements (xorg-server >= 1.9.99.2 xproto $REQUIRED_MODULES) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements (xorg-server >= 1.3.99.901 xproto $REQUIRED_MODULES) were not met: $XORG_PKG_ERRORS @@ -20884,7 +21373,7 @@ Alternatively, you may set the environment variables XORG_CFLAGS and XORG_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 -$as_echo "$as_me: error: Package requirements (xorg-server >= 1.9.99.2 xproto $REQUIRED_MODULES) were not met: +$as_echo "$as_me: error: Package requirements (xorg-server >= 1.3.99.901 xproto $REQUIRED_MODULES) were not met: $XORG_PKG_ERRORS @@ -20925,66 +21414,21 @@ else $as_echo "yes" >&6; } : fi - -DRIVER_NAME=joystick - - -# ----------------------------------------------------------------------------- -# Configuration options -# ----------------------------------------------------------------------------- -# Define a configure option for an alternate input module directory - -# Check whether --with-xorg-module-dir was given. -if test "${with_xorg_module_dir+set}" = set; then - withval=$with_xorg_module_dir; moduledir="$withval" -else - moduledir="$libdir/xorg/modules" -fi - -inputdir=${moduledir}/input - - -# Define a configure option for an alternate X Server SDK Headers -# X Server SDK location is required to install joystick header files +XORG_CFLAGS="$CWARNFLAGS $XORG_CFLAGS" +xorg_sdkdir=$(pkg-config --variable=sdkdir xorg-server) # Check whether --with-sdkdir was given. if test "${with_sdkdir+set}" = set; then withval=$with_sdkdir; sdkdir="$withval" else - sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` + sdkdir="${xorg_sdkdir}" fi -# Define a configure option to enable code debugging -# Check whether --enable-debug was given. -if test "${enable_debug+set}" = set; then - enableval=$enable_debug; DEBUGGING=$enableval -else - DEBUGGING=no -fi +# Checks for libraries. -if test "x$DEBUGGING" = xyes; then - -cat >>confdefs.h <<\_ACEOF -#define DEBUG 1 -_ACEOF - -fi - - -if test "x$DEBUGGING" = xyes; then - DEBUG_TRUE= - DEBUG_FALSE='#' -else - DEBUG_TRUE='#' - DEBUG_FALSE= -fi - - -# ----------------------------------------------------------------------------- -# Determine which joystick backend to build -# ----------------------------------------------------------------------------- +# Checks for header files. linux_backend=yes for ac_header in linux/joystick.h @@ -21789,7 +22233,382 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi -# ----------------------------------------------------------------------------- + +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + + +DRIVER_NAME=joystick + + +{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if test "${ac_cv_path_SED+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + $as_unset ac_script || ac_script= + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5 +$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + + + + + +if test x$APP_MAN_SUFFIX = x ; then + APP_MAN_SUFFIX=1 +fi +if test x$APP_MAN_DIR = x ; then + APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' +fi + +if test x$LIB_MAN_SUFFIX = x ; then + LIB_MAN_SUFFIX=3 +fi +if test x$LIB_MAN_DIR = x ; then + LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' +fi + +if test x$FILE_MAN_SUFFIX = x ; then + case $host_os in + solaris*) FILE_MAN_SUFFIX=4 ;; + *) FILE_MAN_SUFFIX=5 ;; + esac +fi +if test x$FILE_MAN_DIR = x ; then + FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' +fi + +if test x$MISC_MAN_SUFFIX = x ; then + case $host_os in + solaris*) MISC_MAN_SUFFIX=5 ;; + *) MISC_MAN_SUFFIX=7 ;; + esac +fi +if test x$MISC_MAN_DIR = x ; then + MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' +fi + +if test x$DRIVER_MAN_SUFFIX = x ; then + case $host_os in + solaris*) DRIVER_MAN_SUFFIX=7 ;; + *) DRIVER_MAN_SUFFIX=4 ;; + esac +fi +if test x$DRIVER_MAN_DIR = x ; then + DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' +fi + +if test x$ADMIN_MAN_SUFFIX = x ; then + case $host_os in + solaris*) ADMIN_MAN_SUFFIX=1m ;; + *) ADMIN_MAN_SUFFIX=8 ;; + esac +fi +if test x$ADMIN_MAN_DIR = x ; then + ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' +fi + + + + + + + + + + + + + + + +XORG_MAN_PAGE="X Version 11" + +MAN_SUBSTS="\ + -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ + -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ + -e 's|__xservername__|Xorg|g' \ + -e 's|__xconfigfile__|xorg.conf|g' \ + -e 's|__projectroot__|\$(prefix)|g' \ + -e 's|__apploaddir__|\$(appdefaultdir)|g' \ + -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ + -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ + -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ + -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ + -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ + -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" + + + + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1` +_ACEOF + + PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` + if test "x$PVM" = "x"; then + PVM="0" + fi + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION_MINOR $PVM +_ACEOF + + PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` + if test "x$PVP" = "x"; then + PVP="0" + fi + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION_PATCHLEVEL $PVP +_ACEOF + + + +CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ +mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ +|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ +echo 'git directory not found: installing possibly empty changelog.' >&2)" + + ac_config_files="$ac_config_files Makefile src/Makefile man/Makefile config/Makefile include/Makefile xorg-joystick.pc" @@ -21918,6 +22737,13 @@ $as_echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi if test -z "${DEBUG_TRUE}" && test -z "${DEBUG_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"DEBUG\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -22268,7 +23094,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by xf86-input-joystick $as_me 1.6.0, which was +This file was extended by xf86-input-joystick $as_me 1.5.0, which was generated by GNU Autoconf 2.62. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -22321,7 +23147,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -xf86-input-joystick config.status 1.6.0 +xf86-input-joystick config.status 1.5.0 configured by $0, generated by GNU Autoconf 2.62, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" @@ -23262,12 +24088,10 @@ $as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2;} fi -# ----------------------------------------------------------------------------- - -$as_echo -$as_echo "Building Linux joystick backend: $linux_backend" -$as_echo "Building Linux evdev backend: $evdev_backend" -$as_echo "Building BSD usbhid backend: $bsd_backend" +echo +echo Building Linux joystick backend: $linux_backend +echo Building Linux evdev backend: $evdev_backend +echo Building BSD usbhid backend: $bsd_backend if test "x$linux_backend" != "xyes" -a \ "x$bsd_backend" != "xyes" -a \ diff --git a/driver/xf86-input-joystick/configure.ac b/driver/xf86-input-joystick/configure.ac index 73afa9a68..e0be56885 100644 --- a/driver/xf86-input-joystick/configure.ac +++ b/driver/xf86-input-joystick/configure.ac @@ -20,73 +20,70 @@ # # Process this file with autoconf to produce a configure script -# Initialize Autoconf -AC_PREREQ([2.60]) +AC_PREREQ(2.57) AC_INIT([xf86-input-joystick], - [1.6.0], + 1.5.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], - [xf86-input-joystick]) -AC_CONFIG_SRCDIR([Makefile.am]) -AC_CONFIG_HEADERS([config.h]) -AC_CONFIG_AUX_DIR(.) + xf86-input-joystick) + +AC_CONFIG_SRCDIR([Makefile.am]) +AC_CONFIG_AUX_DIR(.) +AM_INIT_AUTOMAKE([dist-bzip2]) -# Initialize Automake -AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE -# Initialize libtool +# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG +m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.2) +AM_CONFIG_HEADER([config.h]) + +# Checks for programs. AC_DISABLE_STATIC AC_PROG_LIBTOOL +AC_PROG_CC +XORG_CWARNFLAGS -# Initialize X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS -m4_ifndef([XORG_MACROS_VERSION], - [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) -XORG_MACROS_VERSION(1.8) -XORG_DEFAULT_OPTIONS +AH_TOP([#include "xorg-server.h"]) + +AC_ARG_WITH(xorg-module-dir, + AC_HELP_STRING([--with-xorg-module-dir=DIR], + [Default xorg module directory + [[default=$libdir/xorg/modules]]]), + [moduledir="$withval"], + [moduledir="$libdir/xorg/modules"]) + +AC_ARG_ENABLE(debug, + AS_HELP_STRING([--enable-debug], + [Enable debugging (default: enabled)]), + [DEBUGGING=$enableval], [DEBUGGING=yes]) +if test "x$DEBUGGING" = xyes; then + AC_DEFINE(DEBUG, 1, [Enable debugging code]) +else + AC_DEFINE(NDEBUG, 1, [Disable some debugging code]) +fi +AM_CONDITIONAL(DEBUG, [test "x$DEBUGGING" = xyes]) + +inputdir=${moduledir}/input +AC_SUBST(inputdir) # Checks for extensions XORG_DRIVER_CHECK_EXT(XINPUT, inputproto) XORG_DRIVER_CHECK_EXT(XKB, kbproto) # Checks for pkg-config packages -PKG_CHECK_MODULES(XORG, [xorg-server >= 1.9.99.2] xproto $REQUIRED_MODULES) - -DRIVER_NAME=joystick -AC_SUBST([DRIVER_NAME]) - -# ----------------------------------------------------------------------------- -# Configuration options -# ----------------------------------------------------------------------------- -# Define a configure option for an alternate input module directory -AC_ARG_WITH(xorg-module-dir, - AS_HELP_STRING([--with-xorg-module-dir=DIR], - [Default xorg module directory [[default=$libdir/xorg/modules]]]), - [moduledir="$withval"], - [moduledir="$libdir/xorg/modules"]) -inputdir=${moduledir}/input -AC_SUBST(inputdir) - -# Define a configure option for an alternate X Server SDK Headers -# X Server SDK location is required to install joystick header files +PKG_CHECK_MODULES(XORG, + [xorg-server >= 1.3.99.901] xproto $REQUIRED_MODULES) +XORG_CFLAGS="$CWARNFLAGS $XORG_CFLAGS" +xorg_sdkdir=$(pkg-config --variable=sdkdir xorg-server) AC_ARG_WITH(sdkdir, - AS_HELP_STRING([--with-sdkdir=], - [Xorg X Server sdk headers (default is autodetected)]), - [sdkdir="$withval"], - [sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`]) + AC_HELP_STRING([--with-sdkdir=], + [Xorg X Server sdk headers (default is autodetected)]), + [sdkdir="$withval"], [sdkdir="${xorg_sdkdir}"]) AC_SUBST(sdkdir) -# Define a configure option to enable code debugging -AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], - [Enable debugging (default: disabled)]), - [DEBUGGING=$enableval], [DEBUGGING=no]) -if test "x$DEBUGGING" = xyes; then - AC_DEFINE(DEBUG, 1, [Enable debugging code]) -fi -AM_CONDITIONAL(DEBUG, [test "x$DEBUGGING" = xyes]) +# Checks for libraries. -# ----------------------------------------------------------------------------- -# Determine which joystick backend to build -# ----------------------------------------------------------------------------- +# Checks for header files. linux_backend=yes AC_CHECK_HEADERS([linux/joystick.h],, [linux_backend=no]) AM_CONDITIONAL(LINUX_BACKEND, [test "x$linux_backend" = xyes]) @@ -114,22 +111,27 @@ AM_CONDITIONAL(EVDEV_BACKEND, [test "x$evdev_backend" = xyes]) if test "x$evdev_backend" = xyes; then AC_DEFINE(EVDEV_BACKEND, 1, [Compile Linux evdev backend]) fi -# ----------------------------------------------------------------------------- -AC_CONFIG_FILES([Makefile - src/Makefile - man/Makefile - config/Makefile - include/Makefile - xorg-joystick.pc]) -AC_OUTPUT +AC_HEADER_STDC -# ----------------------------------------------------------------------------- +DRIVER_NAME=joystick +AC_SUBST([DRIVER_NAME]) -AS_ECHO() -AS_ECHO("Building Linux joystick backend: $linux_backend") -AS_ECHO("Building Linux evdev backend: $evdev_backend") -AS_ECHO("Building BSD usbhid backend: $bsd_backend") +XORG_MANPAGE_SECTIONS +XORG_RELEASE_VERSION +XORG_CHANGELOG + +AC_OUTPUT([Makefile + src/Makefile + man/Makefile + config/Makefile + include/Makefile + xorg-joystick.pc]) + +echo +echo Building Linux joystick backend: $linux_backend +echo Building Linux evdev backend: $evdev_backend +echo Building BSD usbhid backend: $bsd_backend if test "x$linux_backend" != "xyes" -a \ "x$bsd_backend" != "xyes" -a \ diff --git a/driver/xf86-input-joystick/include/Makefile.am b/driver/xf86-input-joystick/include/Makefile.am index ed618c228..21916f730 100644 --- a/driver/xf86-input-joystick/include/Makefile.am +++ b/driver/xf86-input-joystick/include/Makefile.am @@ -18,4 +18,6 @@ # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +EXTRA_DIST = joystick-properties.h + sdk_HEADERS = joystick-properties.h diff --git a/driver/xf86-input-joystick/include/Makefile.in b/driver/xf86-input-joystick/include/Makefile.in index 9a190be8d..e365c3d1a 100644 --- a/driver/xf86-input-joystick/include/Makefile.in +++ b/driver/xf86-input-joystick/include/Makefile.in @@ -43,9 +43,9 @@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ -install_sh_DATA = ${SHELL} $(install_sh) -c -m 644 -install_sh_PROGRAM = ${SHELL} $(install_sh) -c -install_sh_SCRIPT = ${SHELL} $(install_sh) -c +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : @@ -86,7 +86,6 @@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -129,7 +128,6 @@ FFLAGS = @FFLAGS@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ GREP = @GREP@ -INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -219,6 +217,7 @@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +EXTRA_DIST = joystick-properties.h sdk_HEADERS = joystick-properties.h all: all-am @@ -232,9 +231,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign include/Makefile + $(AUTOMAKE) --gnu include/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/driver/xf86-input-joystick/man/Makefile.am b/driver/xf86-input-joystick/man/Makefile.am index 4e045d96b..f0eb29b85 100644 --- a/driver/xf86-input-joystick/man/Makefile.am +++ b/driver/xf86-input-joystick/man/Makefile.am @@ -1,24 +1,27 @@ # # Copyright 2005 Sun Microsystems, Inc. All rights reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation. +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the copyright holders shall +# not be used in advertising or otherwise to promote the sale, use or +# other dealings in this Software without prior written authorization +# from the copyright holders. # drivermandir = $(DRIVER_MAN_DIR) @@ -31,8 +34,25 @@ EXTRA_DIST = @DRIVER_NAME@.man CLEANFILES = $(driverman_DATA) +SED = sed + +# Strings to replace in man pages +XORGRELSTRING = @PACKAGE_STRING@ + XORGMANNAME = X Version 11 + +MAN_SUBSTS = \ + -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \ + -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \ + -e 's|__xservername__|Xorg|g' \ + -e 's|__xconfigfile__|xorg.conf|g' \ + -e 's|__projectroot__|$(prefix)|g' \ + -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \ + -e 's|__drivermansuffix__|$(DRIVER_MAN_SUFFIX)|g' \ + -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \ + -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \ + -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g' + SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man -# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure .man.$(DRIVER_MAN_SUFFIX): - $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ + sed $(MAN_SUBSTS) < $< > $@ diff --git a/driver/xf86-input-joystick/man/Makefile.in b/driver/xf86-input-joystick/man/Makefile.in index 6d20921fb..22d3264e7 100644 --- a/driver/xf86-input-joystick/man/Makefile.in +++ b/driver/xf86-input-joystick/man/Makefile.in @@ -16,25 +16,28 @@ # # Copyright 2005 Sun Microsystems, Inc. All rights reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation. +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the copyright holders shall +# not be used in advertising or otherwise to promote the sale, use or +# other dealings in this Software without prior written authorization +# from the copyright holders. # srcdir = @srcdir@ @@ -46,9 +49,9 @@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ -install_sh_DATA = ${SHELL} $(install_sh) -c -m 644 -install_sh_PROGRAM = ${SHELL} $(install_sh) -c -install_sh_SCRIPT = ${SHELL} $(install_sh) -c +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : @@ -86,7 +89,6 @@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -129,7 +131,6 @@ FFLAGS = @FFLAGS@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ GREP = @GREP@ -INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -148,7 +149,18 @@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ -MAN_SUBSTS = @MAN_SUBSTS@ +MAN_SUBSTS = \ + -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \ + -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \ + -e 's|__xservername__|Xorg|g' \ + -e 's|__xconfigfile__|xorg.conf|g' \ + -e 's|__projectroot__|$(prefix)|g' \ + -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \ + -e 's|__drivermansuffix__|$(DRIVER_MAN_SUFFIX)|g' \ + -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \ + -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \ + -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g' + MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ NMEDIT = @NMEDIT@ @@ -162,7 +174,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ -SED = @SED@ +SED = sed SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -224,6 +236,10 @@ driverman_PRE = @DRIVER_NAME@.man driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@) EXTRA_DIST = @DRIVER_NAME@.man CLEANFILES = $(driverman_DATA) + +# Strings to replace in man pages +XORGRELSTRING = @PACKAGE_STRING@ +XORGMANNAME = X Version 11 SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man all: all-am @@ -238,9 +254,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign man/Makefile + $(AUTOMAKE) --gnu man/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -409,9 +425,8 @@ uninstall-am: uninstall-drivermanDATA uninstall-info-am uninstall-info-am -# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure .man.$(DRIVER_MAN_SUFFIX): - $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ + sed $(MAN_SUBSTS) < $< > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/driver/xf86-input-joystick/man/joystick.man b/driver/xf86-input-joystick/man/joystick.man index da92ceb45..97e3ba384 100644 --- a/driver/xf86-input-joystick/man/joystick.man +++ b/driver/xf86-input-joystick/man/joystick.man @@ -4,19 +4,14 @@ .SH NAME joystick \- Joystick input driver .SH SYNOPSIS -Snipped for xorg.conf.d(5): - .nf -.B "Section \*qInputClass\*q" -.BI " Identifier \*q" joystick-all \*q -.BI " Driver \*q" joystick \*q -.BI " Option \*qMatchIsJoystick\*q \*q" on \*q -.BI " Option \*qMatchDevicePath \*q" /dev/input/event* \*q +.B "Section \*qInputDevice\*q" +.BI " Identifier \*q" devname \*q +.B " Driver \*qjoystick\*q" +.BI " Option \*qDevice\*q \*q" devpath \*q \ \ ... .B EndSection .fi - - .SH DESCRIPTION .B joystick is an __xservername__ input driver for Joysticks. There are 3 backends available that are used in the following order, if support was found: @@ -319,21 +314,33 @@ The keys for the first two axes will be generated in an interval according to th The keys for the third and fourth axis are generated once when the axis moves out of the deadzone and when it moves back into the deadzone. X.Org will autorepeat those keys according to current keyboard settings. .SH "NOTES" -Configuration through -.I InputClass -sections is recommended in X servers 1.8 and later. See xorg.conf.d(5) for more details. An example xorg.conf.d snipped is provided in -.I ${sourcecode}/config/50-joystick-all.conf - -Configuration through hal fdi files is recommended in X servers 1.5, -1.6 and 1.7. An example hal policy file is still provided in +The driver does not do hotplugging on it's own. The joystick needs to be plugged in when the driver is loaded. +If the joystick is unplugged, the device will be automatically deactivated. +.P +There is an example hal policy in .I ${sourcecode}/config/50-x11-input-joystick.fdi -to be placed in -.IR /etc/hal/fdi/policy . +which will take care of hotplugging. Place it in +.I /etc/hal/fdi/policy +and customize it to your needs. Pass custom options to the driver using x11_options properties. This requires xorg-server-1.5 or +higher. +.P +Make sure you add the +.I \*qSendCoreEvents\*q +keyword to the device entry of your +.B ServerLayout +section of the +.I xorg.conf +file, otherwise the device won't report core pointer and core key events. + +Example: +.nf +.BI " InputDevice " "\*qJoystick1\*q \*qSendCoreEvents\*q" +.fi .SH "SEE ALSO" -__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorg.conf.d(5), Xserver(__appmansuffix__), X(__miscmansuffix__), xmodmap(1) +__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__), xmodmap(1) .SH AUTHORS -Sascha Hlusiak (2007-2011), +Sascha Hlusiak (2007-2009), .fi Frederic Lepied (1995-1999) diff --git a/driver/xf86-input-joystick/src/Makefile.am b/driver/xf86-input-joystick/src/Makefile.am index 21cdf3235..1f8898eb5 100644 --- a/driver/xf86-input-joystick/src/Makefile.am +++ b/driver/xf86-input-joystick/src/Makefile.am @@ -24,8 +24,7 @@ # -avoid-version prevents gratuitous .0.0.0 version numbers on the end # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. - -AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS) +AM_CFLAGS = $(XORG_CFLAGS) @DRIVER_NAME@_drv_la_LTLIBRARIES = @DRIVER_NAME@_drv.la @DRIVER_NAME@_drv_la_LDFLAGS = -module -avoid-version diff --git a/driver/xf86-input-joystick/src/Makefile.in b/driver/xf86-input-joystick/src/Makefile.in index dac59c2f8..b963a141a 100644 --- a/driver/xf86-input-joystick/src/Makefile.in +++ b/driver/xf86-input-joystick/src/Makefile.in @@ -34,12 +34,6 @@ # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# this is obnoxious: -# -module lets us name the module exactly how we want -# -avoid-version prevents gratuitous .0.0.0 version numbers on the end -# _ladir passes a dummy rpath to libtool so the thing will actually link -# TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. - srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -49,9 +43,9 @@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ -install_sh_DATA = ${SHELL} $(install_sh) -c -m 644 -install_sh_PROGRAM = ${SHELL} $(install_sh) -c -install_sh_SCRIPT = ${SHELL} $(install_sh) -c +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : @@ -122,7 +116,6 @@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -165,7 +158,6 @@ FFLAGS = @FFLAGS@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ GREP = @GREP@ -INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -255,7 +247,13 @@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS) + +# this is obnoxious: +# -module lets us name the module exactly how we want +# -avoid-version prevents gratuitous .0.0.0 version numbers on the end +# _ladir passes a dummy rpath to libtool so the thing will actually link +# TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. +AM_CFLAGS = $(XORG_CFLAGS) @DRIVER_NAME@_drv_la_LTLIBRARIES = @DRIVER_NAME@_drv.la @DRIVER_NAME@_drv_la_LDFLAGS = -module -avoid-version $(am__append_2) @DRIVER_NAME@_drv_ladir = @inputdir@ @@ -281,9 +279,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/Makefile + $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/driver/xf86-input-joystick/src/backend_bsd.c b/driver/xf86-input-joystick/src/backend_bsd.c index c6ce7b4c5..71f4168dc 100644 --- a/driver/xf86-input-joystick/src/backend_bsd.c +++ b/driver/xf86-input-joystick/src/backend_bsd.c @@ -30,7 +30,6 @@ #include "config.h" #endif -#include #include #include #include diff --git a/driver/xf86-input-joystick/src/backend_evdev.c b/driver/xf86-input-joystick/src/backend_evdev.c index c506167fd..de061d3dc 100644 --- a/driver/xf86-input-joystick/src/backend_evdev.c +++ b/driver/xf86-input-joystick/src/backend_evdev.c @@ -29,7 +29,6 @@ #include "config.h" #endif -#include #include #include #include diff --git a/driver/xf86-input-joystick/src/backend_joystick.c b/driver/xf86-input-joystick/src/backend_joystick.c index e61d90842..b69f932c2 100644 --- a/driver/xf86-input-joystick/src/backend_joystick.c +++ b/driver/xf86-input-joystick/src/backend_joystick.c @@ -32,7 +32,6 @@ #include "config.h" #endif -#include #include #include #include diff --git a/driver/xf86-input-joystick/src/jstk.c b/driver/xf86-input-joystick/src/jstk.c index ec6b79ad0..a2e927c08 100644 --- a/driver/xf86-input-joystick/src/jstk.c +++ b/driver/xf86-input-joystick/src/jstk.c @@ -26,7 +26,6 @@ #include "config.h" #endif -#include #include #include @@ -45,7 +44,9 @@ #include "jstk_key.h" #include "jstk_options.h" #include "jstk_properties.h" -#include +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3 + #include +#endif #ifdef LINUX_BACKEND #include "backend_joystick.h" @@ -62,6 +63,40 @@ char debug_level = 0; #endif + +/* + *************************************************************************** + * + * jstkConvertProc -- + * + * Convert valuators to X and Y. + * + *************************************************************************** + */ + +static Bool +jstkConvertProc(LocalDevicePtr local, + int first, + int num, + int v0, + int v1, + int v2, + int v3, + int v4, + int v5, + int* x, + int* y) +{ + if (first != 0 || num != 2) + return FALSE; + + *x = v0; + *y = v1; + + return TRUE; +} + + /* *************************************************************************** * @@ -112,21 +147,21 @@ jstkOpenDevice(JoystickDevPtr priv, BOOL probe) */ static void -jstkReadProc(InputInfoPtr pInfo) +jstkReadProc(LocalDevicePtr local) { JOYSTICKEVENT event; int number; int i, r; - JoystickDevPtr priv = pInfo->private; + JoystickDevPtr priv = local->private; do { if ((priv->read_proc == NULL) || ((r=priv->read_proc(priv, &event, &number))==0)) { xf86Msg(X_WARNING, "JOYSTICK: Read failed. Deactivating device.\n"); - if (pInfo->fd >= 0) - RemoveEnabledDevice(pInfo->fd); + if (local->fd >= 0) + RemoveEnabledDevice(local->fd); return; } @@ -139,7 +174,7 @@ jstkReadProc(InputInfoPtr pInfo) switch (priv->button[number].mapping) { case JSTK_MAPPING_BUTTON: if (priv->mouse_enabled == TRUE) { - xf86PostButtonEvent(pInfo->dev, 0, + xf86PostButtonEvent(local->dev, 0, priv->button[number].buttonnumber, priv->button[number].pressed, 0, 0); } @@ -152,7 +187,7 @@ jstkReadProc(InputInfoPtr pInfo) if (priv->button[number].pressed == 0) priv->button[number].currentspeed = 1.0; else if (priv->mouse_enabled == TRUE) - jstkStartButtonAxisTimer(pInfo, number); + jstkStartButtonAxisTimer(local, number); break; case JSTK_MAPPING_KEY: @@ -223,7 +258,7 @@ jstkReadProc(InputInfoPtr pInfo) priv->axis[number].mapping)); if (priv->axis[number].valuator != -1) - xf86PostMotionEvent(pInfo->dev, 1, priv->axis[number].valuator, + xf86PostMotionEvent(local->dev, 1, priv->axis[number].valuator, 1, priv->axis[number].value); switch (priv->axis[number].mapping) { @@ -237,12 +272,12 @@ jstkReadProc(InputInfoPtr pInfo) if (priv->axis[number].value == 0) priv->axis[number].currentspeed = 1.0; if (priv->mouse_enabled == TRUE) - jstkStartAxisTimer(pInfo, number); + jstkStartAxisTimer(local, number); break; case JSTK_TYPE_ABSOLUTE: if (priv->mouse_enabled == TRUE) - jstkHandleAbsoluteAxis(pInfo, number); + jstkHandleAbsoluteAxis(local, number); break; default: break; @@ -251,9 +286,9 @@ jstkReadProc(InputInfoPtr pInfo) case JSTK_MAPPING_KEY: if (priv->keys_enabled == TRUE) { if (priv->axis[number].type == JSTK_TYPE_ACCELERATED) { - jstkHandlePWMAxis(pInfo, number); + jstkHandlePWMAxis(local, number); } else if (priv->axis[number].type == JSTK_TYPE_BYVALUE) { - jstkStartAxisTimer(pInfo, number); + jstkStartAxisTimer(local, number); } break; } @@ -292,10 +327,12 @@ jstkDeviceControlProc(DeviceIntPtr pJstk, int what) { int i; - InputInfoPtr pInfo = (InputInfoPtr)pJstk->public.devicePrivate; - JoystickDevPtr priv = pInfo->private; + LocalDevicePtr local = (LocalDevicePtr)pJstk->public.devicePrivate; + JoystickDevPtr priv = (JoystickDevPtr)XI_PRIVATE(pJstk); +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 Atom btn_labels[BUTTONMAP_SIZE+1] = {0}; /* TODO: fillme */ Atom axes_labels[MAXAXES] = {0}; /* TODO: fillme */ +#endif switch (what) { case DEVICE_INIT: { @@ -318,7 +355,9 @@ jstkDeviceControlProc(DeviceIntPtr pJstk, if (InitButtonClassDeviceStruct(pJstk, BUTTONMAP_SIZE, +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 btn_labels, +#endif buttonmap) == FALSE) { ErrorF("unable to allocate Button class device\n"); return !Success; @@ -334,48 +373,71 @@ jstkDeviceControlProc(DeviceIntPtr pJstk, priv->axis[i].valuator = m++; } - if (InitValuatorClassDeviceStruct(pJstk, m, axes_labels, - GetMotionHistorySize(), + if (InitValuatorClassDeviceStruct(pJstk, + m, +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 + axes_labels, +#endif +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3 + xf86GetMotionEvents, +#endif + local->history_size, Relative) == FALSE) { ErrorF("unable to allocate Valuator class device\n"); return !Success; } else { InitValuatorAxisStruct(pJstk, 0, /* valuator num */ +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 XIGetKnownProperty(AXIS_LABEL_PROP_REL_X), +#endif 0, /* min val */ screenInfo.screens[0]->width, /* max val */ 1, /* resolution */ 0, /* min_res */ - 1, /* max_res */ - Absolute); + 1); /* max_res */ InitValuatorAxisStruct(pJstk, 1, /* valuator num */ +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y), +#endif 0, /* min val */ screenInfo.screens[0]->height, /* max val */ 1, /* resolution */ 0, /* min_res */ - 1, /* max_res */ - Absolute); + 1); /* max_res */ for (i=0; iaxis[i].valuator != -1) { InitValuatorAxisStruct(pJstk, priv->axis[i].valuator, +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 axes_labels[i], +#endif -32768, /* min val */ 32767, /* max val */ 1, /* resolution */ 0, /* min_res */ - 1, /* max_res */ - Absolute); + 1); /* max_res */ } /* allocate the motion history buffer if needed */ - xf86MotionHistoryAllocate(pInfo); + xf86MotionHistoryAllocate(local); } + + if (priv->keyboard_device != NULL) + { + DBG(2, ErrorF("Activating keyboard device\n")); + xf86ActivateDevice(priv->keyboard_device); + priv->keyboard_device->dev->inited = + (priv->keyboard_device->device_control(priv->keyboard_device->dev, DEVICE_INIT) == Success); + xf86EnableDevice(priv->keyboard_device->dev); + DBG(2, ErrorF("Keyboard device activated\n")); + } + +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3 jstkInitProperties(pJstk, priv); +#endif break; } @@ -386,8 +448,8 @@ jstkDeviceControlProc(DeviceIntPtr pJstk, if (jstkOpenDevice(priv, FALSE) != -1) { pJstk->public.on = TRUE; - pInfo->fd = priv->fd; - AddEnabledDevice(pInfo->fd); + local->fd = priv->fd; + AddEnabledDevice(local->fd); } else return !Success; break; @@ -409,9 +471,9 @@ jstkDeviceControlProc(DeviceIntPtr pJstk, TimerCancel(priv->axis[i].timer); } - if (pInfo->fd >= 0) - RemoveEnabledDevice(pInfo->fd); - pInfo->fd = -1; + if (local->fd >= 0) + RemoveEnabledDevice(local->fd); + local->fd = -1; if (priv->close_proc) priv->close_proc(priv); pJstk->public.on = FALSE; @@ -425,6 +487,19 @@ jstkDeviceControlProc(DeviceIntPtr pJstk, return Success; } + + + +_X_EXPORT InputDriverRec JSTK_KEYBOARD = { + 1, + "joystick_keyboard", + NULL, + jstkKeyboardPreInit, + jstkKeyboardUnInit, + NULL, + 0 +}; + /* *************************************************************************** * @@ -432,41 +507,41 @@ jstkDeviceControlProc(DeviceIntPtr pJstk, * * Called when a device will be instantiated * - * This is a tad complicated. NewInputDeviceRequest(), which we use to - * hotplug a keyboard device,. enables the device, so we need to make sure - * that all options for the dependent device are set correctly. - * - * This means that we parse the keyboard-specific options into the - * keyboard device's PreInit, and re-use the keyboard's priv field. - * *************************************************************************** */ -static int -jstkCorePreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) +static InputInfoPtr +jstkCorePreInit(InputDriverPtr drv, IDevPtr dev, int flags) { - InputInfoPtr keyboard_device; + LocalDevicePtr local = NULL; JoystickDevPtr priv = NULL; char *s; int i, j; - s = xf86CheckStrOption(pInfo->options, "_source", ""); - if (strcmp(s, "_driver/joystick") == 0) - return jstkKeyboardPreInit(drv, pInfo, flags); + local = xf86AllocateInput(drv, 0); + if (!local) { + goto SetupProc_fail; + } - pInfo->device_control = jstkDeviceControlProc; - pInfo->read_input = jstkReadProc; - pInfo->control_proc = NULL; - pInfo->switch_mode = NULL; - pInfo->fd = -1; - pInfo->dev = NULL; - pInfo->type_name = XI_JOYSTICK; + local->private = (JoystickDevPtr)xalloc(sizeof(JoystickDevRec)); + priv = (JoystickDevPtr)local->private; - keyboard_device = jstkKeyboardHotplug(pInfo, flags); - if (!keyboard_device) - return BadAlloc; - - pInfo->private = priv = keyboard_device->private; + local->name = dev->identifier; + local->flags = XI86_POINTER_CAPABLE; + local->flags |= XI86_SEND_DRAG_EVENTS; + local->device_control = jstkDeviceControlProc; + local->read_input = jstkReadProc; + local->close_proc = NULL; + local->control_proc = NULL; + local->switch_mode = NULL; + local->conversion_proc = jstkConvertProc; + local->fd = -1; + local->dev = NULL; + local->private = priv; + local->type_name = XI_JOYSTICK; + local->history_size = 0; + local->always_core_feedback = NULL; + local->conf_idev = dev; priv->fd = -1; priv->open_proc = NULL; @@ -479,7 +554,9 @@ jstkCorePreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) priv->mouse_enabled = TRUE; priv->keys_enabled = TRUE; priv->amplify = 1.0f; - priv->keyboard_device = keyboard_device; + priv->keyboard_device = NULL; + priv->repeat_delay = 0; + priv->repeat_interval = 0; priv->num_axes = MAXAXES; priv->num_buttons = MAXBUTTONS; @@ -537,39 +614,81 @@ jstkCorePreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) priv->axis[5].type = JSTK_TYPE_ACCELERATED; priv->axis[5].mapping = JSTK_MAPPING_Y; + xf86CollectInputOptions(local, NULL, NULL); + xf86OptionListReport(local->options); + /* Joystick device is mandatory */ - priv->device = xf86SetStrOption(pInfo->options, "Device", NULL); + priv->device = xf86SetStrOption(dev->commonOptions, "Device", NULL); if (!priv->device) - priv->device = xf86SetStrOption(pInfo->options, "Path", NULL); + priv->device = xf86SetStrOption(dev->commonOptions, "Path", NULL); if (!priv->device) { - xf86Msg (X_ERROR, "%s: No Device specified.\n", pInfo->name); + xf86Msg (X_ERROR, "%s: No Device specified.\n", local->name); goto SetupProc_fail; } + xf86ProcessCommonOptions(local, local->options); + #if DEBUG - debug_level = xf86SetIntOption(pInfo->options, "DebugLevel", 0); + debug_level = xf86SetIntOption(dev->commonOptions, "DebugLevel", 0); if (debug_level > 0) { xf86Msg(X_CONFIG, "%s: debug level set to %d\n", - pInfo->name, debug_level); + local->name, debug_level); } #else - if (xf86SetIntOption(pInfo->options, "DebugLevel", 0) != 0) { + if (xf86SetIntOption(dev->commonOptions, "DebugLevel", 0) != 0) { xf86Msg(X_WARNING, "%s: DebugLevel: Compiled without debugging support!\n", - pInfo->name); + local->name); } #endif - priv->mouse_enabled = xf86SetBoolOption(pInfo->options, "StartMouseEnabled", TRUE); - priv->keys_enabled = xf86SetBoolOption(pInfo->options, "StartKeysEnabled", TRUE); + /* Parse option for autorepeat */ + if ((s = xf86SetStrOption(dev->commonOptions, "AutoRepeat", NULL))) { + int delay, rate; + if (sscanf(s, "%d %d", &delay, &rate) != 2) { + xf86Msg(X_ERROR, "%s: \"%s\" is not a valid AutoRepeat value", + local->name, s); + } else { + priv->repeat_delay = delay; + if (rate != 0) + priv->repeat_interval = 1000/rate; + else priv->repeat_interval = 0; + DBG(1, xf86Msg(X_CONFIG, "Autorepeat set to delay=%d, interval=%d\n", + priv->repeat_delay,priv->repeat_interval)); + } + xfree(s); + } + + priv->rmlvo.rules = xf86SetStrOption(dev->commonOptions, "xkb_rules", NULL); + if (!priv->rmlvo.rules) + priv->rmlvo.rules = xf86SetStrOption(dev->commonOptions, "XkbRules", "evdev"); + + priv->rmlvo.model = xf86SetStrOption(dev->commonOptions, "xkb_model", NULL); + if (!priv->rmlvo.model) + priv->rmlvo.model = xf86SetStrOption(dev->commonOptions, "XkbModel", "evdev"); + + priv->rmlvo.layout = xf86SetStrOption(dev->commonOptions, "xkb_layout", NULL); + if (!priv->rmlvo.layout) + priv->rmlvo.layout = xf86SetStrOption(dev->commonOptions, "XkbLayout", "us"); + + priv->rmlvo.variant = xf86SetStrOption(dev->commonOptions, "xkb_variant", NULL); + if (!priv->rmlvo.variant) + priv->rmlvo.variant = xf86SetStrOption(dev->commonOptions, "XkbVariant", ""); + + priv->rmlvo.options = xf86SetStrOption(dev->commonOptions, "xkb_options", NULL); + if (!priv->rmlvo.options) + priv->rmlvo.options = xf86SetStrOption(dev->commonOptions, "XkbOptions", ""); + + priv->mouse_enabled = xf86SetBoolOption(dev->commonOptions, "StartMouseEnabled", TRUE); + priv->keys_enabled = xf86SetBoolOption(dev->commonOptions, "StartKeysEnabled", TRUE); /* Process button mapping options */ for (i=0; ioptions, p, NULL); + s = xf86SetStrOption(dev->commonOptions, p, NULL); if (s != NULL) { - jstkParseButtonOption(s, priv, i, pInfo->name); + jstkParseButtonOption(s, priv, i, local->name); } DBG(1, xf86Msg(X_CONFIG, "Button %d mapped to %d\n", i+1, priv->button[i].mapping)); @@ -579,9 +698,9 @@ jstkCorePreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) for (i=0; ioptions, p, NULL); + s = xf86SetStrOption(dev->commonOptions, p, NULL); if (s != NULL) { - jstkParseAxisOption(s, priv, &priv->axis[i], pInfo->name); + jstkParseAxisOption(s, priv, &priv->axis[i], local->name); } DBG(1, xf86Msg(X_CONFIG, "Axis %d type is %d, mapped to %d, amplify=%.3f\n", i+1, @@ -590,17 +709,23 @@ jstkCorePreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) priv->axis[i].amplify)); } - return Success; + /* return the LocalDevice */ + local->flags |= XI86_CONFIGURED; + + priv->keyboard_device = jstkKeyboardPreInit(&JSTK_KEYBOARD, dev, flags); + if (priv->keyboard_device) { + priv->keyboard_device->private = priv; + } + + return (local); SetupProc_fail: - if (priv) { - free(priv); - if (keyboard_device) - keyboard_device->private = NULL; - } - if (pInfo) - pInfo->private = NULL; - return BadValue; + if (priv) + xfree(priv); + if (local) + local->private = NULL; + return NULL; +/* return (local); */ /* Makes X segfault on error */ } @@ -611,39 +736,26 @@ SetupProc_fail: * jstkCoreUnInit -- * * Called when a device is unplugged and needs to be removed - * This is a bit tricky, because the keyboard device and the main device - * share the same private data, which must be freed only once, which is done - * by the main device. - * * *************************************************************************** */ static void jstkCoreUnInit(InputDriverPtr drv, - InputInfoPtr pInfo, + LocalDevicePtr local, int flags) { - if (pInfo->private) { - JoystickDevPtr priv = (JoystickDevPtr) pInfo->private; - if (priv->keyboard_device == pInfo) { - /* this is the keyboard device */ - /* Unlink from private data to notify that the - * keyboard device is no more, but don't free */ - priv->keyboard_device = NULL; - } else { - /* freeing main device - if keyboard still exists, notify keyboard device that it's - private data is gone */ - if (priv->keyboard_device) - priv->keyboard_device->private = NULL; - - free (priv); - } + JoystickDevPtr device = (JoystickDevPtr) local->private; + + if (device->keyboard_device != NULL) + { + xf86DisableDevice(device->keyboard_device->dev, TRUE); + device->keyboard_device = NULL; } - pInfo->private = NULL; - xf86DeleteInput(pInfo, 0); + xfree (device); + local->private = NULL; + xf86DeleteInput(local, 0); } @@ -655,9 +767,11 @@ _X_EXPORT InputDriverRec JOYSTICK = { NULL, jstkCorePreInit, jstkCoreUnInit, - NULL + NULL, + 0 }; + /* *************************************************************************** * @@ -675,6 +789,7 @@ jstkDriverPlug(pointer module, int *errmin) { xf86AddInputDriver(&JOYSTICK, module, 0); + xf86AddInputDriver(&JSTK_KEYBOARD, module, 0); return module; } diff --git a/driver/xf86-input-joystick/src/jstk.h b/driver/xf86-input-joystick/src/jstk.h index ed5e4a7ba..78a1f83cf 100644 --- a/driver/xf86-input-joystick/src/jstk.h +++ b/driver/xf86-input-joystick/src/jstk.h @@ -55,6 +55,17 @@ #define XI_JOYSTICK "JOYSTICK" #endif +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 5 +typedef struct { + char *rules; + char *model; + char *layout; + char *variant; + char *options; +} XkbRMLVOSet; +#endif + + typedef enum _JOYSTICKEVENT { EVENT_NONE=0, @@ -106,7 +117,7 @@ typedef struct _JoystickDevRec { jstkReadDataProc read_proc; /* Callback for reading data from the backend */ void *devicedata; /* Extra platform device dependend data */ char *device; /* Name of the device */ - InputInfoPtr keyboard_device; /* Slave device for keyboard events */ + LocalDevicePtr keyboard_device; /* Slave device for keyboard events */ OsTimerPtr timer; /* Timer for axis movement */ Bool timerrunning; diff --git a/driver/xf86-input-joystick/src/jstk_axis.c b/driver/xf86-input-joystick/src/jstk_axis.c index 95ebfe974..b31412270 100644 --- a/driver/xf86-input-joystick/src/jstk_axis.c +++ b/driver/xf86-input-joystick/src/jstk_axis.c @@ -27,7 +27,6 @@ #include "config.h" #endif -#include #include #include #include @@ -56,8 +55,7 @@ jstkAxisTimer(OsTimerPtr timer, { #define NEXTTIMER 15 DeviceIntPtr device = (DeviceIntPtr)arg; - InputInfoPtr pInfo = device->public.devicePrivate; - JoystickDevPtr priv = pInfo->private; + JoystickDevPtr priv = (JoystickDevPtr)XI_PRIVATE(device); int sigstate, i; int nexttimer; @@ -268,7 +266,7 @@ jstkAxisTimer(OsTimerPtr timer, *********************************************************************** */ void -jstkStartAxisTimer(InputInfoPtr device, int number) +jstkStartAxisTimer(LocalDevicePtr device, int number) { int pixel; JoystickDevPtr priv = device->private; @@ -300,7 +298,7 @@ jstkStartAxisTimer(InputInfoPtr device, int number) */ void -jstkStartButtonAxisTimer(InputInfoPtr device, int number) +jstkStartButtonAxisTimer(LocalDevicePtr device, int number) { int pixel; JoystickDevPtr priv = device->private; @@ -340,7 +338,7 @@ jstkStartButtonAxisTimer(InputInfoPtr device, int number) *********************************************************************** */ void -jstkHandleAbsoluteAxis(InputInfoPtr device, int number) +jstkHandleAbsoluteAxis(LocalDevicePtr device, int number) { JoystickDevPtr priv = device->private; int i,x,y; @@ -408,8 +406,7 @@ jstkPWMAxisTimer(OsTimerPtr timer, pointer arg) { DeviceIntPtr device = (DeviceIntPtr)arg; - InputInfoPtr pInfo = device->public.devicePrivate; - JoystickDevPtr priv = pInfo->private; + JoystickDevPtr priv = (JoystickDevPtr)XI_PRIVATE(device); int sigstate, i; int nexttimer; @@ -538,7 +535,7 @@ jstkPWMAxisTimer(OsTimerPtr timer, *********************************************************************** */ void -jstkHandlePWMAxis(InputInfoPtr device, int number) +jstkHandlePWMAxis(LocalDevicePtr device, int number) { JoystickDevPtr priv = device->private; if (priv->axis[number].timerrunning) return; diff --git a/driver/xf86-input-joystick/src/jstk_axis.h b/driver/xf86-input-joystick/src/jstk_axis.h index 0d672dbcf..028c65fc0 100644 --- a/driver/xf86-input-joystick/src/jstk_axis.h +++ b/driver/xf86-input-joystick/src/jstk_axis.h @@ -24,9 +24,9 @@ #ifndef _XF86JSTK_AXIS_H_INCLUDED_ #define _XF86JSTK_AXIS_H_INCLUDED_ -void jstkStartAxisTimer(InputInfoPtr device, int number); -void jstkStartButtonAxisTimer(InputInfoPtr device, int number); -void jstkHandleAbsoluteAxis(InputInfoPtr device, int number); -void jstkHandlePWMAxis(InputInfoPtr device, int number); +void jstkStartAxisTimer(LocalDevicePtr device, int number); +void jstkStartButtonAxisTimer(LocalDevicePtr device, int number); +void jstkHandleAbsoluteAxis(LocalDevicePtr device, int number); +void jstkHandlePWMAxis(LocalDevicePtr device, int number); #endif diff --git a/driver/xf86-input-joystick/src/jstk_key.c b/driver/xf86-input-joystick/src/jstk_key.c index 3c471ce97..fb1f52e4a 100644 --- a/driver/xf86-input-joystick/src/jstk_key.c +++ b/driver/xf86-input-joystick/src/jstk_key.c @@ -28,7 +28,6 @@ #endif -#include #include #include #include @@ -39,7 +38,9 @@ #include "jstk.h" #include "jstk_key.h" +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 5 #include +#endif #define MIN_KEYCODE 8 #define GLYPHS_PER_KEY 2 @@ -50,6 +51,280 @@ #define KanaMask Mod4Mask #define ScrollLockMask Mod5Mask + + +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 5 +static KeySym map[] = { + /* 0x00 */ NoSymbol, NoSymbol, + /* 0x01 */ XK_Escape, NoSymbol, + /* 0x02 */ XK_1, XK_exclam, + /* 0x03 */ XK_2, XK_at, + /* 0x04 */ XK_3, XK_numbersign, + /* 0x05 */ XK_4, XK_dollar, + /* 0x06 */ XK_5, XK_percent, + /* 0x07 */ XK_6, XK_asciicircum, + /* 0x08 */ XK_7, XK_ampersand, + /* 0x09 */ XK_8, XK_asterisk, + /* 0x0a */ XK_9, XK_parenleft, + /* 0x0b */ XK_0, XK_parenright, + /* 0x0c */ XK_minus, XK_underscore, + /* 0x0d */ XK_equal, XK_plus, + /* 0x0e */ XK_BackSpace, NoSymbol, + /* 0x0f */ XK_Tab, XK_ISO_Left_Tab, + /* 0x10 */ XK_Q, NoSymbol, + /* 0x11 */ XK_W, NoSymbol, + /* 0x12 */ XK_E, NoSymbol, + /* 0x13 */ XK_R, NoSymbol, + /* 0x14 */ XK_T, NoSymbol, + /* 0x15 */ XK_Y, NoSymbol, + /* 0x16 */ XK_U, NoSymbol, + /* 0x17 */ XK_I, NoSymbol, + /* 0x18 */ XK_O, NoSymbol, + /* 0x19 */ XK_P, NoSymbol, + /* 0x1a */ XK_bracketleft, XK_braceleft, + /* 0x1b */ XK_bracketright,XK_braceright, + /* 0x1c */ XK_Return, NoSymbol, + /* 0x1d */ XK_Control_L, NoSymbol, + /* 0x1e */ XK_A, NoSymbol, + /* 0x1f */ XK_S, NoSymbol, + /* 0x20 */ XK_D, NoSymbol, + /* 0x21 */ XK_F, NoSymbol, + /* 0x22 */ XK_G, NoSymbol, + /* 0x23 */ XK_H, NoSymbol, + /* 0x24 */ XK_J, NoSymbol, + /* 0x25 */ XK_K, NoSymbol, + /* 0x26 */ XK_L, NoSymbol, + /* 0x27 */ XK_semicolon, XK_colon, + /* 0x28 */ XK_quoteright, XK_quotedbl, + /* 0x29 */ XK_quoteleft, XK_asciitilde, + /* 0x2a */ XK_Shift_L, NoSymbol, + /* 0x2b */ XK_backslash, XK_bar, + /* 0x2c */ XK_Z, NoSymbol, + /* 0x2d */ XK_X, NoSymbol, + /* 0x2e */ XK_C, NoSymbol, + /* 0x2f */ XK_V, NoSymbol, + /* 0x30 */ XK_B, NoSymbol, + /* 0x31 */ XK_N, NoSymbol, + /* 0x32 */ XK_M, NoSymbol, + /* 0x33 */ XK_comma, XK_less, + /* 0x34 */ XK_period, XK_greater, + /* 0x35 */ XK_slash, XK_question, + /* 0x36 */ XK_Shift_R, NoSymbol, + /* 0x37 */ XK_KP_Multiply, NoSymbol, + /* 0x38 */ XK_Alt_L, XK_Meta_L, + /* 0x39 */ XK_space, NoSymbol, + /* 0x3a */ XK_Caps_Lock, NoSymbol, + /* 0x3b */ XK_F1, NoSymbol, + /* 0x3c */ XK_F2, NoSymbol, + /* 0x3d */ XK_F3, NoSymbol, + /* 0x3e */ XK_F4, NoSymbol, + /* 0x3f */ XK_F5, NoSymbol, + /* 0x40 */ XK_F6, NoSymbol, + /* 0x41 */ XK_F7, NoSymbol, + /* 0x42 */ XK_F8, NoSymbol, + /* 0x43 */ XK_F9, NoSymbol, + /* 0x44 */ XK_F10, NoSymbol, + /* 0x45 */ XK_Num_Lock, NoSymbol, + /* 0x46 */ XK_Scroll_Lock, NoSymbol, + /* These KP keys should have the KP_7 keysyms in the numlock + * modifer... ? */ + /* 0x47 */ XK_KP_Home, XK_KP_7, + /* 0x48 */ XK_KP_Up, XK_KP_8, + /* 0x49 */ XK_KP_Prior, XK_KP_9, + /* 0x4a */ XK_KP_Subtract, NoSymbol, + /* 0x4b */ XK_KP_Left, XK_KP_4, + /* 0x4c */ XK_KP_Begin, XK_KP_5, + /* 0x4d */ XK_KP_Right, XK_KP_6, + /* 0x4e */ XK_KP_Add, NoSymbol, + /* 0x4f */ XK_KP_End, XK_KP_1, + /* 0x50 */ XK_KP_Down, XK_KP_2, + /* 0x51 */ XK_KP_Next, XK_KP_3, + /* 0x52 */ XK_KP_Insert, XK_KP_0, + /* 0x53 */ XK_KP_Delete, XK_KP_Decimal, + /* 0x54 */ NoSymbol, NoSymbol, + /* 0x55 */ XK_F13, NoSymbol, + /* 0x56 */ XK_less, XK_greater, + /* 0x57 */ XK_F11, NoSymbol, + /* 0x58 */ XK_F12, NoSymbol, + /* 0x59 */ XK_F14, NoSymbol, + /* 0x5a */ XK_F15, NoSymbol, + /* 0x5b */ XK_F16, NoSymbol, + /* 0x5c */ XK_F17, NoSymbol, + /* 0x5d */ XK_F18, NoSymbol, + /* 0x5e */ XK_F19, NoSymbol, + /* 0x5f */ XK_F20, NoSymbol, + /* 0x60 */ XK_KP_Enter, NoSymbol, + /* 0x61 */ XK_Control_R, NoSymbol, + /* 0x62 */ XK_KP_Divide, NoSymbol, + /* 0x63 */ XK_Print, XK_Sys_Req, + /* 0x64 */ XK_Alt_R, XK_Meta_R, + /* 0x65 */ NoSymbol, NoSymbol, /* KEY_LINEFEED */ + /* 0x66 */ XK_Home, NoSymbol, + /* 0x67 */ XK_Up, NoSymbol, + /* 0x68 */ XK_Prior, NoSymbol, + /* 0x69 */ XK_Left, NoSymbol, + /* 0x6a */ XK_Right, NoSymbol, + /* 0x6b */ XK_End, NoSymbol, + /* 0x6c */ XK_Down, NoSymbol, + /* 0x6d */ XK_Next, NoSymbol, + /* 0x6e */ XK_Insert, NoSymbol, + /* 0x6f */ XK_Delete, NoSymbol, + /* 0x70 */ NoSymbol, NoSymbol, /* KEY_MACRO */ + /* 0x71 */ NoSymbol, NoSymbol, + /* 0x72 */ NoSymbol, NoSymbol, + /* 0x73 */ NoSymbol, NoSymbol, + /* 0x74 */ NoSymbol, NoSymbol, + /* 0x75 */ XK_KP_Equal, NoSymbol, + /* 0x76 */ NoSymbol, NoSymbol, + /* 0x77 */ NoSymbol, NoSymbol, + /* 0x78 */ XK_F21, NoSymbol, + /* 0x79 */ XK_F22, NoSymbol, + /* 0x7a */ XK_F23, NoSymbol, + /* 0x7b */ XK_F24, NoSymbol, + /* 0x7c */ XK_KP_Separator, NoSymbol, + /* 0x7d */ XK_Meta_L, NoSymbol, + /* 0x7e */ XK_Meta_R, NoSymbol, + /* 0x7f */ XK_Multi_key, NoSymbol, + /* 0x80 */ NoSymbol, NoSymbol, + /* 0x81 */ NoSymbol, NoSymbol, + /* 0x82 */ NoSymbol, NoSymbol, + /* 0x83 */ NoSymbol, NoSymbol, + /* 0x84 */ NoSymbol, NoSymbol, + /* 0x85 */ NoSymbol, NoSymbol, + /* 0x86 */ NoSymbol, NoSymbol, + /* 0x87 */ NoSymbol, NoSymbol, + /* 0x88 */ NoSymbol, NoSymbol, + /* 0x89 */ NoSymbol, NoSymbol, + /* 0x8a */ NoSymbol, NoSymbol, + /* 0x8b */ NoSymbol, NoSymbol, + /* 0x8c */ NoSymbol, NoSymbol, + /* 0x8d */ NoSymbol, NoSymbol, + /* 0x8e */ NoSymbol, NoSymbol, + /* 0x8f */ NoSymbol, NoSymbol, + /* 0x90 */ NoSymbol, NoSymbol, + /* 0x91 */ NoSymbol, NoSymbol, + /* 0x92 */ NoSymbol, NoSymbol, + /* 0x93 */ NoSymbol, NoSymbol, + /* 0x94 */ NoSymbol, NoSymbol, + /* 0x95 */ NoSymbol, NoSymbol, + /* 0x96 */ NoSymbol, NoSymbol, + /* 0x97 */ NoSymbol, NoSymbol, + /* 0x98 */ NoSymbol, NoSymbol, + /* 0x99 */ NoSymbol, NoSymbol, + /* 0x9a */ NoSymbol, NoSymbol, + /* 0x9b */ NoSymbol, NoSymbol, + /* 0x9c */ NoSymbol, NoSymbol, + /* 0x9d */ NoSymbol, NoSymbol, + /* 0x9e */ NoSymbol, NoSymbol, + /* 0x9f */ NoSymbol, NoSymbol, + /* 0xa0 */ NoSymbol, NoSymbol, + /* 0xa1 */ NoSymbol, NoSymbol, + /* 0xa2 */ NoSymbol, NoSymbol, + /* 0xa3 */ NoSymbol, NoSymbol, + /* 0xa4 */ NoSymbol, NoSymbol, + /* 0xa5 */ NoSymbol, NoSymbol, + /* 0xa6 */ NoSymbol, NoSymbol, + /* 0xa7 */ NoSymbol, NoSymbol, + /* 0xa8 */ NoSymbol, NoSymbol, + /* 0xa9 */ NoSymbol, NoSymbol, + /* 0xaa */ NoSymbol, NoSymbol, + /* 0xab */ NoSymbol, NoSymbol, + /* 0xac */ NoSymbol, NoSymbol, + /* 0xad */ NoSymbol, NoSymbol, + /* 0xae */ NoSymbol, NoSymbol, + /* 0xaf */ NoSymbol, NoSymbol, + /* 0xb0 */ NoSymbol, NoSymbol, + /* 0xb1 */ NoSymbol, NoSymbol, + /* 0xb2 */ NoSymbol, NoSymbol, + /* 0xb3 */ NoSymbol, NoSymbol, + /* 0xb4 */ NoSymbol, NoSymbol, + /* 0xb5 */ NoSymbol, NoSymbol, + /* 0xb6 */ NoSymbol, NoSymbol, + /* 0xb7 */ NoSymbol, NoSymbol, + /* 0xb8 */ NoSymbol, NoSymbol, + /* 0xb9 */ NoSymbol, NoSymbol, + /* 0xba */ NoSymbol, NoSymbol, + /* 0xbb */ NoSymbol, NoSymbol, + /* 0xbc */ NoSymbol, NoSymbol, + /* 0xbd */ NoSymbol, NoSymbol, + /* 0xbe */ NoSymbol, NoSymbol, + /* 0xbf */ NoSymbol, NoSymbol, + /* 0xc0 */ NoSymbol, NoSymbol, + /* 0xc1 */ NoSymbol, NoSymbol, + /* 0xc2 */ NoSymbol, NoSymbol, + /* 0xc3 */ NoSymbol, NoSymbol, + /* 0xc4 */ NoSymbol, NoSymbol, + /* 0xc5 */ NoSymbol, NoSymbol, + /* 0xc6 */ NoSymbol, NoSymbol, + /* 0xc7 */ NoSymbol, NoSymbol, + /* 0xc8 */ NoSymbol, NoSymbol, + /* 0xc9 */ NoSymbol, NoSymbol, + /* 0xca */ NoSymbol, NoSymbol, + /* 0xcb */ NoSymbol, NoSymbol, + /* 0xcc */ NoSymbol, NoSymbol, + /* 0xcd */ NoSymbol, NoSymbol, + /* 0xce */ NoSymbol, NoSymbol, + /* 0xcf */ NoSymbol, NoSymbol, + /* 0xd0 */ NoSymbol, NoSymbol, + /* 0xd1 */ NoSymbol, NoSymbol, + /* 0xd2 */ NoSymbol, NoSymbol, + /* 0xd3 */ NoSymbol, NoSymbol, + /* 0xd4 */ NoSymbol, NoSymbol, + /* 0xd5 */ NoSymbol, NoSymbol, + /* 0xd6 */ NoSymbol, NoSymbol, + /* 0xd7 */ NoSymbol, NoSymbol, + /* 0xd8 */ NoSymbol, NoSymbol, + /* 0xd9 */ NoSymbol, NoSymbol, + /* 0xda */ NoSymbol, NoSymbol, + /* 0xdb */ NoSymbol, NoSymbol, + /* 0xdc */ NoSymbol, NoSymbol, + /* 0xdd */ NoSymbol, NoSymbol, + /* 0xde */ NoSymbol, NoSymbol, + /* 0xdf */ NoSymbol, NoSymbol, + /* 0xe0 */ NoSymbol, NoSymbol, + /* 0xe1 */ NoSymbol, NoSymbol, + /* 0xe2 */ NoSymbol, NoSymbol, + /* 0xe3 */ NoSymbol, NoSymbol, + /* 0xe4 */ NoSymbol, NoSymbol, + /* 0xe5 */ NoSymbol, NoSymbol, + /* 0xe6 */ NoSymbol, NoSymbol, + /* 0xe7 */ NoSymbol, NoSymbol, + /* 0xe8 */ NoSymbol, NoSymbol, + /* 0xe9 */ NoSymbol, NoSymbol, + /* 0xea */ NoSymbol, NoSymbol, + /* 0xeb */ NoSymbol, NoSymbol, + /* 0xec */ NoSymbol, NoSymbol, + /* 0xed */ NoSymbol, NoSymbol, + /* 0xee */ NoSymbol, NoSymbol, + /* 0xef */ NoSymbol, NoSymbol, + /* 0xf0 */ NoSymbol, NoSymbol, + /* 0xf1 */ NoSymbol, NoSymbol, + /* 0xf2 */ NoSymbol, NoSymbol, + /* 0xf3 */ NoSymbol, NoSymbol, + /* 0xf4 */ NoSymbol, NoSymbol, + /* 0xf5 */ NoSymbol, NoSymbol, + /* 0xf6 */ NoSymbol, NoSymbol, + /* 0xf7 */ NoSymbol, NoSymbol, +}; + +static struct { KeySym keysym; CARD8 mask; } modifiers[] = { + { XK_Shift_L, ShiftMask }, + { XK_Shift_R, ShiftMask }, + { XK_Control_L, ControlMask }, + { XK_Control_R, ControlMask }, + { XK_Caps_Lock, LockMask }, + { XK_Alt_L, AltMask }, + { XK_Alt_R, AltMask }, + { XK_Meta_L, Mod4Mask }, + { XK_Meta_R, Mod4Mask }, + { XK_Num_Lock, NumLockMask }, + { XK_Scroll_Lock, ScrollLockMask }, + { XK_Mode_switch, AltLangMask } +}; +#endif + + + static void jstkKbdCtrl(DeviceIntPtr device, KeybdCtrl *ctrl) { @@ -71,11 +346,46 @@ jstkInitKeys(DeviceIntPtr pJstk, JoystickDevPtr priv) XkbSrvInfoPtr xkbi; XkbControlsPtr ctrls; - if (!InitKeyboardDeviceStruct(pJstk, &priv->rmlvo, NULL, jstkKbdCtrl)) +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 5 { - ErrorF("unable to init keyboard device\n"); - return !Success; + if (!InitKeyboardDeviceStruct(pJstk, &priv->rmlvo, NULL, jstkKbdCtrl)) + { + ErrorF("unable to init keyboard device\n"); + return !Success; + } } +#else + KeySymsRec keySyms; + CARD8 modMap[MAP_LENGTH]; + KeySym sym; + int i, j; + XkbComponentNamesRec xkbnames; + + memset(modMap, 0, sizeof(modMap)); + memset(&xkbnames, 0, sizeof(xkbnames)); + + keySyms.map = map; + keySyms.mapWidth = GLYPHS_PER_KEY; + keySyms.minKeyCode = MIN_KEYCODE; + keySyms.maxKeyCode = MIN_KEYCODE + (sizeof(map) / sizeof(map[0])) / GLYPHS_PER_KEY - 1; + + for (i = 0; i < (sizeof(map) / sizeof(map[0])) / GLYPHS_PER_KEY; i++) { + sym = map[i * GLYPHS_PER_KEY]; + for (j = 0; j < sizeof(modifiers)/sizeof(modifiers[0]); j++) { + if (modifiers[j].keysym == sym) + modMap[i + MIN_KEYCODE] = modifiers[j].mask; + } + } + + ErrorF("%s, %s, %s, %s, %s\n", priv->rmlvo.rules, priv->rmlvo.model, priv->rmlvo.layout, priv->rmlvo.variant, priv->rmlvo.options); + XkbSetRulesDflts(priv->rmlvo.rules, priv->rmlvo.model, + priv->rmlvo.layout, priv->rmlvo.variant, + priv->rmlvo.options); + if (!XkbInitKeyboardDeviceStruct(pJstk, &xkbnames, + &keySyms, modMap, NULL, + jstkKbdCtrl)) + return !Success; +#endif /* Set Autorepeat and Delay */ if ((priv->repeat_delay || priv->repeat_interval) && @@ -107,7 +417,7 @@ jstkInitKeys(DeviceIntPtr pJstk, JoystickDevPtr priv) *************************************************************************** */ void -jstkGenerateKeys(InputInfoPtr device, KEYSCANCODES keys, char pressed) +jstkGenerateKeys(LocalDevicePtr device, KEYSCANCODES keys, char pressed) { int i; unsigned int k; @@ -137,12 +447,11 @@ jstkGenerateKeys(InputInfoPtr device, KEYSCANCODES keys, char pressed) * *************************************************************************** */ -Bool +static Bool jstkKeyboardDeviceControlProc(DeviceIntPtr dev, int what) { - InputInfoPtr pInfo = dev->public.devicePrivate; - JoystickDevPtr priv = pInfo->private; + JoystickDevPtr priv = (JoystickDevPtr)XI_PRIVATE(dev); if (!priv) { DBG(2, ErrorF("jstkKeyboardDeviceControlProc: priv == NULL\n")); return !Success; @@ -180,116 +489,65 @@ jstkKeyboardDeviceControlProc(DeviceIntPtr dev, * * jstkKeyboardPreInit -- * - * See comment in jstkCorePreInit() for details. + * Called manually to create a keyboard device for the joystick * *************************************************************************** */ - -int jstkKeyboardPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) -{ - JoystickDevPtr priv = NULL; - char *s; - - pInfo->private = priv = calloc(1, sizeof(JoystickDevRec)); - if (!priv) - return BadAlloc; - - pInfo->device_control = jstkKeyboardDeviceControlProc; - pInfo->read_input = NULL; - pInfo->control_proc = NULL; - pInfo->switch_mode = NULL; - pInfo->fd = -1; - pInfo->type_name = XI_JOYSTICK; - - /* parse keyboard-related options */ - priv->repeat_delay = 0; - priv->repeat_interval = 0; - - /* Parse option for autorepeat */ - if ((s = xf86SetStrOption(pInfo->options, "AutoRepeat", NULL))) { - int delay, rate; - if (sscanf(s, "%d %d", &delay, &rate) != 2) { - xf86Msg(X_ERROR, "%s: \"%s\" is not a valid AutoRepeat value", - pInfo->name, s); - } else { - priv->repeat_delay = delay; - if (rate != 0) - priv->repeat_interval = 1000/rate; - else priv->repeat_interval = 0; - DBG(1, xf86Msg(X_CONFIG, "Autorepeat set to delay=%d, interval=%d\n", - priv->repeat_delay,priv->repeat_interval)); - } - free(s); - } - - priv->rmlvo.rules = xf86SetStrOption(pInfo->options, "xkb_rules", NULL); - if (!priv->rmlvo.rules) - priv->rmlvo.rules = xf86SetStrOption(pInfo->options, "XkbRules", "evdev"); - - priv->rmlvo.model = xf86SetStrOption(pInfo->options, "xkb_model", NULL); - if (!priv->rmlvo.model) - priv->rmlvo.model = xf86SetStrOption(pInfo->options, "XkbModel", "evdev"); - - priv->rmlvo.layout = xf86SetStrOption(pInfo->options, "xkb_layout", NULL); - if (!priv->rmlvo.layout) - priv->rmlvo.layout = xf86SetStrOption(pInfo->options, "XkbLayout", "us"); - - priv->rmlvo.variant = xf86SetStrOption(pInfo->options, "xkb_variant", NULL); - if (!priv->rmlvo.variant) - priv->rmlvo.variant = xf86SetStrOption(pInfo->options, "XkbVariant", ""); - - priv->rmlvo.options = xf86SetStrOption(pInfo->options, "xkb_options", NULL); - if (!priv->rmlvo.options) - priv->rmlvo.options = xf86SetStrOption(pInfo->options, "XkbOptions", ""); - - return Success; -} - InputInfoPtr -jstkKeyboardHotplug(InputInfoPtr pInfo, int flags) +jstkKeyboardPreInit(InputDriverPtr drv, IDevPtr _dev, int flags) { - int rc; + LocalDevicePtr local = NULL; + IDevPtr dev = NULL; char name[512] = {0}; - InputAttributes *attrs = NULL; - InputOption *options; - InputOption *iopts = NULL, *tmp; - DeviceIntPtr dev; - /* duplicate option list, append to name */ - options = xf86OptionListDuplicate(pInfo->options); - strcpy(name, pInfo->name); + local = xf86AllocateInput(drv, 0); + if (!local) { + goto SetupProc_fail; + } + + dev = xcalloc(sizeof(IDevRec), 1); + strcpy(name, _dev->identifier); strcat(name, " (keys)"); - options = xf86ReplaceStrOption(options, "Name", name); - options = xf86ReplaceStrOption(options, "_source", "_driver/joystick"); + dev->identifier = xstrdup(name); + dev->driver = xstrdup(_dev->driver); + dev->commonOptions = (pointer)xf86optionListDup(_dev->commonOptions); + dev->extraOptions = (pointer)xf86optionListDup(_dev->extraOptions); - while(options) - { - tmp = calloc(1, sizeof(InputOption)); + local->name = dev->identifier; + local->flags = XI86_KEYBOARD_CAPABLE; + local->device_control = jstkKeyboardDeviceControlProc; + local->read_input = NULL; + local->close_proc = NULL; + local->control_proc = NULL; + local->switch_mode = NULL; + local->conversion_proc = NULL; + local->fd = -1; + local->dev = NULL; + local->private = NULL; + local->type_name = XI_JOYSTICK; + local->history_size = 0; + local->always_core_feedback = 0; + local->conf_idev = dev; - tmp->key = xf86OptionName(options); - tmp->value = xf86OptionValue(options); - tmp->next = iopts; - iopts = tmp; - options = xf86NextOption(options); + xf86CollectInputOptions(local, NULL, NULL); + xf86OptionListReport(local->options); + xf86ProcessCommonOptions(local, local->options); + + + /* return the LocalDevice */ + local->flags |= XI86_CONFIGURED; + + return (local); + +SetupProc_fail: + if (local) + local->private = NULL; + if (dev) { + if (dev->identifier) xfree(dev->identifier); + if (dev->driver) xfree(dev->driver); + xfree(dev); } - - /* duplicate attribute list */ - attrs = DuplicateInputAttributes(pInfo->attrs); - - rc = NewInputDeviceRequest(iopts, attrs, &dev); - - while(iopts) - { - tmp = iopts->next; - free(iopts->key); - free(iopts->value); - free(iopts); - iopts = tmp; - } - - FreeInputAttributes(attrs); - - return (rc == Success) ? dev->public.devicePrivate : NULL; + return NULL; } @@ -304,15 +562,15 @@ jstkKeyboardHotplug(InputInfoPtr pInfo, int flags) */ void jstkKeyboardUnInit(InputDriverPtr drv, - InputInfoPtr pInfo, + LocalDevicePtr local, int flags) { - JoystickDevPtr device = (JoystickDevPtr) pInfo->private; + JoystickDevPtr device = (JoystickDevPtr) local->private; DBG(2, ErrorF("jstkKeyboardUnInit.\n")); device->keyboard_device = NULL; - pInfo->private = NULL; + local->private = NULL; - xf86DeleteInput(pInfo, 0); + xf86DeleteInput(local, 0); } diff --git a/driver/xf86-input-joystick/src/jstk_key.h b/driver/xf86-input-joystick/src/jstk_key.h index fc0c7821a..1791c3518 100644 --- a/driver/xf86-input-joystick/src/jstk_key.h +++ b/driver/xf86-input-joystick/src/jstk_key.h @@ -25,10 +25,9 @@ #ifndef __JSTK_KEY_H_INCLUDED__ #define __JSTK_KEY_H_INCLUDED__ -void jstkGenerateKeys(InputInfoPtr device, KEYSCANCODES keys, char pressed); +void jstkGenerateKeys(LocalDevicePtr device, KEYSCANCODES keys, char pressed); + +InputInfoPtr jstkKeyboardPreInit(InputDriverPtr drv, IDevPtr dev, int flags); +void jstkKeyboardUnInit(InputDriverPtr drv, LocalDevicePtr local, int flags); -int jstkKeyboardPreInit(InputDriverPtr pInfo, InputInfoPtr dev, int flags); -void jstkKeyboardUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags); -Bool jstkKeyboardDeviceControlProc(DeviceIntPtr dev, int what); -InputInfoPtr jstkKeyboardHotplug(InputInfoPtr dev, int flags); #endif diff --git a/driver/xf86-input-joystick/src/jstk_options.c b/driver/xf86-input-joystick/src/jstk_options.c index 65f25f804..42293a7a1 100644 --- a/driver/xf86-input-joystick/src/jstk_options.c +++ b/driver/xf86-input-joystick/src/jstk_options.c @@ -26,7 +26,6 @@ #include "config.h" #endif -#include #include #include #include @@ -155,7 +154,7 @@ jstkParseButtonOption(const char* org, xf86Msg(X_WARNING, "%s: error parsing button parameter.\n", name); } - free(param); + xfree(param); } @@ -293,5 +292,5 @@ jstkParseAxisOption(const char* org, }else xf86Msg(X_WARNING, "%s: error parsing deadzone.\n", name); } - free(param); + xfree(param); } diff --git a/driver/xf86-input-joystick/src/jstk_properties.c b/driver/xf86-input-joystick/src/jstk_properties.c index 413822d10..1ceeb061b 100644 --- a/driver/xf86-input-joystick/src/jstk_properties.c +++ b/driver/xf86-input-joystick/src/jstk_properties.c @@ -25,9 +25,12 @@ #include "config.h" #endif -#include #include +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3 + + + #include #include #include @@ -453,3 +456,5 @@ jstkInitProperties(DeviceIntPtr pJstk, JoystickDevPtr priv) return TRUE; } + +#endif