diff --git a/driver/xf86-input-joystick/COPYING b/driver/xf86-input-joystick/COPYING index 7f33cbfd2..2f3bc01c2 100644 --- a/driver/xf86-input-joystick/COPYING +++ b/driver/xf86-input-joystick/COPYING @@ -1,12 +1,41 @@ -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-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. -Please submit updated COPYING files to the Xorg bugzilla: +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. -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 cf568f269..6b0087f12 100644 --- a/driver/xf86-input-joystick/ChangeLog +++ b/driver/xf86-input-joystick/ChangeLog @@ -1,3 +1,429 @@ +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/INSTALL b/driver/xf86-input-joystick/INSTALL index 8b82ade08..7dbb99bdf 100644 --- a/driver/xf86-input-joystick/INSTALL +++ b/driver/xf86-input-joystick/INSTALL @@ -289,3 +289,294 @@ operates. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006, 2007, 2008 Free Software Foundation, Inc. + + This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + + Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. Caching is +disabled by default to prevent problems with accidental use of stale +cache files. + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. + + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + + 6. Often, you can also type `make uninstall' to remove the installed + files again. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c99 CFLAGS=-g LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you can use GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. + + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the `lipo' tool if you have problems. + +Installation Names +================== + + By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Particular systems +================== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU +CC is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +parse its `' header file. The option `-nodtk' can be used as +a workaround. If GNU CC is not installed, it is therefore recommended +to try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + +Specifying the System Type +========================== + + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + + Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). + +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: + + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + +`configure' Invocation +====================== + + `configure' recognizes the following options to control how it +operates. + +`--help' +`-h' + Print a summary of all of the options to `configure', and exit. + +`--help=short' +`--help=recursive' + Print a summary of the options unique to this package's + `configure', and exit. The `short' variant lists options used + only in the top level, while the `recursive' variant lists options + also present in any nested packages. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--prefix=DIR' + Use DIR as the installation prefix. *Note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. + +`--no-create' +`-n' + Run the configure checks, but stop before creating any output + files. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/driver/xf86-input-joystick/Makefile.am b/driver/xf86-input-joystick/Makefile.am index be8812fc7..13946b88d 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 -EXTRA_DIST = ChangeLog -MAINTAINERCLEANFILES = ChangeLog +.PHONY: ChangeLog INSTALL -.PHONY: ChangeLog +INSTALL: + $(INSTALL_CMD) ChangeLog: $(CHANGELOG_CMD) -dist-hook: ChangeLog +dist-hook: ChangeLog INSTALL diff --git a/driver/xf86-input-joystick/Makefile.in b/driver/xf86-input-joystick/Makefile.in index 06368bb4f..04a7d6d1b 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 = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c +install_sh_DATA = ${SHELL} $(install_sh) -c -m 644 +install_sh_PROGRAM = ${SHELL} $(install_sh) -c +install_sh_SCRIPT = ${SHELL} $(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 config.guess config.sub depcomp install-sh ltmain.sh \ - missing + ChangeLog INSTALL 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,6 +108,7 @@ 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@ @@ -150,6 +151,7 @@ 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@ @@ -185,6 +187,7 @@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ XORG_CFLAGS = @XORG_CFLAGS@ @@ -239,13 +242,11 @@ 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,12 +711,15 @@ uninstall-info: uninstall-info-recursive uninstall-pkgconfigDATA -.PHONY: ChangeLog +.PHONY: ChangeLog INSTALL + +INSTALL: + $(INSTALL_CMD) ChangeLog: $(CHANGELOG_CMD) -dist-hook: ChangeLog +dist-hook: ChangeLog INSTALL # 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 b8fd22345..108320b13 100644 --- a/driver/xf86-input-joystick/aclocal.m4 +++ b/driver/xf86-input-joystick/aclocal.m4 @@ -7134,18 +7134,6 @@ 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 @@ -7670,7 +7658,7 @@ dnl DEALINGS IN THE SOFTWARE. # See the "minimum version" comment for each macro you use to see what # version you require. m4_defun([XORG_MACROS_VERSION],[ -m4_define([vers_have], [1.13.0]) +m4_define([vers_have], [1.15.0]) m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) m4_if(m4_cmp(maj_have, maj_needed), 0,, @@ -7697,7 +7685,7 @@ AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], # which is not the best choice for supporting other OS'es, but covers most # of the ones we need for now. AC_MSG_CHECKING([if $RAWCPP requires -undef]) -AC_LANG_CONFTEST([Does cpp redefine unix ?]) +AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then AC_MSG_RESULT([no]) else @@ -7715,7 +7703,7 @@ fi rm -f conftest.$ac_ext AC_MSG_CHECKING([if $RAWCPP requires -traditional]) -AC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) +AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then AC_MSG_RESULT([no]) else @@ -8090,6 +8078,8 @@ AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) # AC_DEFUN([XORG_WITH_XSLTPROC],[ AC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) +# Preserves the interface, should it be implemented later +m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) m4_define([_defopt], m4_default([$2], [auto])) AC_ARG_WITH(xsltproc, AS_HELP_STRING([--with-xsltproc], @@ -8120,13 +8110,65 @@ else AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) fi -# Checking for minimum version is not implemented -# but we want to keep the interface consistent with other commands -m4_ifval([$1],[AC_MSG_WARN(Checking for MIN-VERSION is not implemented.)]) - AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) ]) # XORG_WITH_XSLTPROC +# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) +# ---------------------------------------- +# Minimum version: 1.15.0 +# +# PERL (Practical Extraction and Report Language) is a language optimized for +# scanning arbitrary text files, extracting information from those text files, +# and printing reports based on that information. +# +# When DEFAULT is not specified, --with-perl assumes 'auto'. +# +# Interface to module: +# HAVE_PERL: used in makefiles to conditionally scan text files +# PERL: returns the path of the perl program found +# returns the path set by the user in the environment +# --with-perl: 'yes' user instructs the module to use perl +# 'no' user instructs the module not to use perl +# have_perl: returns yes if perl found in PATH or no +# +# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. +# +AC_DEFUN([XORG_WITH_PERL],[ +AC_ARG_VAR([PERL], [Path to perl command]) +# Preserves the interface, should it be implemented later +m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) +m4_define([_defopt], m4_default([$2], [auto])) +AC_ARG_WITH(perl, + AS_HELP_STRING([--with-perl], + [Use perl for extracting information from files (default: ]_defopt[)]), + [use_perl=$withval], [use_perl=]_defopt) +m4_undefine([_defopt]) + +if test "x$use_perl" = x"auto"; then + AC_PATH_PROG([PERL], [perl]) + if test "x$PERL" = "x"; then + AC_MSG_WARN([perl not found - cannot extract information and report]) + have_perl=no + else + have_perl=yes + fi +elif test "x$use_perl" = x"yes" ; then + AC_PATH_PROG([PERL], [perl]) + if test "x$PERL" = "x"; then + AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) + fi + have_perl=yes +elif test "x$use_perl" = x"no" ; then + if test "x$PERL" != "x"; then + AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) + fi + have_perl=no +else + AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) +fi + +AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) +]) # XORG_WITH_PERL # XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) # ---------------- @@ -8373,10 +8415,11 @@ AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) ]) # XORG_WITH_GROFF -# XORG_WITH_FOP([DEFAULT]) -# ---------------- +# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) +# --------------------------------------- # Minimum version: 1.6.0 # Minimum version for optional DEFAULT argument: 1.11.0 +# Minimum version for optional MIN-VERSION argument: 1.15.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a module to test for the @@ -8396,7 +8439,7 @@ AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) # AC_DEFUN([XORG_WITH_FOP],[ AC_ARG_VAR([FOP], [Path to fop command]) -m4_define([_defopt], m4_default([$1], [auto])) +m4_define([_defopt], m4_default([$2], [auto])) AC_ARG_WITH(fop, AS_HELP_STRING([--with-fop], [Use fop to regenerate documentation (default: ]_defopt[)]), @@ -8425,6 +8468,22 @@ elif test "x$use_fop" = x"no" ; then else AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) fi + +# Test for a minimum version of fop, if provided. +m4_ifval([$1], +[if test "$have_fop" = yes; then + # scrape the fop version + AC_MSG_CHECKING([for fop minimum version]) + fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` + AC_MSG_RESULT([$fop_version]) + AS_VERSION_COMPARE([$fop_version], [$1], + [if test "x$use_fop" = xauto; then + AC_MSG_WARN([fop version $fop_version found, but $1 needed]) + have_fop=no + else + AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) + fi]) +fi]) AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) ]) # XORG_WITH_FOP @@ -8923,6 +8982,23 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) ]) # XORG_LINT_LIBRARY +# XORG_COMPILER_BRAND +# ------------------- +# Minimum version: 1.14.0 +# +# Checks for various brands of compilers and sets flags as appropriate: +# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" +# clang compiler - sets CLANGCC to "yes" +# Intel compiler - sets INTELCC to "yes" +# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" +# +AC_DEFUN([XORG_COMPILER_BRAND], [ +AC_REQUIRE([AC_PROG_CC_C99]) +AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) +AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) +AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) +]) # XORG_COMPILER_BRAND + # XORG_CWARNFLAGS # --------------- # Minimum version: 1.2.0 @@ -8931,6 +9007,7 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) # AC_DEFUN([XORG_CWARNFLAGS], [ AC_REQUIRE([AC_PROG_CC_C99]) +AC_REQUIRE([XORG_COMPILER_BRAND]) if test "x$GCC" = xyes ; then CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ -Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ @@ -8941,7 +9018,6 @@ if test "x$GCC" = xyes ; then ;; esac else - AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) if test "x$SUNCC" = "xyes"; then CWARNFLAGS="-v" fi @@ -8953,28 +9029,43 @@ AC_SUBST(CWARNFLAGS) # ----------------------- # Minimum version: 1.3.0 # -# Add configure option to enable strict compilation +# Add configure option to enable strict compilation flags, such as treating +# warnings as fatal errors. +# If --enable-strict-compilation is passed to configure, adds strict flags to +# $CWARNFLAGS. +# +# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or +# when strict compilation is unconditionally desired. AC_DEFUN([XORG_STRICT_OPTION], [ # If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89 AC_REQUIRE([AC_PROG_CC_C99]) +AC_REQUIRE([XORG_COMPILER_BRAND]) AC_REQUIRE([XORG_CWARNFLAGS]) AC_ARG_ENABLE(strict-compilation, AS_HELP_STRING([--enable-strict-compilation], [Enable all warnings from compiler and make them errors (default: disabled)]), [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) -if test "x$STRICT_COMPILE" = "xyes"; then - AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) - AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) - 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 +if test "x$GCC" = xyes ; then + STRICT_CFLAGS="-pedantic -Werror" + # Add -Werror=attributes if supported (gcc 4.2 & later) + AC_MSG_CHECKING([if $CC supports -Werror=attributes]) + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $STRICT_CFLAGS -Werror=attributes" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([return 0;])], + [STRICT_CFLAGS="$STRICT_CFLAGS -Werror=attributes" + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) + CFLAGS="$save_CFLAGS" +elif test "x$SUNCC" = "xyes"; then + STRICT_CFLAGS="-errwarn" +elif test "x$INTELCC" = "xyes"; then + STRICT_CFLAGS="-Werror" fi -CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" +if test "x$STRICT_COMPILE" = "xyes"; then + CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" +fi +AC_SUBST([STRICT_CFLAGS]) AC_SUBST([CWARNFLAGS]) ]) # XORG_STRICT_OPTION diff --git a/driver/xf86-input-joystick/config.h.in b/driver/xf86-input-joystick/config.h.in index 5982cc09f..0cf43dd24 100644 --- a/driver/xf86-input-joystick/config.h.in +++ b/driver/xf86-input-joystick/config.h.in @@ -1,7 +1,5 @@ /* config.h.in. Generated from configure.ac by autoheader. */ -#include "xorg-server.h" - /* Compile BSD usbhid backend */ #undef BSD_BACKEND @@ -65,9 +63,6 @@ /* 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/50-joystick-all.conf b/driver/xf86-input-joystick/config/50-joystick-all.conf index ee03dd55f..c0a049a89 100644 --- a/driver/xf86-input-joystick/config/50-joystick-all.conf +++ b/driver/xf86-input-joystick/config/50-joystick-all.conf @@ -49,3 +49,54 @@ Section "InputClass" # Option "XkbVariant" "nodeadkeys" # Option "AutoRepeat" "400 25" EndSection +# Example xorg.conf.d snippet that assigns the joystick driver +# to all joysticks. See xorg.conf.d(5) for more information on +# InputClass. +# DO NOT EDIT THIS FILE, your distribution will likely overwrite +# it when updating. Copy (and rename) this file into +# /etc/X11/xorg.conf.d first. +# Additional options may be added in the form of +# Option "OptionName" "value" +# + +Section "InputClass" + Identifier "joystick-all" + + # UNCOMMENT TO ENABLE HOTPLUGGING OF JOYSTICKS +# Driver "joystick" +# MatchIsJoystick "on" +# MatchDevicePath "/dev/input/event*" + + Option "MapButton1" "button=1" + Option "MapButton2" "button=2" + Option "MapButton3" "button=3" + + Option "MapAxis1" "mode=relative axis=+1x deadzone=5000" + Option "MapAxis2" "mode=relative axis=+1y deadzone=5000" + Option "MapAxis3" "mode=relative axis=+1zx deadzone=5000" + Option "MapAxis4" "mode=relative axis=+1zy deadzone=5000" + Option "MapAxis5" "mode=accelerated axis=+1x deadzone=5000" + Option "MapAxis6" "mode=accelerated axis=+1y deadzone=5000" + + + # Map Alt+Tab to button #4 +# Option "MapButton4" "key=64+23" + + # Button 8 will slow down all movement to factor 0.3 +# Option "MapButton8" "amplify=0.3" + + # Button 9 will disable all events except button #9 itself +# Option "MapButton9" "disable-all" + + # Map button #10 to Space +# Option "MapButton10" "key=65" + + # Map axis #1 and #2 to the keycodes for Left, Right, Up and Down rather + # than pointer movement +# Option "MapAxis1" "mode=accelerated keylow=113 keyhigh=114" +# Option "MapAxis2" "mode=accelerated keylow=111 keyhigh=116" + +# Option "XkbLayout" "de" +# Option "XkbVariant" "nodeadkeys" +# Option "AutoRepeat" "400 25" +EndSection diff --git a/driver/xf86-input-joystick/config/Makefile.am b/driver/xf86-input-joystick/config/Makefile.am index c96ffeb54..2aef07118 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 +EXTRA_DIST = 50-x11-input-joystick.fdi 50-joystick-all.conf diff --git a/driver/xf86-input-joystick/config/Makefile.in b/driver/xf86-input-joystick/config/Makefile.in index bed5622a8..ba7de33f5 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 = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c +install_sh_DATA = ${SHELL} $(install_sh) -c -m 644 +install_sh_PROGRAM = ${SHELL} $(install_sh) -c +install_sh_SCRIPT = ${SHELL} $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : @@ -53,6 +53,7 @@ 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@ @@ -95,6 +96,7 @@ 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@ @@ -130,6 +132,7 @@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ XORG_CFLAGS = @XORG_CFLAGS@ @@ -184,7 +187,7 @@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -EXTRA_DIST = 50-x11-input-joystick.fdi +EXTRA_DIST = 50-x11-input-joystick.fdi 50-joystick-all.conf all: all-am .SUFFIXES: @@ -197,9 +200,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign config/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu config/Makefile + $(AUTOMAKE) --foreign 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 ad1f14b54..7d8ef4acf 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.5.0. +# Generated by GNU Autoconf 2.62 for xf86-input-joystick 1.6.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.5.0' -PACKAGE_STRING='xf86-input-joystick 1.5.0' +PACKAGE_VERSION='1.6.0' +PACKAGE_STRING='xf86-input-joystick 1.6.0' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' ac_unique_file="Makefile.am" @@ -898,20 +898,10 @@ FFLAGS ac_ct_F77 LIBTOOL CWARNFLAGS -DEBUG_TRUE -DEBUG_FALSE -inputdir +STRICT_CFLAGS +CHANGELOG_CMD PKG_CONFIG -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 +INSTALL_CMD APP_MAN_SUFFIX LIB_MAN_SUFFIX FILE_MAN_SUFFIX @@ -926,7 +916,20 @@ DRIVER_MAN_DIR ADMIN_MAN_DIR XORG_MAN_PAGE MAN_SUBSTS -CHANGELOG_CMD +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 LIBOBJS LTLIBOBJS' ac_subst_files='' @@ -941,9 +944,10 @@ with_gnu_ld enable_libtool_lock with_pic with_tags +enable_strict_compilation with_xorg_module_dir -enable_debug with_sdkdir +enable_debug ' ac_precious_vars='build_alias host_alias @@ -1515,7 +1519,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.5.0 to adapt to many kinds of systems. +\`configure' configures xf86-input-joystick 1.6.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1586,7 +1590,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xf86-input-joystick 1.5.0:";; + short | recursive ) echo "Configuration of xf86-input-joystick 1.6.0:";; esac cat <<\_ACEOF @@ -1603,7 +1607,10 @@ 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-debug Enable debugging (default: enabled) + --enable-strict-compilation + Enable all warnings from compiler and make them + errors (default: disabled) + --enable-debug Enable debugging (default: disabled) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1701,7 +1708,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -xf86-input-joystick configure 1.5.0 +xf86-input-joystick configure 1.6.0 generated by GNU Autoconf 2.62 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1715,7 +1722,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.5.0, which was +It was created by xf86-input-joystick $as_me 1.6.0, which was generated by GNU Autoconf 2.62. Invocation command line was $ $0 $@ @@ -2082,6 +2089,7 @@ 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 @@ -2114,6 +2122,8 @@ 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 @@ -2366,7 +2376,7 @@ fi # Define the identity of the package. PACKAGE='xf86-input-joystick' - VERSION='1.5.0' + VERSION='1.6.0' cat >>confdefs.h <<_ACEOF @@ -2512,7 +2522,6 @@ 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. @@ -2538,22 +2547,7 @@ fi -# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG - - - - - - - - - - - -ac_config_headers="$ac_config_headers config.h" - - -# Checks for programs. +# Initialize libtool # Check whether --enable-static was given. if test "${enable_static+set}" = set; then enableval=$enable_static; p=${PACKAGE-default} @@ -4440,7 +4434,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4443 "configure"' > conftest.$ac_ext + echo '#line 4437 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7548,11 +7542,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:7551: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7545: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7555: \$? = $ac_status" >&5 + echo "$as_me:7549: \$? = $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. @@ -7838,11 +7832,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:7841: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7835: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7845: \$? = $ac_status" >&5 + echo "$as_me:7839: \$? = $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. @@ -7942,11 +7936,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:7945: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7939: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7949: \$? = $ac_status" >&5 + echo "$as_me:7943: \$? = $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 @@ -10342,7 +10336,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:12848: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12858: \$? = $ac_status" >&5 + echo "$as_me:12852: \$? = $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. @@ -12955,11 +12949,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:12958: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12952: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12962: \$? = $ac_status" >&5 + echo "$as_me:12956: \$? = $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 @@ -14538,11 +14532,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:14541: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14535: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14545: \$? = $ac_status" >&5 + echo "$as_me:14539: \$? = $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. @@ -14642,11 +14636,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:14645: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14639: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14649: \$? = $ac_status" >&5 + echo "$as_me:14643: \$? = $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 @@ -16857,11 +16851,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:16860: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16854: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16864: \$? = $ac_status" >&5 + echo "$as_me:16858: \$? = $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. @@ -17147,11 +17141,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:17150: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17144: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17154: \$? = $ac_status" >&5 + echo "$as_me:17148: \$? = $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. @@ -17251,11 +17245,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:17254: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17248: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17258: \$? = $ac_status" >&5 + echo "$as_me:17252: \$? = $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 @@ -19936,802 +19930,17 @@ 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 -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 +# Initialize X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS + + + + + + -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 @@ -20938,17 +20147,125 @@ 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 +{ $as_echo "$as_me:$LINENO: checking whether __clang__ is declared" >&5 +$as_echo_n "checking whether __clang__ is declared... " >&6; } +if test "${ac_cv_have_decl___clang__+set}" = set; then + $as_echo_n "(cached) " >&6 else - { $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5 + 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 __clang__ + (void) __clang__; +#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___clang__=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl___clang__=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___clang__" >&5 +$as_echo "$ac_cv_have_decl___clang__" >&6; } +if test $ac_cv_have_decl___clang__ = yes; then + CLANGCC="yes" +else + CLANGCC="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 + +{ $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 @@ -21007,62 +20324,9 @@ 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. @@ -21181,6 +20445,304 @@ $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 + 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$GCC" = xyes ; then + STRICT_CFLAGS="-pedantic -Werror" + # Add -Werror=attributes if supported (gcc 4.2 & later) + { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=attributes" >&5 +$as_echo_n "checking if $CC supports -Werror=attributes... " >&6; } + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $STRICT_CFLAGS -Werror=attributes" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +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 + STRICT_CFLAGS="$STRICT_CFLAGS -Werror=attributes" + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$save_CFLAGS" +elif test "x$SUNCC" = "xyes"; then + STRICT_CFLAGS="-errwarn" +elif test "x$INTELCC" = "xyes"; then + STRICT_CFLAGS="-Werror" +fi +if test "x$STRICT_COMPILE" = "xyes"; then + CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" +fi + + + + + +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" @@ -21313,12 +20875,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.3.99.901 xproto \$REQUIRED_MODULES\"") >&5 - ($PKG_CONFIG --exists --print-errors "xorg-server >= 1.3.99.901 xproto $REQUIRED_MODULES") 2>&5 + { ($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 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_XORG_CFLAGS=`$PKG_CONFIG --cflags "xorg-server >= 1.3.99.901 xproto $REQUIRED_MODULES" 2>/dev/null` + pkg_cv_XORG_CFLAGS=`$PKG_CONFIG --cflags "xorg-server >= 1.9.99.2 xproto $REQUIRED_MODULES" 2>/dev/null` else pkg_failed=yes fi @@ -21331,12 +20893,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.3.99.901 xproto \$REQUIRED_MODULES\"") >&5 - ($PKG_CONFIG --exists --print-errors "xorg-server >= 1.3.99.901 xproto $REQUIRED_MODULES") 2>&5 + { ($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 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_XORG_LIBS=`$PKG_CONFIG --libs "xorg-server >= 1.3.99.901 xproto $REQUIRED_MODULES" 2>/dev/null` + pkg_cv_XORG_LIBS=`$PKG_CONFIG --libs "xorg-server >= 1.9.99.2 xproto $REQUIRED_MODULES" 2>/dev/null` else pkg_failed=yes fi @@ -21355,14 +20917,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.3.99.901 xproto $REQUIRED_MODULES"` + XORG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xorg-server >= 1.9.99.2 xproto $REQUIRED_MODULES"` else - XORG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xorg-server >= 1.3.99.901 xproto $REQUIRED_MODULES"` + XORG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xorg-server >= 1.9.99.2 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.3.99.901 xproto $REQUIRED_MODULES) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements (xorg-server >= 1.9.99.2 xproto $REQUIRED_MODULES) were not met: $XORG_PKG_ERRORS @@ -21373,7 +20935,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.3.99.901 xproto $REQUIRED_MODULES) were not met: +$as_echo "$as_me: error: Package requirements (xorg-server >= 1.9.99.2 xproto $REQUIRED_MODULES) were not met: $XORG_PKG_ERRORS @@ -21414,21 +20976,66 @@ else $as_echo "yes" >&6; } : fi -XORG_CFLAGS="$CWARNFLAGS $XORG_CFLAGS" -xorg_sdkdir=$(pkg-config --variable=sdkdir xorg-server) + +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 # Check whether --with-sdkdir was given. if test "${with_sdkdir+set}" = set; then withval=$with_sdkdir; sdkdir="$withval" else - sdkdir="${xorg_sdkdir}" + sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` fi -# Checks for libraries. +# 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 header files. +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 +# ----------------------------------------------------------------------------- linux_backend=yes for ac_header in linux/joystick.h @@ -22233,382 +21840,7 @@ 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" @@ -22737,13 +21969,6 @@ $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 @@ -23094,7 +22319,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.5.0, which was +This file was extended by xf86-input-joystick $as_me 1.6.0, which was generated by GNU Autoconf 2.62. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23147,7 +22372,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -xf86-input-joystick config.status 1.5.0 +xf86-input-joystick config.status 1.6.0 configured by $0, generated by GNU Autoconf 2.62, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" @@ -24088,10 +23313,12 @@ $as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2;} fi -echo -echo Building Linux joystick backend: $linux_backend -echo Building Linux evdev backend: $evdev_backend -echo Building BSD usbhid backend: $bsd_backend +# ----------------------------------------------------------------------------- + +$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" 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 e0be56885..73afa9a68 100644 --- a/driver/xf86-input-joystick/configure.ac +++ b/driver/xf86-input-joystick/configure.ac @@ -20,70 +20,73 @@ # # Process this file with autoconf to produce a configure script -AC_PREREQ(2.57) +# Initialize Autoconf +AC_PREREQ([2.60]) AC_INIT([xf86-input-joystick], - 1.5.0, + [1.6.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], - xf86-input-joystick) - + [xf86-input-joystick]) AC_CONFIG_SRCDIR([Makefile.am]) +AC_CONFIG_HEADERS([config.h]) AC_CONFIG_AUX_DIR(.) -AM_INIT_AUTOMAKE([dist-bzip2]) +# Initialize Automake +AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE -# 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. +# Initialize libtool AC_DISABLE_STATIC AC_PROG_LIBTOOL -AC_PROG_CC -XORG_CWARNFLAGS -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) +# 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 # 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.3.99.901] xproto $REQUIRED_MODULES) -XORG_CFLAGS="$CWARNFLAGS $XORG_CFLAGS" -xorg_sdkdir=$(pkg-config --variable=sdkdir xorg-server) +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 AC_ARG_WITH(sdkdir, - AC_HELP_STRING([--with-sdkdir=], - [Xorg X Server sdk headers (default is autodetected)]), - [sdkdir="$withval"], [sdkdir="${xorg_sdkdir}"]) + AS_HELP_STRING([--with-sdkdir=], + [Xorg X Server sdk headers (default is autodetected)]), + [sdkdir="$withval"], + [sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`]) AC_SUBST(sdkdir) -# Checks for libraries. +# 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 header files. +# ----------------------------------------------------------------------------- +# Determine which joystick backend to build +# ----------------------------------------------------------------------------- linux_backend=yes AC_CHECK_HEADERS([linux/joystick.h],, [linux_backend=no]) AM_CONDITIONAL(LINUX_BACKEND, [test "x$linux_backend" = xyes]) @@ -111,27 +114,22 @@ 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_HEADER_STDC +AC_CONFIG_FILES([Makefile + src/Makefile + man/Makefile + config/Makefile + include/Makefile + xorg-joystick.pc]) +AC_OUTPUT -DRIVER_NAME=joystick -AC_SUBST([DRIVER_NAME]) +# ----------------------------------------------------------------------------- -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 +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") 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 21916f730..ed618c228 100644 --- a/driver/xf86-input-joystick/include/Makefile.am +++ b/driver/xf86-input-joystick/include/Makefile.am @@ -18,6 +18,4 @@ # 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 e365c3d1a..802c3940a 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 = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c +install_sh_DATA = ${SHELL} $(install_sh) -c -m 644 +install_sh_PROGRAM = ${SHELL} $(install_sh) -c +install_sh_SCRIPT = ${SHELL} $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : @@ -86,6 +86,7 @@ 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@ @@ -128,6 +129,7 @@ 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@ @@ -163,6 +165,7 @@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ XORG_CFLAGS = @XORG_CFLAGS@ @@ -217,7 +220,6 @@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -EXTRA_DIST = joystick-properties.h sdk_HEADERS = joystick-properties.h all: all-am @@ -231,9 +233,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu include/Makefile + $(AUTOMAKE) --foreign 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 f0eb29b85..4e045d96b 100644 --- a/driver/xf86-input-joystick/man/Makefile.am +++ b/driver/xf86-input-joystick/man/Makefile.am @@ -1,27 +1,24 @@ # # Copyright 2005 Sun Microsystems, Inc. All rights reserved. -# -# 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. +# +# 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. # drivermandir = $(DRIVER_MAN_DIR) @@ -34,25 +31,8 @@ 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): - sed $(MAN_SUBSTS) < $< > $@ + $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ diff --git a/driver/xf86-input-joystick/man/Makefile.in b/driver/xf86-input-joystick/man/Makefile.in index 22d3264e7..1c0b0c670 100644 --- a/driver/xf86-input-joystick/man/Makefile.in +++ b/driver/xf86-input-joystick/man/Makefile.in @@ -16,28 +16,25 @@ # # Copyright 2005 Sun Microsystems, Inc. All rights reserved. -# -# 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. +# +# 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. # srcdir = @srcdir@ @@ -49,9 +46,9 @@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c +install_sh_DATA = ${SHELL} $(install_sh) -c -m 644 +install_sh_PROGRAM = ${SHELL} $(install_sh) -c +install_sh_SCRIPT = ${SHELL} $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : @@ -89,6 +86,7 @@ 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@ @@ -131,6 +129,7 @@ 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@ @@ -149,18 +148,7 @@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ -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' - +MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ NMEDIT = @NMEDIT@ @@ -174,9 +162,10 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ -SED = sed +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ XORG_CFLAGS = @XORG_CFLAGS@ @@ -236,10 +225,6 @@ 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 @@ -254,9 +239,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu man/Makefile + $(AUTOMAKE) --foreign man/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -425,8 +410,9 @@ 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): - sed $(MAN_SUBSTS) < $< > $@ + $(AM_V_GEN)$(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 97e3ba384..da92ceb45 100644 --- a/driver/xf86-input-joystick/man/joystick.man +++ b/driver/xf86-input-joystick/man/joystick.man @@ -4,14 +4,19 @@ .SH NAME joystick \- Joystick input driver .SH SYNOPSIS +Snipped for xorg.conf.d(5): + .nf -.B "Section \*qInputDevice\*q" -.BI " Identifier \*q" devname \*q -.B " Driver \*qjoystick\*q" -.BI " Option \*qDevice\*q \*q" devpath \*q +.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 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: @@ -314,33 +319,21 @@ 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" -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 -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. +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 -Example: -.nf -.BI " InputDevice " "\*qJoystick1\*q \*qSendCoreEvents\*q" -.fi +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 +.I ${sourcecode}/config/50-x11-input-joystick.fdi +to be placed in +.IR /etc/hal/fdi/policy . .SH "SEE ALSO" -__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__), xmodmap(1) +__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorg.conf.d(5), Xserver(__appmansuffix__), X(__miscmansuffix__), xmodmap(1) .SH AUTHORS -Sascha Hlusiak (2007-2009), +Sascha Hlusiak (2007-2011), .fi Frederic Lepied (1995-1999) diff --git a/driver/xf86-input-joystick/src/Makefile.am b/driver/xf86-input-joystick/src/Makefile.am index 1f8898eb5..21cdf3235 100644 --- a/driver/xf86-input-joystick/src/Makefile.am +++ b/driver/xf86-input-joystick/src/Makefile.am @@ -24,7 +24,8 @@ # -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) + +AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS) @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 b963a141a..0e1c07794 100644 --- a/driver/xf86-input-joystick/src/Makefile.in +++ b/driver/xf86-input-joystick/src/Makefile.in @@ -34,6 +34,12 @@ # 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@ @@ -43,9 +49,9 @@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c +install_sh_DATA = ${SHELL} $(install_sh) -c -m 644 +install_sh_PROGRAM = ${SHELL} $(install_sh) -c +install_sh_SCRIPT = ${SHELL} $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : @@ -116,6 +122,7 @@ 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@ @@ -158,6 +165,7 @@ 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@ @@ -193,6 +201,7 @@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ XORG_CFLAGS = @XORG_CFLAGS@ @@ -247,13 +256,7 @@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ - -# 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) +AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS) @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@ @@ -279,9 +282,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/Makefile + $(AUTOMAKE) --foreign 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 71f4168dc..c6ce7b4c5 100644 --- a/driver/xf86-input-joystick/src/backend_bsd.c +++ b/driver/xf86-input-joystick/src/backend_bsd.c @@ -30,6 +30,7 @@ #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 de061d3dc..c506167fd 100644 --- a/driver/xf86-input-joystick/src/backend_evdev.c +++ b/driver/xf86-input-joystick/src/backend_evdev.c @@ -29,6 +29,7 @@ #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 b69f932c2..e61d90842 100644 --- a/driver/xf86-input-joystick/src/backend_joystick.c +++ b/driver/xf86-input-joystick/src/backend_joystick.c @@ -32,6 +32,7 @@ #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 a2e927c08..ec6b79ad0 100644 --- a/driver/xf86-input-joystick/src/jstk.c +++ b/driver/xf86-input-joystick/src/jstk.c @@ -26,6 +26,7 @@ #include "config.h" #endif +#include #include #include @@ -44,9 +45,7 @@ #include "jstk_key.h" #include "jstk_options.h" #include "jstk_properties.h" -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3 - #include -#endif +#include #ifdef LINUX_BACKEND #include "backend_joystick.h" @@ -63,40 +62,6 @@ 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; -} - - /* *************************************************************************** * @@ -147,21 +112,21 @@ jstkOpenDevice(JoystickDevPtr priv, BOOL probe) */ static void -jstkReadProc(LocalDevicePtr local) +jstkReadProc(InputInfoPtr pInfo) { JOYSTICKEVENT event; int number; int i, r; - JoystickDevPtr priv = local->private; + JoystickDevPtr priv = pInfo->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 (local->fd >= 0) - RemoveEnabledDevice(local->fd); + if (pInfo->fd >= 0) + RemoveEnabledDevice(pInfo->fd); return; } @@ -174,7 +139,7 @@ jstkReadProc(LocalDevicePtr local) switch (priv->button[number].mapping) { case JSTK_MAPPING_BUTTON: if (priv->mouse_enabled == TRUE) { - xf86PostButtonEvent(local->dev, 0, + xf86PostButtonEvent(pInfo->dev, 0, priv->button[number].buttonnumber, priv->button[number].pressed, 0, 0); } @@ -187,7 +152,7 @@ jstkReadProc(LocalDevicePtr local) if (priv->button[number].pressed == 0) priv->button[number].currentspeed = 1.0; else if (priv->mouse_enabled == TRUE) - jstkStartButtonAxisTimer(local, number); + jstkStartButtonAxisTimer(pInfo, number); break; case JSTK_MAPPING_KEY: @@ -258,7 +223,7 @@ jstkReadProc(LocalDevicePtr local) priv->axis[number].mapping)); if (priv->axis[number].valuator != -1) - xf86PostMotionEvent(local->dev, 1, priv->axis[number].valuator, + xf86PostMotionEvent(pInfo->dev, 1, priv->axis[number].valuator, 1, priv->axis[number].value); switch (priv->axis[number].mapping) { @@ -272,12 +237,12 @@ jstkReadProc(LocalDevicePtr local) if (priv->axis[number].value == 0) priv->axis[number].currentspeed = 1.0; if (priv->mouse_enabled == TRUE) - jstkStartAxisTimer(local, number); + jstkStartAxisTimer(pInfo, number); break; case JSTK_TYPE_ABSOLUTE: if (priv->mouse_enabled == TRUE) - jstkHandleAbsoluteAxis(local, number); + jstkHandleAbsoluteAxis(pInfo, number); break; default: break; @@ -286,9 +251,9 @@ jstkReadProc(LocalDevicePtr local) case JSTK_MAPPING_KEY: if (priv->keys_enabled == TRUE) { if (priv->axis[number].type == JSTK_TYPE_ACCELERATED) { - jstkHandlePWMAxis(local, number); + jstkHandlePWMAxis(pInfo, number); } else if (priv->axis[number].type == JSTK_TYPE_BYVALUE) { - jstkStartAxisTimer(local, number); + jstkStartAxisTimer(pInfo, number); } break; } @@ -327,12 +292,10 @@ jstkDeviceControlProc(DeviceIntPtr pJstk, int what) { int i; - LocalDevicePtr local = (LocalDevicePtr)pJstk->public.devicePrivate; - JoystickDevPtr priv = (JoystickDevPtr)XI_PRIVATE(pJstk); -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 + InputInfoPtr pInfo = (InputInfoPtr)pJstk->public.devicePrivate; + JoystickDevPtr priv = pInfo->private; Atom btn_labels[BUTTONMAP_SIZE+1] = {0}; /* TODO: fillme */ Atom axes_labels[MAXAXES] = {0}; /* TODO: fillme */ -#endif switch (what) { case DEVICE_INIT: { @@ -355,9 +318,7 @@ 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; @@ -373,71 +334,48 @@ jstkDeviceControlProc(DeviceIntPtr pJstk, priv->axis[i].valuator = m++; } - 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, + if (InitValuatorClassDeviceStruct(pJstk, m, axes_labels, + GetMotionHistorySize(), 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 */ + 1, /* max_res */ + Absolute); 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 */ + 1, /* max_res */ + Absolute); 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 */ + 1, /* max_res */ + Absolute); } /* allocate the motion history buffer if needed */ - xf86MotionHistoryAllocate(local); + xf86MotionHistoryAllocate(pInfo); } - - 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; } @@ -448,8 +386,8 @@ jstkDeviceControlProc(DeviceIntPtr pJstk, if (jstkOpenDevice(priv, FALSE) != -1) { pJstk->public.on = TRUE; - local->fd = priv->fd; - AddEnabledDevice(local->fd); + pInfo->fd = priv->fd; + AddEnabledDevice(pInfo->fd); } else return !Success; break; @@ -471,9 +409,9 @@ jstkDeviceControlProc(DeviceIntPtr pJstk, TimerCancel(priv->axis[i].timer); } - if (local->fd >= 0) - RemoveEnabledDevice(local->fd); - local->fd = -1; + if (pInfo->fd >= 0) + RemoveEnabledDevice(pInfo->fd); + pInfo->fd = -1; if (priv->close_proc) priv->close_proc(priv); pJstk->public.on = FALSE; @@ -487,19 +425,6 @@ jstkDeviceControlProc(DeviceIntPtr pJstk, return Success; } - - - -_X_EXPORT InputDriverRec JSTK_KEYBOARD = { - 1, - "joystick_keyboard", - NULL, - jstkKeyboardPreInit, - jstkKeyboardUnInit, - NULL, - 0 -}; - /* *************************************************************************** * @@ -507,41 +432,41 @@ _X_EXPORT InputDriverRec JSTK_KEYBOARD = { * * 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 InputInfoPtr -jstkCorePreInit(InputDriverPtr drv, IDevPtr dev, int flags) +static int +jstkCorePreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) { - LocalDevicePtr local = NULL; + InputInfoPtr keyboard_device; JoystickDevPtr priv = NULL; char *s; int i, j; - local = xf86AllocateInput(drv, 0); - if (!local) { - goto SetupProc_fail; - } + s = xf86CheckStrOption(pInfo->options, "_source", ""); + if (strcmp(s, "_driver/joystick") == 0) + return jstkKeyboardPreInit(drv, pInfo, flags); - local->private = (JoystickDevPtr)xalloc(sizeof(JoystickDevRec)); - priv = (JoystickDevPtr)local->private; + 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->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; + keyboard_device = jstkKeyboardHotplug(pInfo, flags); + if (!keyboard_device) + return BadAlloc; + + pInfo->private = priv = keyboard_device->private; priv->fd = -1; priv->open_proc = NULL; @@ -554,9 +479,7 @@ jstkCorePreInit(InputDriverPtr drv, IDevPtr dev, int flags) priv->mouse_enabled = TRUE; priv->keys_enabled = TRUE; priv->amplify = 1.0f; - priv->keyboard_device = NULL; - priv->repeat_delay = 0; - priv->repeat_interval = 0; + priv->keyboard_device = keyboard_device; priv->num_axes = MAXAXES; priv->num_buttons = MAXBUTTONS; @@ -614,81 +537,39 @@ jstkCorePreInit(InputDriverPtr drv, IDevPtr dev, 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(dev->commonOptions, "Device", NULL); + priv->device = xf86SetStrOption(pInfo->options, "Device", NULL); if (!priv->device) - priv->device = xf86SetStrOption(dev->commonOptions, "Path", NULL); + priv->device = xf86SetStrOption(pInfo->options, "Path", NULL); if (!priv->device) { - xf86Msg (X_ERROR, "%s: No Device specified.\n", local->name); + xf86Msg (X_ERROR, "%s: No Device specified.\n", pInfo->name); goto SetupProc_fail; } - xf86ProcessCommonOptions(local, local->options); - #if DEBUG - debug_level = xf86SetIntOption(dev->commonOptions, "DebugLevel", 0); + debug_level = xf86SetIntOption(pInfo->options, "DebugLevel", 0); if (debug_level > 0) { xf86Msg(X_CONFIG, "%s: debug level set to %d\n", - local->name, debug_level); + pInfo->name, debug_level); } #else - if (xf86SetIntOption(dev->commonOptions, "DebugLevel", 0) != 0) { + if (xf86SetIntOption(pInfo->options, "DebugLevel", 0) != 0) { xf86Msg(X_WARNING, "%s: DebugLevel: Compiled without debugging support!\n", - local->name); + pInfo->name); } #endif - /* 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); + priv->mouse_enabled = xf86SetBoolOption(pInfo->options, "StartMouseEnabled", TRUE); + priv->keys_enabled = xf86SetBoolOption(pInfo->options, "StartKeysEnabled", TRUE); /* Process button mapping options */ for (i=0; icommonOptions, p, NULL); + s = xf86SetStrOption(pInfo->options, p, NULL); if (s != NULL) { - jstkParseButtonOption(s, priv, i, local->name); + jstkParseButtonOption(s, priv, i, pInfo->name); } DBG(1, xf86Msg(X_CONFIG, "Button %d mapped to %d\n", i+1, priv->button[i].mapping)); @@ -698,9 +579,9 @@ jstkCorePreInit(InputDriverPtr drv, IDevPtr dev, int flags) for (i=0; icommonOptions, p, NULL); + s = xf86SetStrOption(pInfo->options, p, NULL); if (s != NULL) { - jstkParseAxisOption(s, priv, &priv->axis[i], local->name); + jstkParseAxisOption(s, priv, &priv->axis[i], pInfo->name); } DBG(1, xf86Msg(X_CONFIG, "Axis %d type is %d, mapped to %d, amplify=%.3f\n", i+1, @@ -709,23 +590,17 @@ jstkCorePreInit(InputDriverPtr drv, IDevPtr dev, int flags) priv->axis[i].amplify)); } - /* 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); + return Success; SetupProc_fail: - if (priv) - xfree(priv); - if (local) - local->private = NULL; - return NULL; -/* return (local); */ /* Makes X segfault on error */ + if (priv) { + free(priv); + if (keyboard_device) + keyboard_device->private = NULL; + } + if (pInfo) + pInfo->private = NULL; + return BadValue; } @@ -736,26 +611,39 @@ 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, - LocalDevicePtr local, + InputInfoPtr pInfo, int flags) { - JoystickDevPtr device = (JoystickDevPtr) local->private; - - if (device->keyboard_device != NULL) - { - xf86DisableDevice(device->keyboard_device->dev, TRUE); - device->keyboard_device = NULL; + 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); + } } - xfree (device); - local->private = NULL; - xf86DeleteInput(local, 0); + pInfo->private = NULL; + xf86DeleteInput(pInfo, 0); } @@ -767,11 +655,9 @@ _X_EXPORT InputDriverRec JOYSTICK = { NULL, jstkCorePreInit, jstkCoreUnInit, - NULL, - 0 + NULL }; - /* *************************************************************************** * @@ -789,7 +675,6 @@ 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 78a1f83cf..ed5e4a7ba 100644 --- a/driver/xf86-input-joystick/src/jstk.h +++ b/driver/xf86-input-joystick/src/jstk.h @@ -55,17 +55,6 @@ #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, @@ -117,7 +106,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 */ - LocalDevicePtr keyboard_device; /* Slave device for keyboard events */ + InputInfoPtr 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 b31412270..95ebfe974 100644 --- a/driver/xf86-input-joystick/src/jstk_axis.c +++ b/driver/xf86-input-joystick/src/jstk_axis.c @@ -27,6 +27,7 @@ #include "config.h" #endif +#include #include #include #include @@ -55,7 +56,8 @@ jstkAxisTimer(OsTimerPtr timer, { #define NEXTTIMER 15 DeviceIntPtr device = (DeviceIntPtr)arg; - JoystickDevPtr priv = (JoystickDevPtr)XI_PRIVATE(device); + InputInfoPtr pInfo = device->public.devicePrivate; + JoystickDevPtr priv = pInfo->private; int sigstate, i; int nexttimer; @@ -266,7 +268,7 @@ jstkAxisTimer(OsTimerPtr timer, *********************************************************************** */ void -jstkStartAxisTimer(LocalDevicePtr device, int number) +jstkStartAxisTimer(InputInfoPtr device, int number) { int pixel; JoystickDevPtr priv = device->private; @@ -298,7 +300,7 @@ jstkStartAxisTimer(LocalDevicePtr device, int number) */ void -jstkStartButtonAxisTimer(LocalDevicePtr device, int number) +jstkStartButtonAxisTimer(InputInfoPtr device, int number) { int pixel; JoystickDevPtr priv = device->private; @@ -338,7 +340,7 @@ jstkStartButtonAxisTimer(LocalDevicePtr device, int number) *********************************************************************** */ void -jstkHandleAbsoluteAxis(LocalDevicePtr device, int number) +jstkHandleAbsoluteAxis(InputInfoPtr device, int number) { JoystickDevPtr priv = device->private; int i,x,y; @@ -406,7 +408,8 @@ jstkPWMAxisTimer(OsTimerPtr timer, pointer arg) { DeviceIntPtr device = (DeviceIntPtr)arg; - JoystickDevPtr priv = (JoystickDevPtr)XI_PRIVATE(device); + InputInfoPtr pInfo = device->public.devicePrivate; + JoystickDevPtr priv = pInfo->private; int sigstate, i; int nexttimer; @@ -535,7 +538,7 @@ jstkPWMAxisTimer(OsTimerPtr timer, *********************************************************************** */ void -jstkHandlePWMAxis(LocalDevicePtr device, int number) +jstkHandlePWMAxis(InputInfoPtr 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 028c65fc0..0d672dbcf 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(LocalDevicePtr device, int number); -void jstkStartButtonAxisTimer(LocalDevicePtr device, int number); -void jstkHandleAbsoluteAxis(LocalDevicePtr device, int number); -void jstkHandlePWMAxis(LocalDevicePtr device, int number); +void jstkStartAxisTimer(InputInfoPtr device, int number); +void jstkStartButtonAxisTimer(InputInfoPtr device, int number); +void jstkHandleAbsoluteAxis(InputInfoPtr device, int number); +void jstkHandlePWMAxis(InputInfoPtr 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 fb1f52e4a..3c471ce97 100644 --- a/driver/xf86-input-joystick/src/jstk_key.c +++ b/driver/xf86-input-joystick/src/jstk_key.c @@ -28,6 +28,7 @@ #endif +#include #include #include #include @@ -38,9 +39,7 @@ #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 @@ -51,280 +50,6 @@ #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) { @@ -346,46 +71,11 @@ jstkInitKeys(DeviceIntPtr pJstk, JoystickDevPtr priv) XkbSrvInfoPtr xkbi; XkbControlsPtr ctrls; -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 5 + if (!InitKeyboardDeviceStruct(pJstk, &priv->rmlvo, NULL, jstkKbdCtrl)) { - 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)) + ErrorF("unable to init keyboard device\n"); return !Success; -#endif + } /* Set Autorepeat and Delay */ if ((priv->repeat_delay || priv->repeat_interval) && @@ -417,7 +107,7 @@ jstkInitKeys(DeviceIntPtr pJstk, JoystickDevPtr priv) *************************************************************************** */ void -jstkGenerateKeys(LocalDevicePtr device, KEYSCANCODES keys, char pressed) +jstkGenerateKeys(InputInfoPtr device, KEYSCANCODES keys, char pressed) { int i; unsigned int k; @@ -447,11 +137,12 @@ jstkGenerateKeys(LocalDevicePtr device, KEYSCANCODES keys, char pressed) * *************************************************************************** */ -static Bool +Bool jstkKeyboardDeviceControlProc(DeviceIntPtr dev, int what) { - JoystickDevPtr priv = (JoystickDevPtr)XI_PRIVATE(dev); + InputInfoPtr pInfo = dev->public.devicePrivate; + JoystickDevPtr priv = pInfo->private; if (!priv) { DBG(2, ErrorF("jstkKeyboardDeviceControlProc: priv == NULL\n")); return !Success; @@ -489,65 +180,116 @@ jstkKeyboardDeviceControlProc(DeviceIntPtr dev, * * jstkKeyboardPreInit -- * - * Called manually to create a keyboard device for the joystick + * See comment in jstkCorePreInit() for details. * *************************************************************************** */ -InputInfoPtr -jstkKeyboardPreInit(InputDriverPtr drv, IDevPtr _dev, int flags) + +int jstkKeyboardPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) { - LocalDevicePtr local = NULL; - IDevPtr dev = NULL; + 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) +{ + int rc; char name[512] = {0}; + InputAttributes *attrs = NULL; + InputOption *options; + InputOption *iopts = NULL, *tmp; + DeviceIntPtr dev; - local = xf86AllocateInput(drv, 0); - if (!local) { - goto SetupProc_fail; - } - - dev = xcalloc(sizeof(IDevRec), 1); - strcpy(name, _dev->identifier); + /* duplicate option list, append to name */ + options = xf86OptionListDuplicate(pInfo->options); + strcpy(name, pInfo->name); strcat(name, " (keys)"); - dev->identifier = xstrdup(name); - dev->driver = xstrdup(_dev->driver); - dev->commonOptions = (pointer)xf86optionListDup(_dev->commonOptions); - dev->extraOptions = (pointer)xf86optionListDup(_dev->extraOptions); + options = xf86ReplaceStrOption(options, "Name", name); + options = xf86ReplaceStrOption(options, "_source", "_driver/joystick"); - 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; + while(options) + { + tmp = calloc(1, sizeof(InputOption)); - 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); + tmp->key = xf86OptionName(options); + tmp->value = xf86OptionValue(options); + tmp->next = iopts; + iopts = tmp; + options = xf86NextOption(options); } - return NULL; + + /* 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; } @@ -562,15 +304,15 @@ SetupProc_fail: */ void jstkKeyboardUnInit(InputDriverPtr drv, - LocalDevicePtr local, + InputInfoPtr pInfo, int flags) { - JoystickDevPtr device = (JoystickDevPtr) local->private; + JoystickDevPtr device = (JoystickDevPtr) pInfo->private; DBG(2, ErrorF("jstkKeyboardUnInit.\n")); device->keyboard_device = NULL; - local->private = NULL; + pInfo->private = NULL; - xf86DeleteInput(local, 0); + xf86DeleteInput(pInfo, 0); } diff --git a/driver/xf86-input-joystick/src/jstk_key.h b/driver/xf86-input-joystick/src/jstk_key.h index 1791c3518..fc0c7821a 100644 --- a/driver/xf86-input-joystick/src/jstk_key.h +++ b/driver/xf86-input-joystick/src/jstk_key.h @@ -25,9 +25,10 @@ #ifndef __JSTK_KEY_H_INCLUDED__ #define __JSTK_KEY_H_INCLUDED__ -void jstkGenerateKeys(LocalDevicePtr device, KEYSCANCODES keys, char pressed); - -InputInfoPtr jstkKeyboardPreInit(InputDriverPtr drv, IDevPtr dev, int flags); -void jstkKeyboardUnInit(InputDriverPtr drv, LocalDevicePtr local, int flags); +void jstkGenerateKeys(InputInfoPtr device, KEYSCANCODES keys, char pressed); +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 42293a7a1..65f25f804 100644 --- a/driver/xf86-input-joystick/src/jstk_options.c +++ b/driver/xf86-input-joystick/src/jstk_options.c @@ -26,6 +26,7 @@ #include "config.h" #endif +#include #include #include #include @@ -154,7 +155,7 @@ jstkParseButtonOption(const char* org, xf86Msg(X_WARNING, "%s: error parsing button parameter.\n", name); } - xfree(param); + free(param); } @@ -292,5 +293,5 @@ jstkParseAxisOption(const char* org, }else xf86Msg(X_WARNING, "%s: error parsing deadzone.\n", name); } - xfree(param); + free(param); } diff --git a/driver/xf86-input-joystick/src/jstk_properties.c b/driver/xf86-input-joystick/src/jstk_properties.c index 1ceeb061b..413822d10 100644 --- a/driver/xf86-input-joystick/src/jstk_properties.c +++ b/driver/xf86-input-joystick/src/jstk_properties.c @@ -25,12 +25,9 @@ #include "config.h" #endif +#include #include -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3 - - - #include #include #include @@ -456,5 +453,3 @@ jstkInitProperties(DeviceIntPtr pJstk, JoystickDevPtr priv) return TRUE; } - -#endif