Update to xf86-input-keyboard 1.4.0. tested by many with xserver 1.8.
ok oga@, todd@.
This commit is contained in:
parent
183207fd4d
commit
3fa6fbc913
@ -1,3 +1,342 @@
|
||||
commit 0c75afb4895b60aa08209ccfee9dfad4e4495f4d
|
||||
Author: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Tue Oct 6 17:02:33 2009 +1000
|
||||
|
||||
Remove now un-used autorepeat field.
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
|
||||
commit adc1048980113b329d97ebf5b974ca4a50fc86ba
|
||||
Author: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Tue Oct 6 17:00:58 2009 +1000
|
||||
|
||||
Don't use XKB_DFLT_RULES from the server.
|
||||
|
||||
On Linux, the server uses default rules of "evdev" which doesn't apply for
|
||||
this driver. For all other cases, the server uses "base", so let's just
|
||||
hardcode it here too.
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
|
||||
commit ecd34ebd43d5a8c0db0a6dd132b61a4c663c7fd8
|
||||
Author: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Tue Oct 6 17:05:56 2009 +1000
|
||||
|
||||
Require macros 1.3 for XORG_DEFAULT_OPTIONS
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
commit 5427034948fd4d59d5d2d50f9188376f23119a72
|
||||
Author: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Wed Sep 9 11:48:43 2009 +1000
|
||||
|
||||
keyboard 1.3.99.1
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
commit 158d33c15df60696946031a0319e2bd2ec8b9541
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Wed Aug 19 18:56:05 2009 -0700
|
||||
|
||||
sun_kbd: Check if streams module is already on the stack before pushing it
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
|
||||
commit 891d55e759ff6a30f62809081a11c3da20fc0551
|
||||
Author: Aaron Zang <Aaron.Zang@Sun.COM>
|
||||
Date: Thu Aug 13 20:39:59 2009 -0700
|
||||
|
||||
sun_kbd: Use HID ioctl variants to get/set direct mode on usbhid devices
|
||||
|
||||
When opening a usb hid* device node directly (instead of via the
|
||||
/dev/kbd virtual/coalescing device node), use the HIDIOCKMGDIRECT
|
||||
and HIDIOCKMSDIRECT ioctls instead of the KIO* versions. When
|
||||
closing the device, always reset back to direct mode, no matter
|
||||
what state we found it in.
|
||||
|
||||
Signed-off-by: Aaron Zang <Aaron.Zang@Sun.COM>
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
|
||||
commit 8e42e8f0034d89ef4b6cee44148961f808ba0602
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Wed Aug 5 15:03:43 2009 -0700
|
||||
|
||||
sun_kbd: re-open keyboard if needed in KbdOn
|
||||
|
||||
If we closed keyboard in KbdOff, we need to reopen it in KbdOn, or
|
||||
will not be able to type after VT switch.
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
|
||||
commit bba90b4e87be3ae5a13d69f6d9c60aa97761c8d5
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Tue Aug 4 21:31:23 2009 -0700
|
||||
|
||||
Sun bug 6852921: Recycling Xorg runs out of file descriptors in kbd driver
|
||||
|
||||
http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6852921
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
|
||||
commit 352aa83c416a78e59be4dfa7d8442e5eec50130a
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Tue Aug 4 21:04:24 2009 -0700
|
||||
|
||||
Stop checking for #ifdef __SOL8__ - assume Solaris is at least Solaris 8
|
||||
|
||||
If you want to run a pre-1999 kernel, you'll need a pre-2009 X server
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
|
||||
commit fe8d1f70fc7edce4f030766159aebae8f8a89ffc
|
||||
Author: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Sat May 30 21:12:34 2009 +1000
|
||||
|
||||
Remove ModuleInfoRec.
|
||||
|
||||
This struct was removed with 2107becb0ce2ffda001be65728c53563496d8d50 from
|
||||
the server.
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
commit 29f075db9f86aa7e5e01688a5fd5e0081210e16b
|
||||
Author: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Mon May 11 15:30:23 2009 +1000
|
||||
|
||||
Return BadValue if the server failed to init the keyboard. (#21278)
|
||||
|
||||
If keyboard init failed, we don't have a useful keymap and thus can't
|
||||
continue.
|
||||
This is essentially 0e15697b53c9448ce9911aa6499b2ea0bda92af6 from
|
||||
xserver ported over here.
|
||||
|
||||
X.Org Bug 21278 <http://bugs.freedesktop.org/show_bug.cgi?id=21278>
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
commit 7a4d6f396597c4b96e1402dadfcd2c0e5b7b0579
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Fri May 1 14:47:59 2009 -0700
|
||||
|
||||
Override HKTG & BSlash2 keycodes on Solaris
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
|
||||
commit 2bc18590e6b7b403dcec22a09820010748c48972
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Thu Apr 30 16:26:23 2009 -0700
|
||||
|
||||
Solaris keyboard fixes for HAL hotplugging support
|
||||
|
||||
- Handle hot-unplug by checking for ENODEV on read and removing device
|
||||
- Make sure to re-push streams module on resume
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
|
||||
commit 810fe3a4afd7e77a645c312f9475e75c2f7e925c
|
||||
Author: Alan Curry <pacman@kosh.dhis.org>
|
||||
Date: Sat Feb 28 00:53:10 2009 -0500
|
||||
|
||||
KDGETLED needs a char, not an int.
|
||||
|
||||
KDGETLED actually only stores a single byte at the address indicated by
|
||||
&real_leds, which on big-endian systems means the kernel's led state is put
|
||||
into the most-significant byte of real_leds. The LED_CAP LED_NUM LED_SCR
|
||||
macros then extract some bits from the least-significant byte, which still
|
||||
contains stack garbage since real_leds hasn't been initialized.
|
||||
|
||||
Don't believe what the console_ioctl(4) man page says. It's wrong. Go read
|
||||
drivers/char/vt_ioctl.c in the kernel source.
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
commit 0fafdc024624d27ddffdcc4ff0047dec59ef33e2
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Thu Apr 2 16:53:53 2009 -0700
|
||||
|
||||
Remove Initialised static variable (not used since xf86AddModuleInfo removal)
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
|
||||
commit 7b64df0a988674454522e353ea2b56485474af6e
|
||||
Author: David Miller <davem@davemloft.net>
|
||||
Date: Tue Feb 24 16:50:22 2009 -0800
|
||||
|
||||
Fix xf86-input-keyboard build on Linux/sparc
|
||||
|
||||
lnx_kbd.c: Fix Sparc build.
|
||||
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
commit 62e663e7b107207b474713f22b6fec72f811dd86
|
||||
Author: Daniel Stone <daniel@fooishbar.org>
|
||||
Date: Tue Feb 10 17:24:21 2009 +1000
|
||||
|
||||
Switch to new XKB API
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
commit ae630aef17185dd8d2c23d0eb1b3287fa6e26268
|
||||
Author: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Wed Feb 11 09:09:59 2009 +1000
|
||||
|
||||
Really remove autorepeat.
|
||||
|
||||
This strips all autorepeat from the keyboard driver. If you need autorepeat,
|
||||
use XKB.
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
commit 74ffb8e1897e7dd73f1adf3a2cba6b4214cfc77a
|
||||
Author: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Wed Feb 11 09:04:53 2009 +1000
|
||||
|
||||
Don't set xkb repeat rate from the driver.
|
||||
|
||||
commit 39b34a293a1502be2529b83575d03a46c5b0f1b9
|
||||
Author: Daniel Stone <daniel@fooishbar.org>
|
||||
Date: Tue Feb 10 17:28:06 2009 +1000
|
||||
|
||||
No autorepeat handling in the driver.
|
||||
|
||||
It's bad enough in the server, let's not cook up a driver-specific
|
||||
implementation on top of it.
|
||||
|
||||
Extracted into separate commits by Peter Hutterer.
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
commit 9234a0a91ef0c848dead86df831124429c7f528a
|
||||
Author: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Tue Feb 10 17:01:37 2009 +1000
|
||||
|
||||
unifdef XKB and remove all "noXkb" handling.
|
||||
|
||||
XKB is here to stay. Live with it.
|
||||
|
||||
commit 9f95e38282164a617b68e4dedf7b72ebc0fedc3e
|
||||
Author: Daniel Stone <daniel@fooishbar.org>
|
||||
Date: Tue Feb 10 16:47:52 2009 +1000
|
||||
|
||||
nec/jp layout is just "jp" these days.
|
||||
|
||||
Extracted into separate commits by Peter Hutterer.
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
commit db59771946ac53f78fecf2d75eb165275a45f6aa
|
||||
Author: Daniel Stone <daniel@fooishbar.org>
|
||||
Date: Tue Feb 10 16:43:46 2009 +1000
|
||||
|
||||
No more special sun keyboards anymore.
|
||||
|
||||
Extracted into separate commits by Peter Hutterer.
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
commit ea428e52f599a6f575bc012b552e14535009d219
|
||||
Author: Daniel Stone <daniel@fooishbar.org>
|
||||
Date: Tue Feb 10 16:41:06 2009 +1000
|
||||
|
||||
Remove special support for Panix106
|
||||
|
||||
Let's pretend that if google doesn't know it, it doesn't exist.
|
||||
|
||||
Extracted into separate commits by Peter Hutterer.
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
commit 425c0494e7ff4b7ed0ee7aec3b07a3bce812b9b7
|
||||
Author: Daniel Stone <daniel@fooishbar.org>
|
||||
Date: Tue Feb 10 17:24:32 2009 +1000
|
||||
|
||||
Change KbdCtrlProc to a void
|
||||
|
||||
6 years to follow an API surely is within reasonably response time, right?
|
||||
|
||||
Extracted into separate commits by Peter Hutterer.
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
commit 218ec4b53cc3e557317e188caf8762eac5e06e71
|
||||
Author: Daniel Stone <daniel@fooishbar.org>
|
||||
Date: Tue Feb 10 16:39:51 2009 +1000
|
||||
|
||||
Remove leftover ifdef XINPUT.
|
||||
|
||||
XINPUT has been mandatory for a while now.
|
||||
|
||||
Extracted into separate commits by Peter Hutterer.
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
commit d12d2d2c789e8439ae6f2e63526c49c76c385c8e
|
||||
Author: Daniel Stone <daniel@fooishbar.org>
|
||||
Date: Tue Feb 10 16:38:56 2009 +1000
|
||||
|
||||
Remove SpecialKey handling.
|
||||
|
||||
Are your keys really that special? Really?
|
||||
No. They aren't. Take it from me.
|
||||
|
||||
Extracted into separate commits by Peter Hutterer.
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
commit 862314c8dfced80631b2c7a6e00799fd2956b6dc
|
||||
Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
|
||||
Date: Wed Feb 4 18:59:23 2009 -0200
|
||||
|
||||
Janitor: compiler warnings, .gitignore.
|
||||
|
||||
Correct common sparse warning about integer used where a pointer
|
||||
is expected. Remaining warnings are about the symbols that the
|
||||
X Server loader should "dlsym()" to load the module, and are
|
||||
extern/exported, but have no declaration anywhere.
|
||||
|
||||
Use only one .gitignore file in the toplevel directory.
|
||||
|
||||
Signed-off-by: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
commit 69d38cbda4ecff87dc63dd26cfae4262c1e6161c
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Fri Jan 30 20:23:32 2009 -0800
|
||||
|
||||
Add README with pointers to mailing list, bugzilla & git repos
|
||||
|
||||
commit 14267d89087c21071fde1960f77cceee49a6e551
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Tue Jan 20 16:54:21 2009 -0800
|
||||
|
||||
Use XKB_DFLT_RULES from xorg-server.h for default xkb rules filename
|
||||
|
||||
commit f9857c498803ce8e5902df7319d2928b0db8cd49
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Fri Jan 9 14:50:56 2009 -0800
|
||||
|
||||
Add note on hal-based configuration to man page
|
||||
|
||||
commit ba47bfd9c4ebab0c71f7918127506817378d9eef
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Wed Jan 7 10:02:23 2009 -0800
|
||||
|
||||
Move ifdefs to clear "warning: statement has no consequent: if"
|
||||
|
||||
commit fb9c07cbf0339922816007f2d35c501266a439b1
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Wed Jan 7 09:58:36 2009 -0800
|
||||
|
||||
Make LED masks more consistently unsigned long to clear compiler/lint warnings
|
||||
|
||||
commit 2fde7c02565384ce774c20face9755359c5d5946
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Wed Jan 7 09:56:12 2009 -0800
|
||||
|
||||
Remove unused variables from Solaris code
|
||||
|
||||
commit 708ecbf8557d9e676e3bb07c1f83170f6d9f7cd7
|
||||
Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
|
||||
Date: Wed Jan 7 15:09:01 2009 -0200
|
||||
|
@ -55,7 +55,7 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
||||
$(top_srcdir)/configure COPYING ChangeLog config.guess \
|
||||
config.sub depcomp install-sh ltmain.sh missing
|
||||
@ -90,12 +90,14 @@ am__remove_distdir = \
|
||||
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
|
||||
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@
|
||||
@ -136,6 +138,7 @@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
|
||||
GREP = @GREP@
|
||||
HURD_FALSE = @HURD_FALSE@
|
||||
HURD_TRUE = @HURD_TRUE@
|
||||
INSTALL_CMD = @INSTALL_CMD@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
@ -198,7 +201,6 @@ build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
distcleancheck_listfiles = @distcleancheck_listfiles@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
706
driver/xf86-input-keyboard/aclocal.m4
vendored
706
driver/xf86-input-keyboard/aclocal.m4
vendored
@ -7631,34 +7631,28 @@ AC_SUBST([am__tar])
|
||||
AC_SUBST([am__untar])
|
||||
]) # _AM_PROG_TAR
|
||||
|
||||
dnl xorg-macros.m4. Generated from xorg-macros.m4.in:xorgversion.m4 by configure.
|
||||
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
|
||||
dnl
|
||||
dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved.
|
||||
dnl
|
||||
dnl Permission is hereby granted, free of charge, to any person obtaining a
|
||||
dnl copy of this software and associated documentation files (the
|
||||
dnl "Software"), to deal in the Software without restriction, including
|
||||
dnl without limitation the rights to use, copy, modify, merge, publish,
|
||||
dnl distribute, and/or sell copies of the Software, and to permit persons
|
||||
dnl to whom the Software is furnished to do so, provided that the above
|
||||
dnl copyright notice(s) and this permission notice appear in all copies of
|
||||
dnl the Software and that both the above copyright notice(s) and this
|
||||
dnl permission notice appear in supporting documentation.
|
||||
dnl copy of this software and associated documentation files (the "Software"),
|
||||
dnl to deal in the Software without restriction, including without limitation
|
||||
dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
dnl and/or sell copies of the Software, and to permit persons to whom the
|
||||
dnl Software is furnished to do so, subject to the following conditions:
|
||||
dnl
|
||||
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
|
||||
dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
|
||||
dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
||||
dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||
dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
dnl The above copyright notice and this permission notice (including the next
|
||||
dnl paragraph) shall be included in all copies or substantial portions of the
|
||||
dnl Software.
|
||||
dnl
|
||||
dnl Except as contained in this notice, the name of a copyright holder
|
||||
dnl shall not be used in advertising or otherwise to promote the sale, use
|
||||
dnl or other dealings in this Software without prior written authorization
|
||||
dnl of the copyright holder.
|
||||
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
dnl DEALINGS IN THE SOFTWARE.
|
||||
|
||||
# XORG_MACROS_VERSION(required-version)
|
||||
# -------------------------------------
|
||||
@ -7668,27 +7662,24 @@ dnl of the copyright holder.
|
||||
# your configure.ac with the minimum required version, such as:
|
||||
# XORG_MACROS_VERSION(1.1)
|
||||
#
|
||||
# To force at least a version with this macro defined, also add:
|
||||
# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
|
||||
# To ensure that this macro is defined, also add:
|
||||
# m4_ifndef([XORG_MACROS_VERSION],
|
||||
# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
|
||||
#
|
||||
#
|
||||
# See the "minimum version" comment for each macro you use to see what
|
||||
# version you require.
|
||||
AC_DEFUN([XORG_MACROS_VERSION],[
|
||||
[XORG_MACROS_needed_version=$1
|
||||
XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
|
||||
XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
|
||||
AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
|
||||
[XORG_MACROS_version=1.2.1
|
||||
XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
|
||||
XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
|
||||
if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
|
||||
AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
|
||||
fi
|
||||
if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
|
||||
AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer])
|
||||
fi
|
||||
AC_MSG_RESULT([yes, $XORG_MACROS_version])
|
||||
m4_defun([XORG_MACROS_VERSION],[
|
||||
m4_define([vers_have], [1.7.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,,
|
||||
[m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
|
||||
m4_if(m4_version_compare(vers_have, [$1]), -1,
|
||||
[m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
|
||||
m4_undefine([vers_have])
|
||||
m4_undefine([maj_have])
|
||||
m4_undefine([maj_needed])
|
||||
]) # XORG_MACROS_VERSION
|
||||
|
||||
# XORG_PROG_RAWCPP()
|
||||
@ -7820,6 +7811,31 @@ AC_SUBST([DRIVER_MAN_DIR])
|
||||
AC_SUBST([ADMIN_MAN_DIR])
|
||||
]) # XORG_MANPAGE_SECTIONS
|
||||
|
||||
# XORG_CHECK_SGML_DOCTOOLS
|
||||
# ------------------------
|
||||
# Minimum version: 1.7.0
|
||||
#
|
||||
# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
|
||||
# provided by xorg-sgml-doctools, if installed.
|
||||
AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
|
||||
AC_MSG_CHECKING([for X.Org SGML entities])
|
||||
XORG_SGML_PATH=
|
||||
PKG_CHECK_EXISTS([xorg-sgml-doctools],
|
||||
[XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
|
||||
[if test x"$cross_compiling" != x"yes" ; then
|
||||
AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
|
||||
[XORG_SGML_PATH=$prefix/share/sgml])
|
||||
fi])
|
||||
|
||||
if test "x$XORG_SGML_PATH" != "x" ; then
|
||||
AC_MSG_RESULT([$XORG_SGML_PATH])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_SUBST(XORG_SGML_PATH)
|
||||
]) # XORG_CHECK_SGML_DOCTOOLS
|
||||
|
||||
# XORG_CHECK_LINUXDOC
|
||||
# -------------------
|
||||
# Minimum version: 1.0.0
|
||||
@ -7829,23 +7845,14 @@ AC_SUBST([ADMIN_MAN_DIR])
|
||||
# Whether or not the necessary tools and files are found can be checked
|
||||
# with the AM_CONDITIONAL "BUILD_LINUXDOC"
|
||||
AC_DEFUN([XORG_CHECK_LINUXDOC],[
|
||||
if test x$XORG_SGML_PATH = x ; then
|
||||
XORG_SGML_PATH=$prefix/share/sgml
|
||||
fi
|
||||
HAVE_DEFS_ENT=
|
||||
|
||||
if test x"$cross_compiling" = x"yes" ; then
|
||||
HAVE_DEFS_ENT=no
|
||||
else
|
||||
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
|
||||
fi
|
||||
AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
|
||||
|
||||
AC_PATH_PROG(LINUXDOC, linuxdoc)
|
||||
AC_PATH_PROG(PS2PDF, ps2pdf)
|
||||
|
||||
AC_MSG_CHECKING([Whether to build documentation])
|
||||
AC_MSG_CHECKING([whether to build documentation])
|
||||
|
||||
if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
|
||||
if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
|
||||
BUILDDOC=yes
|
||||
else
|
||||
BUILDDOC=no
|
||||
@ -7855,7 +7862,7 @@ AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
|
||||
|
||||
AC_MSG_RESULT([$BUILDDOC])
|
||||
|
||||
AC_MSG_CHECKING([Whether to build pdf documentation])
|
||||
AC_MSG_CHECKING([whether to build pdf documentation])
|
||||
|
||||
if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
|
||||
BUILDPDFDOC=yes
|
||||
@ -7887,48 +7894,44 @@ AC_SUBST(MAKE_HTML)
|
||||
# indicates whether the necessary tools and files are found and, if set,
|
||||
# $(MAKE_XXX) blah.sgml will produce blah.xxx.
|
||||
AC_DEFUN([XORG_CHECK_DOCBOOK],[
|
||||
if test x$XORG_SGML_PATH = x ; then
|
||||
XORG_SGML_PATH=$prefix/share/sgml
|
||||
fi
|
||||
HAVE_DEFS_ENT=
|
||||
AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
|
||||
|
||||
BUILDTXTDOC=no
|
||||
BUILDPDFDOC=no
|
||||
BUILDPSDOC=no
|
||||
BUILDHTMLDOC=no
|
||||
|
||||
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
|
||||
|
||||
AC_PATH_PROG(DOCBOOKPS, docbook2ps)
|
||||
AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
|
||||
AC_PATH_PROG(DOCBOOKHTML, docbook2html)
|
||||
AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
|
||||
|
||||
AC_MSG_CHECKING([Whether to build text documentation])
|
||||
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
|
||||
AC_MSG_CHECKING([whether to build text documentation])
|
||||
if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
|
||||
test x$BUILD_TXTDOC != xno; then
|
||||
BUILDTXTDOC=yes
|
||||
fi
|
||||
AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
|
||||
AC_MSG_RESULT([$BUILDTXTDOC])
|
||||
|
||||
AC_MSG_CHECKING([Whether to build PDF documentation])
|
||||
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
|
||||
AC_MSG_CHECKING([whether to build PDF documentation])
|
||||
if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
|
||||
test x$BUILD_PDFDOC != xno; then
|
||||
BUILDPDFDOC=yes
|
||||
fi
|
||||
AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
|
||||
AC_MSG_RESULT([$BUILDPDFDOC])
|
||||
|
||||
AC_MSG_CHECKING([Whether to build PostScript documentation])
|
||||
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
|
||||
AC_MSG_CHECKING([whether to build PostScript documentation])
|
||||
if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
|
||||
test x$BUILD_PSDOC != xno; then
|
||||
BUILDPSDOC=yes
|
||||
fi
|
||||
AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
|
||||
AC_MSG_RESULT([$BUILDPSDOC])
|
||||
|
||||
AC_MSG_CHECKING([Whether to build HTML documentation])
|
||||
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
|
||||
AC_MSG_CHECKING([whether to build HTML documentation])
|
||||
if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
|
||||
test x$BUILD_HTMLDOC != xno; then
|
||||
BUILDHTMLDOC=yes
|
||||
fi
|
||||
@ -7946,6 +7949,490 @@ AC_SUBST(MAKE_PDF)
|
||||
AC_SUBST(MAKE_HTML)
|
||||
]) # XORG_CHECK_DOCBOOK
|
||||
|
||||
# XORG_WITH_XMLTO([MIN-VERSION])
|
||||
# ----------------
|
||||
# Minimum version: 1.5.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
|
||||
# presence of the tool and obtain it's path in separate variables. Coupled with
|
||||
# the --with-xmlto option, it allows maximum flexibilty in making decisions
|
||||
# as whether or not to use the xmlto package.
|
||||
#
|
||||
# Interface to module:
|
||||
# HAVE_XMLTO: used in makefiles to conditionally generate documentation
|
||||
# XMLTO: returns the path of the xmlto program found
|
||||
# returns the path set by the user in the environment
|
||||
# --with-xmlto: 'yes' user instructs the module to use xmlto
|
||||
# 'no' user instructs the module not to use xmlto
|
||||
#
|
||||
# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
|
||||
#
|
||||
AC_DEFUN([XORG_WITH_XMLTO],[
|
||||
AC_ARG_VAR([XMLTO], [Path to xmlto command])
|
||||
AC_ARG_WITH(xmlto,
|
||||
AS_HELP_STRING([--with-xmlto],
|
||||
[Use xmlto to regenerate documentation (default: yes, if installed)]),
|
||||
[use_xmlto=$withval], [use_xmlto=auto])
|
||||
|
||||
if test "x$use_xmlto" = x"auto"; then
|
||||
AC_PATH_PROG([XMLTO], [xmlto])
|
||||
if test "x$XMLTO" = "x"; then
|
||||
AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
|
||||
have_xmlto=no
|
||||
else
|
||||
have_xmlto=yes
|
||||
fi
|
||||
elif test "x$use_xmlto" = x"yes" ; then
|
||||
AC_PATH_PROG([XMLTO], [xmlto])
|
||||
if test "x$XMLTO" = "x"; then
|
||||
AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
|
||||
fi
|
||||
have_xmlto=yes
|
||||
elif test "x$use_xmlto" = x"no" ; then
|
||||
if test "x$XMLTO" != "x"; then
|
||||
AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
|
||||
fi
|
||||
have_xmlto=no
|
||||
else
|
||||
AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
|
||||
fi
|
||||
m4_ifval([$1],
|
||||
[if test "$have_xmlto" = yes; then
|
||||
# scrape the xmlto version
|
||||
AC_MSG_CHECKING([the xmlto version])
|
||||
xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
|
||||
AC_MSG_RESULT([$xmlto_version])
|
||||
AS_VERSION_COMPARE([$xmlto_version], [$1],
|
||||
[if test "x$use_xmlto" = xauto; then
|
||||
AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
|
||||
have_xmlto=no
|
||||
else
|
||||
AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
|
||||
fi])
|
||||
fi])
|
||||
AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
|
||||
]) # XORG_WITH_XMLTO
|
||||
|
||||
# XORG_WITH_ASCIIDOC([MIN-VERSION])
|
||||
# ----------------
|
||||
# Minimum version: 1.5.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
|
||||
# presence of the tool and obtain it's path in separate variables. Coupled with
|
||||
# the --with-asciidoc option, it allows maximum flexibilty in making decisions
|
||||
# as whether or not to use the asciidoc package.
|
||||
#
|
||||
# Interface to module:
|
||||
# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
|
||||
# ASCIIDOC: returns the path of the asciidoc program found
|
||||
# returns the path set by the user in the environment
|
||||
# --with-asciidoc: 'yes' user instructs the module to use asciidoc
|
||||
# 'no' user instructs the module not to use asciidoc
|
||||
#
|
||||
# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
|
||||
#
|
||||
AC_DEFUN([XORG_WITH_ASCIIDOC],[
|
||||
AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
|
||||
AC_ARG_WITH(asciidoc,
|
||||
AS_HELP_STRING([--with-asciidoc],
|
||||
[Use asciidoc to regenerate documentation (default: yes, if installed)]),
|
||||
[use_asciidoc=$withval], [use_asciidoc=auto])
|
||||
|
||||
if test "x$use_asciidoc" = x"auto"; then
|
||||
AC_PATH_PROG([ASCIIDOC], [asciidoc])
|
||||
if test "x$ASCIIDOC" = "x"; then
|
||||
AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
|
||||
have_asciidoc=no
|
||||
else
|
||||
have_asciidoc=yes
|
||||
fi
|
||||
elif test "x$use_asciidoc" = x"yes" ; then
|
||||
AC_PATH_PROG([ASCIIDOC], [asciidoc])
|
||||
if test "x$ASCIIDOC" = "x"; then
|
||||
AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
|
||||
fi
|
||||
have_asciidoc=yes
|
||||
elif test "x$use_asciidoc" = x"no" ; then
|
||||
if test "x$ASCIIDOC" != "x"; then
|
||||
AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
|
||||
fi
|
||||
have_asciidoc=no
|
||||
else
|
||||
AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
|
||||
fi
|
||||
m4_ifval([$1],
|
||||
[if test "$have_asciidoc" = yes; then
|
||||
# scrape the asciidoc version
|
||||
AC_MSG_CHECKING([the asciidoc version])
|
||||
asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
|
||||
AC_MSG_RESULT([$asciidoc_version])
|
||||
AS_VERSION_COMPARE([$asciidoc_version], [$1],
|
||||
[if test "x$use_asciidoc" = xauto; then
|
||||
AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
|
||||
have_asciidoc=no
|
||||
else
|
||||
AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
|
||||
fi])
|
||||
fi])
|
||||
AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
|
||||
]) # XORG_WITH_ASCIIDOC
|
||||
|
||||
# XORG_WITH_DOXYGEN([MIN-VERSION])
|
||||
# --------------------------------
|
||||
# Minimum version: 1.5.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
|
||||
# presence of the tool and obtain it's path in separate variables. Coupled with
|
||||
# the --with-doxygen option, it allows maximum flexibilty in making decisions
|
||||
# as whether or not to use the doxygen package.
|
||||
#
|
||||
# Interface to module:
|
||||
# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
|
||||
# DOXYGEN: returns the path of the doxygen program found
|
||||
# returns the path set by the user in the environment
|
||||
# --with-doxygen: 'yes' user instructs the module to use doxygen
|
||||
# 'no' user instructs the module not to use doxygen
|
||||
#
|
||||
# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
|
||||
#
|
||||
AC_DEFUN([XORG_WITH_DOXYGEN],[
|
||||
AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
|
||||
AC_ARG_WITH(doxygen,
|
||||
AS_HELP_STRING([--with-doxygen],
|
||||
[Use doxygen to regenerate documentation (default: yes, if installed)]),
|
||||
[use_doxygen=$withval], [use_doxygen=auto])
|
||||
|
||||
if test "x$use_doxygen" = x"auto"; then
|
||||
AC_PATH_PROG([DOXYGEN], [doxygen])
|
||||
if test "x$DOXYGEN" = "x"; then
|
||||
AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
|
||||
have_doxygen=no
|
||||
else
|
||||
have_doxygen=yes
|
||||
fi
|
||||
elif test "x$use_doxygen" = x"yes" ; then
|
||||
AC_PATH_PROG([DOXYGEN], [doxygen])
|
||||
if test "x$DOXYGEN" = "x"; then
|
||||
AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
|
||||
fi
|
||||
have_doxygen=yes
|
||||
elif test "x$use_doxygen" = x"no" ; then
|
||||
if test "x$DOXYGEN" != "x"; then
|
||||
AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
|
||||
fi
|
||||
have_doxygen=no
|
||||
else
|
||||
AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
|
||||
fi
|
||||
m4_ifval([$1],
|
||||
[if test "$have_doxygen" = yes; then
|
||||
# scrape the doxygen version
|
||||
AC_MSG_CHECKING([the doxygen version])
|
||||
doxygen_version=`$DOXYGEN --version 2>/dev/null`
|
||||
AC_MSG_RESULT([$doxygen_version])
|
||||
AS_VERSION_COMPARE([$doxygen_version], [$1],
|
||||
[if test "x$use_doxygen" = xauto; then
|
||||
AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
|
||||
have_doxygen=no
|
||||
else
|
||||
AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
|
||||
fi])
|
||||
fi])
|
||||
AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
|
||||
]) # XORG_WITH_DOXYGEN
|
||||
|
||||
# XORG_WITH_GROFF
|
||||
# ----------------
|
||||
# Minimum version: 1.6.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
|
||||
# presence of the tool and obtain it's path in separate variables. Coupled with
|
||||
# the --with-groff option, it allows maximum flexibilty in making decisions
|
||||
# as whether or not to use the groff package.
|
||||
#
|
||||
# Interface to module:
|
||||
# HAVE_GROFF: used in makefiles to conditionally generate documentation
|
||||
# HAVE_GROFF_MM: the memorandum macros (-mm) package
|
||||
# HAVE_GROFF_MS: the -ms macros package
|
||||
# GROFF: returns the path of the groff program found
|
||||
# returns the path set by the user in the environment
|
||||
# --with-groff: 'yes' user instructs the module to use groff
|
||||
# 'no' user instructs the module not to use groff
|
||||
#
|
||||
# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
|
||||
#
|
||||
# OS and distros often splits groff in a basic and full package, the former
|
||||
# having the groff program and the later having devices, fonts and macros
|
||||
# Checking for the groff executable is not enough.
|
||||
#
|
||||
# If macros are missing, we cannot assume that groff is useless, so we don't
|
||||
# unset HAVE_GROFF or GROFF env variables.
|
||||
# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
|
||||
#
|
||||
AC_DEFUN([XORG_WITH_GROFF],[
|
||||
AC_ARG_VAR([GROFF], [Path to groff command])
|
||||
AC_ARG_WITH(groff,
|
||||
AS_HELP_STRING([--with-groff],
|
||||
[Use groff to regenerate documentation (default: yes, if installed)]),
|
||||
[use_groff=$withval], [use_groff=auto])
|
||||
|
||||
if test "x$use_groff" = x"auto"; then
|
||||
AC_PATH_PROG([GROFF], [groff])
|
||||
if test "x$GROFF" = "x"; then
|
||||
AC_MSG_WARN([groff not found - documentation targets will be skipped])
|
||||
have_groff=no
|
||||
else
|
||||
have_groff=yes
|
||||
fi
|
||||
elif test "x$use_groff" = x"yes" ; then
|
||||
AC_PATH_PROG([GROFF], [groff])
|
||||
if test "x$GROFF" = "x"; then
|
||||
AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
|
||||
fi
|
||||
have_groff=yes
|
||||
elif test "x$use_groff" = x"no" ; then
|
||||
if test "x$GROFF" != "x"; then
|
||||
AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
|
||||
fi
|
||||
have_groff=no
|
||||
else
|
||||
AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
|
||||
fi
|
||||
# We have groff, test for the presence of the macro packages
|
||||
if test "x$have_groff" = x"yes"; then
|
||||
AC_MSG_CHECKING([for ${GROFF} -ms macros])
|
||||
if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
|
||||
groff_ms_works=yes
|
||||
else
|
||||
groff_ms_works=no
|
||||
fi
|
||||
AC_MSG_RESULT([$groff_ms_works])
|
||||
AC_MSG_CHECKING([for ${GROFF} -mm macros])
|
||||
if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
|
||||
groff_mm_works=yes
|
||||
else
|
||||
groff_mm_works=no
|
||||
fi
|
||||
AC_MSG_RESULT([$groff_mm_works])
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
|
||||
AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
|
||||
AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
|
||||
]) # XORG_WITH_GROFF
|
||||
|
||||
# XORG_WITH_FOP
|
||||
# ----------------
|
||||
# Minimum version: 1.6.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
|
||||
# presence of the tool and obtain it's path in separate variables. Coupled with
|
||||
# the --with-fop option, it allows maximum flexibilty in making decisions
|
||||
# as whether or not to use the fop package.
|
||||
#
|
||||
# Interface to module:
|
||||
# HAVE_FOP: used in makefiles to conditionally generate documentation
|
||||
# FOP: returns the path of the fop program found
|
||||
# returns the path set by the user in the environment
|
||||
# --with-fop: 'yes' user instructs the module to use fop
|
||||
# 'no' user instructs the module not to use fop
|
||||
#
|
||||
# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
|
||||
#
|
||||
AC_DEFUN([XORG_WITH_FOP],[
|
||||
AC_ARG_VAR([FOP], [Path to fop command])
|
||||
AC_ARG_WITH(fop,
|
||||
AS_HELP_STRING([--with-fop],
|
||||
[Use fop to regenerate documentation (default: yes, if installed)]),
|
||||
[use_fop=$withval], [use_fop=auto])
|
||||
|
||||
if test "x$use_fop" = x"auto"; then
|
||||
AC_PATH_PROG([FOP], [fop])
|
||||
if test "x$FOP" = "x"; then
|
||||
AC_MSG_WARN([fop not found - documentation targets will be skipped])
|
||||
have_fop=no
|
||||
else
|
||||
have_fop=yes
|
||||
fi
|
||||
elif test "x$use_fop" = x"yes" ; then
|
||||
AC_PATH_PROG([FOP], [fop])
|
||||
if test "x$FOP" = "x"; then
|
||||
AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
|
||||
fi
|
||||
have_fop=yes
|
||||
elif test "x$use_fop" = x"no" ; then
|
||||
if test "x$FOP" != "x"; then
|
||||
AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
|
||||
fi
|
||||
have_fop=no
|
||||
else
|
||||
AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
|
||||
]) # XORG_WITH_FOP
|
||||
|
||||
# XORG_WITH_PS2PDF
|
||||
# ----------------
|
||||
# Minimum version: 1.6.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
|
||||
# presence of the tool and obtain it's path in separate variables. Coupled with
|
||||
# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
|
||||
# as whether or not to use the ps2pdf package.
|
||||
#
|
||||
# Interface to module:
|
||||
# HAVE_PS2PDF: used in makefiles to conditionally generate documentation
|
||||
# PS2PDF: returns the path of the ps2pdf program found
|
||||
# returns the path set by the user in the environment
|
||||
# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
|
||||
# 'no' user instructs the module not to use ps2pdf
|
||||
#
|
||||
# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
|
||||
#
|
||||
AC_DEFUN([XORG_WITH_PS2PDF],[
|
||||
AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
|
||||
AC_ARG_WITH(ps2pdf,
|
||||
AS_HELP_STRING([--with-ps2pdf],
|
||||
[Use ps2pdf to regenerate documentation (default: yes, if installed)]),
|
||||
[use_ps2pdf=$withval], [use_ps2pdf=auto])
|
||||
|
||||
if test "x$use_ps2pdf" = x"auto"; then
|
||||
AC_PATH_PROG([PS2PDF], [ps2pdf])
|
||||
if test "x$PS2PDF" = "x"; then
|
||||
AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
|
||||
have_ps2pdf=no
|
||||
else
|
||||
have_ps2pdf=yes
|
||||
fi
|
||||
elif test "x$use_ps2pdf" = x"yes" ; then
|
||||
AC_PATH_PROG([PS2PDF], [ps2pdf])
|
||||
if test "x$PS2PDF" = "x"; then
|
||||
AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
|
||||
fi
|
||||
have_ps2pdf=yes
|
||||
elif test "x$use_ps2pdf" = x"no" ; then
|
||||
if test "x$PS2PDF" != "x"; then
|
||||
AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
|
||||
fi
|
||||
have_ps2pdf=no
|
||||
else
|
||||
AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
|
||||
]) # XORG_WITH_PS2PDF
|
||||
|
||||
# XORG_ENABLE_DOCS (enable_docs=yes)
|
||||
# ----------------
|
||||
# Minimum version: 1.6.0
|
||||
#
|
||||
# Documentation tools are not always available on all platforms and sometimes
|
||||
# not at the appropriate level. This macro enables a builder to skip all
|
||||
# documentation targets except traditional man pages.
|
||||
# Combined with the specific tool checking macros XORG_WITH_*, it provides
|
||||
# maximum flexibilty in controlling documentation building.
|
||||
# Refer to:
|
||||
# XORG_WITH_XMLTO --with-xmlto
|
||||
# XORG_WITH_ASCIIDOC --with-asciidoc
|
||||
# XORG_WITH_DOXYGEN --with-doxygen
|
||||
# XORG_WITH_FOP --with-fop
|
||||
# XORG_WITH_GROFF --with-groff
|
||||
# XORG_WITH_PS2PDF --with-ps2pdf
|
||||
#
|
||||
# Interface to module:
|
||||
# ENABLE_DOCS: used in makefiles to conditionally generate documentation
|
||||
# --enable-docs: 'yes' user instructs the module to generate docs
|
||||
# 'no' user instructs the module not to generate docs
|
||||
# parm1: specify the default value, yes or no.
|
||||
#
|
||||
AC_DEFUN([XORG_ENABLE_DOCS],[
|
||||
default=$1
|
||||
if test "x$default" = x ; then
|
||||
default="yes"
|
||||
fi
|
||||
AC_ARG_ENABLE(docs,
|
||||
AS_HELP_STRING([--enable-docs],
|
||||
[Enable building the documentation (default: yes)]),
|
||||
[build_docs=$enableval], [build_docs=$default])
|
||||
AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
|
||||
AC_MSG_CHECKING([whether to build documentation])
|
||||
AC_MSG_RESULT([$build_docs])
|
||||
]) # XORG_ENABLE_DOCS
|
||||
|
||||
# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
|
||||
# ----------------
|
||||
# Minimum version: 1.6.0
|
||||
#
|
||||
# This macro enables a builder to skip all developer documentation.
|
||||
# Combined with the specific tool checking macros XORG_WITH_*, it provides
|
||||
# maximum flexibilty in controlling documentation building.
|
||||
# Refer to:
|
||||
# XORG_WITH_XMLTO --with-xmlto
|
||||
# XORG_WITH_ASCIIDOC --with-asciidoc
|
||||
# XORG_WITH_DOXYGEN --with-doxygen
|
||||
# XORG_WITH_FOP --with-fop
|
||||
# XORG_WITH_GROFF --with-groff
|
||||
# XORG_WITH_PS2PDF --with-ps2pdf
|
||||
#
|
||||
# Interface to module:
|
||||
# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs
|
||||
# --enable-devel-docs: 'yes' user instructs the module to generate developer docs
|
||||
# 'no' user instructs the module not to generate developer docs
|
||||
# parm1: specify the default value, yes or no.
|
||||
#
|
||||
AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
|
||||
devel_default=$1
|
||||
if test "x$devel_default" = x ; then
|
||||
devel_default="yes"
|
||||
fi
|
||||
AC_ARG_ENABLE(devel-docs,
|
||||
AS_HELP_STRING([--enable-devel-docs],
|
||||
[Enable building the developer documentation (default: yes)]),
|
||||
[build_devel_docs=$enableval], [build_devel_docs=$devel_default])
|
||||
AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
|
||||
AC_MSG_CHECKING([whether to build developer documentation])
|
||||
AC_MSG_RESULT([$build_devel_docs])
|
||||
]) # XORG_ENABLE_DEVEL_DOCS
|
||||
|
||||
# XORG_ENABLE_SPECS (enable_specs=yes)
|
||||
# ----------------
|
||||
# Minimum version: 1.6.0
|
||||
#
|
||||
# This macro enables a builder to skip all functional specification targets.
|
||||
# Combined with the specific tool checking macros XORG_WITH_*, it provides
|
||||
# maximum flexibilty in controlling documentation building.
|
||||
# Refer to:
|
||||
# XORG_WITH_XMLTO --with-xmlto
|
||||
# XORG_WITH_ASCIIDOC --with-asciidoc
|
||||
# XORG_WITH_DOXYGEN --with-doxygen
|
||||
# XORG_WITH_FOP --with-fop
|
||||
# XORG_WITH_GROFF --with-groff
|
||||
# XORG_WITH_PS2PDF --with-ps2pdf
|
||||
#
|
||||
# Interface to module:
|
||||
# ENABLE_SPECS: used in makefiles to conditionally generate specs
|
||||
# --enable-specs: 'yes' user instructs the module to generate specs
|
||||
# 'no' user instructs the module not to generate specs
|
||||
# parm1: specify the default value, yes or no.
|
||||
#
|
||||
AC_DEFUN([XORG_ENABLE_SPECS],[
|
||||
spec_default=$1
|
||||
if test "x$spec_default" = x ; then
|
||||
spec_default="yes"
|
||||
fi
|
||||
AC_ARG_ENABLE(specs,
|
||||
AS_HELP_STRING([--enable-specs],
|
||||
[Enable building the specs (default: yes)]),
|
||||
[build_specs=$enableval], [build_specs=$spec_default])
|
||||
AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
|
||||
AC_MSG_CHECKING([whether to build functional specifications])
|
||||
AC_MSG_RESULT([$build_specs])
|
||||
]) # XORG_ENABLE_SPECS
|
||||
|
||||
# XORG_CHECK_MALLOC_ZERO
|
||||
# ----------------------
|
||||
# Minimum version: 1.0.0
|
||||
@ -7955,7 +8442,7 @@ AC_SUBST(MAKE_HTML)
|
||||
# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
|
||||
AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
|
||||
AC_ARG_ENABLE(malloc0returnsnull,
|
||||
AC_HELP_STRING([--enable-malloc0returnsnull],
|
||||
AS_HELP_STRING([--enable-malloc0returnsnull],
|
||||
[malloc(0) returns NULL (default: auto)]),
|
||||
[MALLOC_ZERO_RETURNS_NULL=$enableval],
|
||||
[MALLOC_ZERO_RETURNS_NULL=auto])
|
||||
@ -7975,7 +8462,8 @@ main() {
|
||||
exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
|
||||
}],
|
||||
[MALLOC_ZERO_RETURNS_NULL=yes],
|
||||
[MALLOC_ZERO_RETURNS_NULL=no])
|
||||
[MALLOC_ZERO_RETURNS_NULL=no],
|
||||
[MALLOC_ZERO_RETURNS_NULL=yes])
|
||||
fi
|
||||
AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
|
||||
|
||||
@ -8007,7 +8495,7 @@ AC_SUBST([XTMALLOC_ZERO_CFLAGS])
|
||||
AC_DEFUN([XORG_WITH_LINT],[
|
||||
|
||||
# Allow checking code with lint, sparse, etc.
|
||||
AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
|
||||
AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
|
||||
[Use a lint-style source code checker (default: disabled)])],
|
||||
[use_lint=$withval], [use_lint=no])
|
||||
if test "x$use_lint" = "xyes" ; then
|
||||
@ -8048,7 +8536,7 @@ AM_CONDITIONAL(LINT, [test x$LINT != xno])
|
||||
AC_DEFUN([XORG_LINT_LIBRARY],[
|
||||
AC_REQUIRE([XORG_WITH_LINT])
|
||||
# Build lint "library" for more indepth checks of programs calling this library
|
||||
AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
|
||||
AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
|
||||
[Create lint library (default: disabled)])],
|
||||
[make_lint_lib=$enableval], [make_lint_lib=no])
|
||||
if test "x$make_lint_lib" != "xno" ; then
|
||||
@ -8077,10 +8565,10 @@ AC_REQUIRE([AC_PROG_CC])
|
||||
if test "x$GCC" = xyes ; then
|
||||
CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
|
||||
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
|
||||
-Wbad-function-cast"
|
||||
case `gcc -dumpversion` in
|
||||
-Wbad-function-cast -Wformat=2"
|
||||
case `$CC -dumpversion` in
|
||||
3.4.* | 4.*)
|
||||
CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement"
|
||||
CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
@ -8091,6 +8579,69 @@ else
|
||||
fi
|
||||
AC_SUBST(CWARNFLAGS)
|
||||
]) # XORG_CWARNFLAGS
|
||||
|
||||
# XORG_STRICT_OPTION
|
||||
# -----------------------
|
||||
# Minimum version: 1.3.0
|
||||
#
|
||||
# Add configure option to enable strict compilation
|
||||
AC_DEFUN([XORG_STRICT_OPTION], [
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_PROG_CC_C99])
|
||||
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
|
||||
fi
|
||||
CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
|
||||
AC_SUBST([CWARNFLAGS])
|
||||
]) # XORG_STRICT_OPTION
|
||||
|
||||
# XORG_DEFAULT_OPTIONS
|
||||
# --------------------
|
||||
# Minimum version: 1.3.0
|
||||
#
|
||||
# Defines default options for X.Org modules.
|
||||
#
|
||||
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
|
||||
XORG_CWARNFLAGS
|
||||
XORG_STRICT_OPTION
|
||||
XORG_RELEASE_VERSION
|
||||
XORG_CHANGELOG
|
||||
XORG_INSTALL
|
||||
XORG_MANPAGE_SECTIONS
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
|
||||
[AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
|
||||
]) # XORG_DEFAULT_OPTIONS
|
||||
|
||||
# XORG_INSTALL()
|
||||
# ----------------
|
||||
# Minimum version: 1.4.0
|
||||
#
|
||||
# Defines the variable INSTALL_CMD as the command to copy
|
||||
# INSTALL from $prefix/share/util-macros.
|
||||
#
|
||||
AC_DEFUN([XORG_INSTALL], [
|
||||
AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||
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)"
|
||||
AC_SUBST([INSTALL_CMD])
|
||||
]) # XORG_INSTALL
|
||||
dnl Copyright 2005 Red Hat, Inc
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this software and its
|
||||
@ -8125,7 +8676,7 @@ dnl
|
||||
|
||||
AC_DEFUN([XORG_RELEASE_VERSION],[
|
||||
AC_ARG_WITH(release-version,
|
||||
AC_HELP_STRING([--with-release-version=STRING],
|
||||
AS_HELP_STRING([--with-release-version=STRING],
|
||||
[Use release version string in package name]),
|
||||
[RELEASE_VERSION="$withval"],
|
||||
[RELEASE_VERSION=""])
|
||||
@ -8160,14 +8711,13 @@ AC_DEFUN([XORG_RELEASE_VERSION],[
|
||||
# Defines the variable CHANGELOG_CMD as the command to generate
|
||||
# ChangeLog from git.
|
||||
#
|
||||
# Arrange that distcleancheck ignores ChangeLog left over by distclean.
|
||||
#
|
||||
AC_DEFUN([XORG_CHANGELOG], [
|
||||
CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
|
||||
mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
|
||||
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_SUBST([CHANGELOG_CMD])
|
||||
AC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
|
||||
]) # XORG_CHANGELOG
|
||||
|
||||
dnl Copyright 2005 Red Hat, Inc
|
||||
|
705
driver/xf86-input-keyboard/configure
vendored
705
driver/xf86-input-keyboard/configure
vendored
@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.62 for xf86-input-keyboard 1.3.2.
|
||||
# Generated by GNU Autoconf 2.62 for xf86-input-keyboard 1.4.0.
|
||||
#
|
||||
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
|
||||
#
|
||||
@ -750,8 +750,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='xf86-input-keyboard'
|
||||
PACKAGE_TARNAME='xf86-input-keyboard'
|
||||
PACKAGE_VERSION='1.3.2'
|
||||
PACKAGE_STRING='xf86-input-keyboard 1.3.2'
|
||||
PACKAGE_VERSION='1.4.0'
|
||||
PACKAGE_STRING='xf86-input-keyboard 1.4.0'
|
||||
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
|
||||
|
||||
ac_unique_file="Makefile.am"
|
||||
@ -913,6 +913,8 @@ PKG_CONFIG
|
||||
XORG_CFLAGS
|
||||
XORG_LIBS
|
||||
CWARNFLAGS
|
||||
CHANGELOG_CMD
|
||||
INSTALL_CMD
|
||||
APP_MAN_SUFFIX
|
||||
LIB_MAN_SUFFIX
|
||||
FILE_MAN_SUFFIX
|
||||
@ -925,8 +927,7 @@ FILE_MAN_DIR
|
||||
MISC_MAN_DIR
|
||||
DRIVER_MAN_DIR
|
||||
ADMIN_MAN_DIR
|
||||
CHANGELOG_CMD
|
||||
distcleancheck_listfiles
|
||||
AM_DEFAULT_VERBOSITY
|
||||
LIBOBJS
|
||||
LTLIBOBJS'
|
||||
ac_subst_files=''
|
||||
@ -942,6 +943,7 @@ enable_libtool_lock
|
||||
with_pic
|
||||
with_tags
|
||||
with_xorg_module_dir
|
||||
enable_strict_compilation
|
||||
with_release_version
|
||||
'
|
||||
ac_precious_vars='build_alias
|
||||
@ -1514,7 +1516,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-keyboard 1.3.2 to adapt to many kinds of systems.
|
||||
\`configure' configures xf86-input-keyboard 1.4.0 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@ -1585,7 +1587,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of xf86-input-keyboard 1.3.2:";;
|
||||
short | recursive ) echo "Configuration of xf86-input-keyboard 1.4.0:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@ -1602,6 +1604,9 @@ Optional Features:
|
||||
--disable-dependency-tracking speeds up one-time build
|
||||
--enable-dependency-tracking do not reject slow dependency extractors
|
||||
--disable-libtool-lock avoid locking (might break parallel builds)
|
||||
--enable-strict-compilation
|
||||
Enable all warnings from compiler and make them
|
||||
errors (default: disabled)
|
||||
|
||||
Optional Packages:
|
||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||
@ -1700,7 +1705,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
xf86-input-keyboard configure 1.3.2
|
||||
xf86-input-keyboard configure 1.4.0
|
||||
generated by GNU Autoconf 2.62
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
|
||||
@ -1714,7 +1719,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-keyboard $as_me 1.3.2, which was
|
||||
It was created by xf86-input-keyboard $as_me 1.4.0, which was
|
||||
generated by GNU Autoconf 2.62. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@ -2081,30 +2086,17 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
|
||||
# Require xorg-macros version 1.2 or newer for XORG_CWARNFLAGS and
|
||||
# XORG_CHANGELOG macros
|
||||
# Require xorg-macros version 1.3 or newer for XORG_DEFAULT_OPTIONS
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
XORG_MACROS_needed_version=1.2.1
|
||||
XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
|
||||
XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`
|
||||
{ $as_echo "$as_me:$LINENO: checking if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}" >&5
|
||||
$as_echo_n "checking if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}... " >&6; }
|
||||
XORG_MACROS_version=1.2.1
|
||||
XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
|
||||
XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`
|
||||
if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
|
||||
{ { $as_echo "$as_me:$LINENO: error: configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x" >&5
|
||||
$as_echo "$as_me: error: configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
|
||||
{ { $as_echo "$as_me:$LINENO: error: configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer" >&5
|
||||
$as_echo "$as_me: error: configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
{ $as_echo "$as_me:$LINENO: result: yes, $XORG_MACROS_version" >&5
|
||||
$as_echo "yes, $XORG_MACROS_version" >&6; }
|
||||
|
||||
|
||||
|
||||
@ -2391,7 +2383,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='xf86-input-keyboard'
|
||||
VERSION='1.3.2'
|
||||
VERSION='1.4.0'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@ -4456,7 +4448,7 @@ ia64-*-hpux*)
|
||||
;;
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
echo '#line 4459 "configure"' > conftest.$ac_ext
|
||||
echo '#line 4451 "configure"' > conftest.$ac_ext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>&5
|
||||
ac_status=$?
|
||||
@ -7564,11 +7556,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:7567: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:7559: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:7571: \$? = $ac_status" >&5
|
||||
echo "$as_me:7563: \$? = $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.
|
||||
@ -7854,11 +7846,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:7857: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:7849: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:7861: \$? = $ac_status" >&5
|
||||
echo "$as_me:7853: \$? = $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.
|
||||
@ -7958,11 +7950,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:7961: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:7953: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:7965: \$? = $ac_status" >&5
|
||||
echo "$as_me:7957: \$? = $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
|
||||
@ -10358,7 +10350,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 10361 "configure"
|
||||
#line 10353 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -10458,7 +10450,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 10461 "configure"
|
||||
#line 10453 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -12867,11 +12859,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:12870: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:12862: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:12874: \$? = $ac_status" >&5
|
||||
echo "$as_me:12866: \$? = $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.
|
||||
@ -12971,11 +12963,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:12974: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:12966: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:12978: \$? = $ac_status" >&5
|
||||
echo "$as_me:12970: \$? = $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
|
||||
@ -14554,11 +14546,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:14557: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:14549: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:14561: \$? = $ac_status" >&5
|
||||
echo "$as_me:14553: \$? = $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.
|
||||
@ -14658,11 +14650,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:14661: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:14653: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:14665: \$? = $ac_status" >&5
|
||||
echo "$as_me:14657: \$? = $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
|
||||
@ -16873,11 +16865,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:16876: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:16868: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:16880: \$? = $ac_status" >&5
|
||||
echo "$as_me:16872: \$? = $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.
|
||||
@ -17163,11 +17155,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:17166: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:17158: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:17170: \$? = $ac_status" >&5
|
||||
echo "$as_me:17162: \$? = $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.
|
||||
@ -17267,11 +17259,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:17270: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:17262: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:17274: \$? = $ac_status" >&5
|
||||
echo "$as_me:17266: \$? = $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
|
||||
@ -21315,15 +21307,218 @@ $as_echo "yes" >&6; }
|
||||
fi
|
||||
sdkdir=$(pkg-config --variable=sdkdir xorg-server)
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C99" >&5
|
||||
$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
|
||||
if test "${ac_cv_prog_cc_c99+set}" = set; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_cv_prog_cc_c99=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 <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <wchar.h>
|
||||
#include <stdio.h>
|
||||
|
||||
// Check varargs macros. These examples are taken from C99 6.10.3.5.
|
||||
#define debug(...) fprintf (stderr, __VA_ARGS__)
|
||||
#define showlist(...) puts (#__VA_ARGS__)
|
||||
#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
|
||||
static void
|
||||
test_varargs_macros (void)
|
||||
{
|
||||
int x = 1234;
|
||||
int y = 5678;
|
||||
debug ("Flag");
|
||||
debug ("X = %d\n", x);
|
||||
showlist (The first, second, and third items.);
|
||||
report (x>y, "x is %d but y is %d", x, y);
|
||||
}
|
||||
|
||||
// Check long long types.
|
||||
#define BIG64 18446744073709551615ull
|
||||
#define BIG32 4294967295ul
|
||||
#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
|
||||
#if !BIG_OK
|
||||
your preprocessor is broken;
|
||||
#endif
|
||||
#if BIG_OK
|
||||
#else
|
||||
your preprocessor is broken;
|
||||
#endif
|
||||
static long long int bignum = -9223372036854775807LL;
|
||||
static unsigned long long int ubignum = BIG64;
|
||||
|
||||
struct incomplete_array
|
||||
{
|
||||
int datasize;
|
||||
double data[];
|
||||
};
|
||||
|
||||
struct named_init {
|
||||
int number;
|
||||
const wchar_t *name;
|
||||
double average;
|
||||
};
|
||||
|
||||
typedef const char *ccp;
|
||||
|
||||
static inline int
|
||||
test_restrict (ccp restrict text)
|
||||
{
|
||||
// See if C++-style comments work.
|
||||
// Iterate through items via the restricted pointer.
|
||||
// Also check for declarations in for loops.
|
||||
for (unsigned int i = 0; *(text+i) != '\0'; ++i)
|
||||
continue;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Check varargs and va_copy.
|
||||
static void
|
||||
test_varargs (const char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start (args, format);
|
||||
va_list args_copy;
|
||||
va_copy (args_copy, args);
|
||||
|
||||
const char *str;
|
||||
int number;
|
||||
float fnumber;
|
||||
|
||||
while (*format)
|
||||
{
|
||||
switch (*format++)
|
||||
{
|
||||
case 's': // string
|
||||
str = va_arg (args_copy, const char *);
|
||||
break;
|
||||
case 'd': // int
|
||||
number = va_arg (args_copy, int);
|
||||
break;
|
||||
case 'f': // float
|
||||
fnumber = va_arg (args_copy, double);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
va_end (args_copy);
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
// Check bool.
|
||||
_Bool success = false;
|
||||
|
||||
// Check restrict.
|
||||
if (test_restrict ("String literal") == 0)
|
||||
success = true;
|
||||
char *restrict newvar = "Another string";
|
||||
|
||||
// Check varargs.
|
||||
test_varargs ("s, d' f .", "string", 65, 34.234);
|
||||
test_varargs_macros ();
|
||||
|
||||
// Check flexible array members.
|
||||
struct incomplete_array *ia =
|
||||
malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
|
||||
ia->datasize = 10;
|
||||
for (int i = 0; i < ia->datasize; ++i)
|
||||
ia->data[i] = i * 1.234;
|
||||
|
||||
// Check named initializers.
|
||||
struct named_init ni = {
|
||||
.number = 34,
|
||||
.name = L"Test wide string",
|
||||
.average = 543.34343,
|
||||
};
|
||||
|
||||
ni.number = 58;
|
||||
|
||||
int dynamic_array[ni.number];
|
||||
dynamic_array[ni.number - 1] = 543;
|
||||
|
||||
// work around unused variable warnings
|
||||
return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
|
||||
|| dynamic_array[ni.number - 1] != 543);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
|
||||
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_c99=$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_c99" != "xno" && break
|
||||
done
|
||||
rm -f conftest.$ac_ext
|
||||
CC=$ac_save_CC
|
||||
|
||||
fi
|
||||
# AC_CACHE_VAL
|
||||
case "x$ac_cv_prog_cc_c99" 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_c99"
|
||||
{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c99" >&5
|
||||
$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
|
||||
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"
|
||||
case `gcc -dumpversion` in
|
||||
-Wbad-function-cast -Wformat=2"
|
||||
case `$CC -dumpversion` in
|
||||
3.4.* | 4.*)
|
||||
CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement"
|
||||
CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
@ -21392,6 +21587,277 @@ fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Check whether --enable-strict-compilation was given.
|
||||
if test "${enable_strict_compilation+set}" = set; then
|
||||
enableval=$enable_strict_compilation; STRICT_COMPILE=$enableval
|
||||
else
|
||||
STRICT_COMPILE=no
|
||||
fi
|
||||
|
||||
if test "x$STRICT_COMPILE" = "xyes"; then
|
||||
{ $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5
|
||||
$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; }
|
||||
if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$ac_includes_default
|
||||
int
|
||||
main ()
|
||||
{
|
||||
#ifndef __SUNPRO_C
|
||||
(void) __SUNPRO_C;
|
||||
#endif
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (ac_try="$ac_compile"
|
||||
case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
|
||||
$as_echo "$ac_try_echo") >&5
|
||||
(eval "$ac_compile") 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } && {
|
||||
test -z "$ac_c_werror_flag" ||
|
||||
test ! -s conftest.err
|
||||
} && test -s conftest.$ac_objext; then
|
||||
ac_cv_have_decl___SUNPRO_C=yes
|
||||
else
|
||||
$as_echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_have_decl___SUNPRO_C=no
|
||||
fi
|
||||
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5
|
||||
$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; }
|
||||
if test $ac_cv_have_decl___SUNPRO_C = yes; then
|
||||
SUNCC="yes"
|
||||
else
|
||||
SUNCC="no"
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking whether __INTEL_COMPILER is declared" >&5
|
||||
$as_echo_n "checking whether __INTEL_COMPILER is declared... " >&6; }
|
||||
if test "${ac_cv_have_decl___INTEL_COMPILER+set}" = set; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$ac_includes_default
|
||||
int
|
||||
main ()
|
||||
{
|
||||
#ifndef __INTEL_COMPILER
|
||||
(void) __INTEL_COMPILER;
|
||||
#endif
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (ac_try="$ac_compile"
|
||||
case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
|
||||
$as_echo "$ac_try_echo") >&5
|
||||
(eval "$ac_compile") 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } && {
|
||||
test -z "$ac_c_werror_flag" ||
|
||||
test ! -s conftest.err
|
||||
} && test -s conftest.$ac_objext; then
|
||||
ac_cv_have_decl___INTEL_COMPILER=yes
|
||||
else
|
||||
$as_echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_have_decl___INTEL_COMPILER=no
|
||||
fi
|
||||
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___INTEL_COMPILER" >&5
|
||||
$as_echo "$ac_cv_have_decl___INTEL_COMPILER" >&6; }
|
||||
if test $ac_cv_have_decl___INTEL_COMPILER = yes; then
|
||||
INTELCC="yes"
|
||||
else
|
||||
INTELCC="no"
|
||||
fi
|
||||
|
||||
if test "x$GCC" = xyes ; then
|
||||
STRICT_CFLAGS="-pedantic -Werror"
|
||||
elif test "x$SUNCC" = "xyes"; then
|
||||
STRICT_CFLAGS="-errwarn"
|
||||
elif test "x$INTELCC" = "xyes"; then
|
||||
STRICT_CFLAGS="-Werror"
|
||||
fi
|
||||
fi
|
||||
CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
|
||||
|
||||
|
||||
|
||||
|
||||
# Check whether --with-release-version was given.
|
||||
if test "${with_release_version+set}" = set; then
|
||||
withval=$with_release_version; RELEASE_VERSION="$withval"
|
||||
else
|
||||
RELEASE_VERSION=""
|
||||
fi
|
||||
|
||||
if test "x$RELEASE_VERSION" != "x"; then
|
||||
PACKAGE="$PACKAGE-$RELEASE_VERSION"
|
||||
PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
|
||||
{ $as_echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5
|
||||
$as_echo "$as_me: Building with package name set to $PACKAGE" >&6;}
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
AM_DEFAULT_VERBOSITY=1
|
||||
|
||||
|
||||
XORG_CFLAGS="$CWARNFLAGS $XORG_CFLAGS"
|
||||
|
||||
|
||||
@ -21577,125 +22043,6 @@ _ACEOF
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Check whether --with-release-version was given.
|
||||
if test "${with_release_version+set}" = set; then
|
||||
withval=$with_release_version; RELEASE_VERSION="$withval"
|
||||
else
|
||||
RELEASE_VERSION=""
|
||||
fi
|
||||
|
||||
if test "x$RELEASE_VERSION" != "x"; then
|
||||
PACKAGE="$PACKAGE-$RELEASE_VERSION"
|
||||
PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
|
||||
{ $as_echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5
|
||||
$as_echo "$as_me: Building with package name set to $PACKAGE" >&6;}
|
||||
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 > .changelog.tmp && \
|
||||
mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
|
||||
echo 'git directory not found: installing possibly empty changelog.' >&2)"
|
||||
|
||||
distcleancheck_listfiles='find . -type f ! -name ChangeLog -print'
|
||||
|
||||
|
||||
|
||||
ac_config_files="$ac_config_files Makefile src/Makefile man/Makefile"
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
@ -22187,7 +22534,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-keyboard $as_me 1.3.2, which was
|
||||
This file was extended by xf86-input-keyboard $as_me 1.4.0, which was
|
||||
generated by GNU Autoconf 2.62. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@ -22240,7 +22587,7 @@ Report bugs to <bug-autoconf@gnu.org>."
|
||||
_ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_version="\\
|
||||
xf86-input-keyboard config.status 1.3.2
|
||||
xf86-input-keyboard config.status 1.4.0
|
||||
configured by $0, generated by GNU Autoconf 2.62,
|
||||
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
|
||||
|
||||
|
@ -22,14 +22,13 @@
|
||||
|
||||
AC_PREREQ(2.57)
|
||||
AC_INIT([xf86-input-keyboard],
|
||||
1.3.2,
|
||||
1.4.0,
|
||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
|
||||
xf86-input-keyboard)
|
||||
|
||||
# Require xorg-macros version 1.2 or newer for XORG_CWARNFLAGS and
|
||||
# XORG_CHANGELOG macros
|
||||
m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2.1 or later before running autoconf/autogen])])
|
||||
XORG_MACROS_VERSION(1.2.1)
|
||||
# Require xorg-macros version 1.3 or newer for XORG_DEFAULT_OPTIONS
|
||||
m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.3 or later before running autoconf/autogen])])
|
||||
XORG_MACROS_VERSION(1.3)
|
||||
|
||||
AC_CONFIG_SRCDIR([Makefile.am])
|
||||
AC_CONFIG_AUX_DIR(.)
|
||||
@ -112,7 +111,7 @@ XORG_DRIVER_CHECK_EXT(XKB, kbproto)
|
||||
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.2.99.0] xproto $REQUIRED_MODULES)
|
||||
sdkdir=$(pkg-config --variable=sdkdir xorg-server)
|
||||
|
||||
XORG_CWARNFLAGS
|
||||
XORG_DEFAULT_OPTIONS
|
||||
XORG_CFLAGS="$CWARNFLAGS $XORG_CFLAGS"
|
||||
AC_SUBST([XORG_CFLAGS])
|
||||
|
||||
@ -121,8 +120,4 @@ AC_SUBST([XORG_CFLAGS])
|
||||
# Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
|
||||
XORG_MANPAGE_SECTIONS
|
||||
XORG_RELEASE_VERSION
|
||||
XORG_CHANGELOG
|
||||
|
||||
AC_OUTPUT([Makefile src/Makefile man/Makefile])
|
||||
|
@ -89,6 +89,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@
|
||||
@ -129,6 +130,7 @@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
|
||||
GREP = @GREP@
|
||||
HURD_FALSE = @HURD_FALSE@
|
||||
HURD_TRUE = @HURD_TRUE@
|
||||
INSTALL_CMD = @INSTALL_CMD@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
@ -191,7 +193,6 @@ build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
distcleancheck_listfiles = @distcleancheck_listfiles@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
@ -27,6 +27,11 @@ The
|
||||
driver functions as a keyboard input device, and may be used as the
|
||||
X server's core keyboard.
|
||||
.SH CONFIGURATION DETAILS
|
||||
.PP
|
||||
Depending on the X server version in use, input device options may be set
|
||||
in either a __xconfigfile__ file, or in the configuration files read by the
|
||||
Hardware Abstraction Layer (HAL) daemon, hald(1).
|
||||
.PP
|
||||
Please refer to __xconfigfile__(__filemansuffix__) for general configuration
|
||||
details and for options that can be used with all input drivers. This
|
||||
section only covers configuration details specific to this driver.
|
||||
@ -50,14 +55,6 @@ Standard, Xqueue.
|
||||
Not all protocols are supported on all platforms. Default: "Standard".
|
||||
.RE
|
||||
.TP 7
|
||||
.BI "Option \*qAutoRepeat\*q \*q" "delay rate" \*q
|
||||
sets the auto repeat behaviour for the keyboard. This is not implemented
|
||||
on all platforms.
|
||||
.I delay
|
||||
is the time in milliseconds before a key starts repeating.
|
||||
.I rate
|
||||
is the number of times a key repeats per second. Default: "500 30".
|
||||
.TP 7
|
||||
.BI "Option \*qXLeds\*q \*q" ledlist \*q
|
||||
makes the keyboard LEDs specified in
|
||||
.I ledlist
|
||||
@ -86,7 +83,7 @@ but "pc98" for the Japanese PC-98 platforms.
|
||||
.BI "Option \*qXkbLayout\*q \*q" layoutname \*q
|
||||
specifies the XKB keyboard layout name. This is usually the country or
|
||||
language type of the keyboard. Default: "us" for most platforms, but
|
||||
"nec/jp" for the Japanese PC-98 platforms.
|
||||
"jp" for the Japanese PC-98 platforms.
|
||||
.TP 7
|
||||
.BI "Option \*qXkbVariant\*q \*q" variants \*q
|
||||
specifies the XKB keyboard variant components. These can be used to
|
||||
@ -136,4 +133,6 @@ EndSection
|
||||
.fi
|
||||
.SH "SEE ALSO"
|
||||
__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__),
|
||||
xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__).
|
||||
Xserver(__appmansuffix__), X(__miscmansuffix__).
|
||||
|
||||
hal(__miscmansuffix__), hald(__adminmansuffix__), fdi(__filemansuffix__).
|
||||
|
@ -119,6 +119,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@
|
||||
@ -159,6 +160,7 @@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
|
||||
GREP = @GREP@
|
||||
HURD_FALSE = @HURD_FALSE@
|
||||
HURD_TRUE = @HURD_TRUE@
|
||||
INSTALL_CMD = @INSTALL_CMD@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
@ -221,7 +223,6 @@ build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
distcleancheck_listfiles = @distcleancheck_listfiles@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
@ -328,51 +328,6 @@ SoundBell(InputInfoPtr pInfo, int loudness, int pitch, int duration)
|
||||
}
|
||||
}
|
||||
|
||||
#define ModifierSet(k) ((modifiers & (k)) == (k))
|
||||
|
||||
static
|
||||
Bool SpecialKey(InputInfoPtr pInfo, int key, Bool down, int modifiers)
|
||||
{
|
||||
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
|
||||
|
||||
if(!pKbd->vtSwitchSupported)
|
||||
return FALSE;
|
||||
|
||||
if ((ModifierSet(ControlMask | AltMask)) ||
|
||||
(ModifierSet(ControlMask | AltLangMask))) {
|
||||
if (VTSwitchEnabled && !xf86Info.vtSysreq && !xf86Info.dontVTSwitch) {
|
||||
switch (key) {
|
||||
case KEY_F1:
|
||||
case KEY_F2:
|
||||
case KEY_F3:
|
||||
case KEY_F4:
|
||||
case KEY_F5:
|
||||
case KEY_F6:
|
||||
case KEY_F7:
|
||||
case KEY_F8:
|
||||
case KEY_F9:
|
||||
case KEY_F10:
|
||||
#ifdef VT_ACTIVATE
|
||||
if (down) {
|
||||
ioctl(xf86Info.consoleFd, VT_ACTIVATE, key - KEY_F1 + 1);
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
case KEY_F11:
|
||||
case KEY_F12:
|
||||
#ifdef VT_ACTIVATE
|
||||
if (down) {
|
||||
ioctl(xf86Info.consoleFd, VT_ACTIVATE, key - KEY_F11 + 11);
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
stdReadInput(InputInfoPtr pInfo)
|
||||
{
|
||||
@ -594,10 +549,8 @@ xf86OSKbdPreInit(InputInfoPtr pInfo)
|
||||
pKbd->GetLeds = GetKbdLeds;
|
||||
pKbd->SetKbdRepeat = SetKbdRepeat;
|
||||
pKbd->KbdGetMapping = KbdGetMapping;
|
||||
pKbd->SpecialKey = SpecialKey;
|
||||
|
||||
pKbd->RemapScanCode = NULL;
|
||||
pKbd->GetSpecialKey = NULL;
|
||||
|
||||
pKbd->OpenKeyboard = OpenKeyboard;
|
||||
pKbd->vtSwitchSupported = FALSE;
|
||||
|
@ -164,9 +164,7 @@ xf86OSKbdPreInit(InputInfoPtr pInfo)
|
||||
pKbd->GetLeds = GetKbdLeds;
|
||||
pKbd->SetKbdRepeat = SetKbdRepeat;
|
||||
pKbd->KbdGetMapping = KbdGetMapping;
|
||||
pKbd->SpecialKey = NULL;
|
||||
pKbd->RemapScanCode = ATScancode;
|
||||
pKbd->GetSpecialKey = NULL;
|
||||
pKbd->OpenKeyboard = OpenKeyboard;
|
||||
pKbd->vtSwitchSupported = FALSE;
|
||||
pKbd->CustomKeycodes = FALSE;
|
||||
|
@ -27,28 +27,19 @@
|
||||
#include "atKeynames.h"
|
||||
#include "xf86Privstr.h"
|
||||
|
||||
#ifdef XINPUT
|
||||
#include <X11/extensions/XI.h>
|
||||
#include <X11/extensions/XIproto.h>
|
||||
#include "extnsionst.h"
|
||||
#include "extinit.h"
|
||||
#else
|
||||
#include "inputstr.h"
|
||||
#endif
|
||||
|
||||
#include "xf86Xinput.h"
|
||||
#include "xf86_OSproc.h"
|
||||
#include "xf86OSKbd.h"
|
||||
#include "compiler.h"
|
||||
|
||||
#ifdef XKB
|
||||
#include <X11/extensions/XKB.h>
|
||||
#include <X11/extensions/XKBstr.h>
|
||||
#include <X11/extensions/XKBsrv.h>
|
||||
#endif
|
||||
|
||||
extern int XkbDfltRepeatDelay;
|
||||
extern int XkbDfltRepeatInterval;
|
||||
#include "xkbstr.h"
|
||||
#include "xkbsrv.h"
|
||||
|
||||
#define CAPSFLAG 1
|
||||
#define NUMFLAG 2
|
||||
@ -56,11 +47,11 @@ extern int XkbDfltRepeatInterval;
|
||||
#define MODEFLAG 8
|
||||
#define COMPOSEFLAG 16
|
||||
/* Used to know when the first DEVICE_ON after a DEVICE_INIT is called */
|
||||
#define INITFLAG (1 << 31)
|
||||
#define INITFLAG (1U << 31)
|
||||
|
||||
static InputInfoPtr KbdPreInit(InputDriverPtr drv, IDevPtr dev, int flags);
|
||||
static int KbdProc(DeviceIntPtr device, int what);
|
||||
static int KbdCtrl(DeviceIntPtr device, KeybdCtrl *ctrl);
|
||||
static void KbdCtrl(DeviceIntPtr device, KeybdCtrl *ctrl);
|
||||
static void KbdBell(int percent, DeviceIntPtr dev, pointer ctrl, int unused);
|
||||
static void PostKbdEvent(InputInfoPtr pInfo, unsigned int key, Bool down);
|
||||
|
||||
@ -96,19 +87,11 @@ typedef enum {
|
||||
OPTION_PROTOCOL,
|
||||
OPTION_AUTOREPEAT,
|
||||
OPTION_XLEDS,
|
||||
OPTION_XKB_DISABLE,
|
||||
OPTION_XKB_KEYMAP,
|
||||
OPTION_XKB_KEYCODES,
|
||||
OPTION_XKB_TYPES,
|
||||
OPTION_XKB_COMPAT,
|
||||
OPTION_XKB_SYMBOLS,
|
||||
OPTION_XKB_GEOMETRY,
|
||||
OPTION_XKB_RULES,
|
||||
OPTION_XKB_MODEL,
|
||||
OPTION_XKB_LAYOUT,
|
||||
OPTION_XKB_VARIANT,
|
||||
OPTION_XKB_OPTIONS,
|
||||
OPTION_PANIX106,
|
||||
OPTION_CUSTOM_KEYCODES
|
||||
} KeyboardOpts;
|
||||
|
||||
@ -121,19 +104,11 @@ static const OptionInfoRec KeyboardOptions[] = {
|
||||
{ OPTION_PROTOCOL, "Protocol", OPTV_STRING, {0}, FALSE },
|
||||
{ OPTION_AUTOREPEAT, "AutoRepeat", OPTV_STRING, {0}, FALSE },
|
||||
{ OPTION_XLEDS, "XLeds", OPTV_STRING, {0}, FALSE },
|
||||
{ OPTION_XKB_DISABLE, "XkbDisable", OPTV_BOOLEAN, {0}, FALSE },
|
||||
{ OPTION_XKB_KEYMAP, "XkbKeymap", OPTV_STRING, {0}, FALSE },
|
||||
{ OPTION_XKB_KEYCODES, "XkbKeycodes", OPTV_STRING, {0}, FALSE },
|
||||
{ OPTION_XKB_TYPES, "XkbTypes", OPTV_STRING, {0}, FALSE },
|
||||
{ OPTION_XKB_COMPAT, "XkbCompat", OPTV_STRING, {0}, FALSE },
|
||||
{ OPTION_XKB_SYMBOLS, "XkbSymbols", OPTV_STRING, {0}, FALSE },
|
||||
{ OPTION_XKB_GEOMETRY, "XkbGeometry", OPTV_STRING, {0}, FALSE },
|
||||
{ OPTION_XKB_RULES, "XkbRules", OPTV_STRING, {0}, FALSE },
|
||||
{ OPTION_XKB_MODEL, "XkbModel", OPTV_STRING, {0}, FALSE },
|
||||
{ OPTION_XKB_LAYOUT, "XkbLayout", OPTV_STRING, {0}, FALSE },
|
||||
{ OPTION_XKB_VARIANT, "XkbVariant", OPTV_STRING, {0}, FALSE },
|
||||
{ OPTION_XKB_OPTIONS, "XkbOptions", OPTV_STRING, {0}, FALSE },
|
||||
{ OPTION_PANIX106, "Panix106", OPTV_BOOLEAN, {0}, FALSE },
|
||||
{ OPTION_CUSTOM_KEYCODES, "CustomKeycodes", OPTV_BOOLEAN, {0}, FALSE },
|
||||
{ -1, NULL, OPTV_NONE, {0}, FALSE }
|
||||
};
|
||||
@ -145,15 +120,12 @@ static const char *kbdDefaults[] = {
|
||||
"Protocol", "standard",
|
||||
#endif
|
||||
"AutoRepeat", "500 30",
|
||||
"XkbRules", __XKBDEFRULES__,
|
||||
"XkbRules", "xorg",
|
||||
"XkbModel", "pc105",
|
||||
"Panix106", "off",
|
||||
"CustomKeycodes", "off",
|
||||
NULL
|
||||
};
|
||||
|
||||
static const char *kbdLayout = "us";
|
||||
|
||||
static const char *kbd98Defaults[] = {
|
||||
#ifdef XQUEUE
|
||||
"Protocol", "Xqueue",
|
||||
@ -163,35 +135,17 @@ static const char *kbd98Defaults[] = {
|
||||
"AutoRepeat", "500 30",
|
||||
"XkbRules", "xfree98",
|
||||
"XkbModel", "pc98",
|
||||
"XkbLayout", "nec/jp",
|
||||
"Panix106", "off",
|
||||
"XkbLayout", "jp",
|
||||
"CustomKeycodes", "off",
|
||||
NULL
|
||||
};
|
||||
|
||||
const char *xkbSymbols[] = {
|
||||
"XkbDfltRepeatDelay",
|
||||
"XkbDfltRepeatInterval",
|
||||
NULL,
|
||||
};
|
||||
|
||||
#ifdef XKB
|
||||
static char *xkb_rules;
|
||||
static char *xkb_model;
|
||||
static char *xkb_layout;
|
||||
static char *xkb_variant;
|
||||
static char *xkb_options;
|
||||
|
||||
static XkbComponentNamesRec xkbnames;
|
||||
#endif /* XKB */
|
||||
|
||||
/*ARGSUSED*/
|
||||
static const OptionInfoRec *
|
||||
KeyboardAvailableOptions(void *unused)
|
||||
{
|
||||
return (KeyboardOptions);
|
||||
}
|
||||
|
||||
static void
|
||||
SetXkbOption(InputInfoPtr pInfo, char *name, char **option)
|
||||
{
|
||||
@ -208,39 +162,6 @@ SetXkbOption(InputInfoPtr pInfo, char *name, char **option)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#define ModifierIsSet(k) ((modifiers & (k)) == (k))
|
||||
|
||||
static Bool
|
||||
CommonSpecialKey(int key, Bool down, int modifiers)
|
||||
{
|
||||
if ((!ModifierIsSet(ShiftMask)) &&
|
||||
(((ModifierIsSet(ControlMask | AltMask)) ||
|
||||
(ModifierIsSet(ControlMask | AltLangMask))))) {
|
||||
switch (key) {
|
||||
|
||||
case KEY_BackSpace:
|
||||
xf86ProcessActionEvent(ACTION_TERMINATE, NULL);
|
||||
break;
|
||||
|
||||
/*
|
||||
* The idea here is to pass the scancode down to a list of
|
||||
* registered routines. There should be some standard conventions
|
||||
* for processing certain keys.
|
||||
*/
|
||||
case KEY_KP_Minus: /* Keypad - */
|
||||
if (down) xf86ProcessActionEvent(ACTION_PREV_MODE, NULL);
|
||||
break;
|
||||
|
||||
case KEY_KP_Plus: /* Keypad + */
|
||||
if (down) xf86ProcessActionEvent(ACTION_NEXT_MODE, NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
static InputInfoPtr
|
||||
KbdPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
|
||||
{
|
||||
@ -270,7 +191,7 @@ KbdPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
|
||||
pInfo->fd = -1;
|
||||
pInfo->dev = NULL;
|
||||
pInfo->private_flags = 0;
|
||||
pInfo->always_core_feedback = 0;
|
||||
pInfo->always_core_feedback = NULL;
|
||||
pInfo->conf_idev = dev;
|
||||
|
||||
if (!xf86IsPc98())
|
||||
@ -285,8 +206,6 @@ KbdPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
|
||||
pInfo->private = pKbd;
|
||||
pKbd->PostEvent = PostKbdEvent;
|
||||
|
||||
xf86LoaderReqSymLists(xkbSymbols, NULL);
|
||||
|
||||
if (!xf86OSKbdPreInit(pInfo))
|
||||
return pInfo;
|
||||
|
||||
@ -294,25 +213,6 @@ KbdPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
|
||||
return pInfo;
|
||||
}
|
||||
|
||||
if (xf86findOption(pInfo->options, "XkbLayout") == NULL) {
|
||||
xf86Msg(X_INFO, "%s: adding default layout %s\n",
|
||||
pInfo->name, kbdLayout);
|
||||
xf86addNewOption(pInfo->options, "XkbLayout", kbdLayout);
|
||||
}
|
||||
|
||||
if ((s = xf86SetStrOption(pInfo->options, "AutoRepeat", NULL))) {
|
||||
int delay, rate;
|
||||
if (sscanf(s, "%d %d", &delay, &rate) != 2) {
|
||||
xf86Msg(X_ERROR, "\"%s\" is not a valid AutoRepeat value", s);
|
||||
} else {
|
||||
pKbd->delay = delay;
|
||||
XkbDfltRepeatDelay = delay;
|
||||
pKbd->rate = rate;
|
||||
XkbDfltRepeatInterval = 1000/rate;
|
||||
}
|
||||
xfree(s);
|
||||
}
|
||||
|
||||
if ((s = xf86SetStrOption(pInfo->options, "XLeds", NULL))) {
|
||||
char *l, *end;
|
||||
unsigned int i;
|
||||
@ -329,49 +229,11 @@ KbdPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
|
||||
xfree(s);
|
||||
}
|
||||
|
||||
#ifdef XKB
|
||||
|
||||
/* XkbDisable must be a server flag but for compatibility we check it here */
|
||||
|
||||
if (xf86FindOption(pInfo->options, "XkbDisable"))
|
||||
xf86Msg(X_WARNING,
|
||||
"%s: XKB can't be disabled here. Use \"ServerFlags\" section.\n",
|
||||
pInfo->name);
|
||||
|
||||
pKbd->noXkb = noXkbExtension;
|
||||
if (pKbd->noXkb) {
|
||||
xf86Msg(X_CONFIG, "XKB: disabled\n");
|
||||
} else {
|
||||
SetXkbOption(pInfo, "XkbKeymap", &xkbnames.keymap);
|
||||
if (xkbnames.keymap) {
|
||||
xf86Msg(X_CONFIG, "%s: XkbKeymap overrides all other XKB settings\n",
|
||||
pInfo->name);
|
||||
} else {
|
||||
SetXkbOption(pInfo, "XkbRules", &xkb_rules);
|
||||
SetXkbOption(pInfo, "XkbModel", &xkb_model);
|
||||
SetXkbOption(pInfo, "XkbLayout", &xkb_layout);
|
||||
SetXkbOption(pInfo, "XkbVariant", &xkb_variant);
|
||||
SetXkbOption(pInfo, "XkbOptions", &xkb_options);
|
||||
|
||||
SetXkbOption(pInfo, "XkbKeycodes", &xkbnames.keycodes);
|
||||
SetXkbOption(pInfo, "XkbTypes", &xkbnames.types);
|
||||
SetXkbOption(pInfo, "XkbCompat", &xkbnames.compat);
|
||||
SetXkbOption(pInfo, "XkbSymbols", &xkbnames.symbols);
|
||||
SetXkbOption(pInfo, "XkbGeometry", &xkbnames.geometry);
|
||||
}
|
||||
}
|
||||
|
||||
if ((xkb_model && !strcmp(xkb_model, "sun")) ||
|
||||
(xkb_rules && !strcmp(xkb_rules, "sun")))
|
||||
pKbd->sunKbd = TRUE;
|
||||
#endif
|
||||
|
||||
#if defined(SVR4) && defined(i386)
|
||||
if ((pKbd->Panix106 =
|
||||
xf86SetBoolOption(pInfo->options, "Panix106", FALSE))) {
|
||||
xf86Msg(X_CONFIG, "%s: PANIX106: enabled\n", pInfo->name);
|
||||
}
|
||||
#endif
|
||||
SetXkbOption(pInfo, "XkbRules", &xkb_rules);
|
||||
SetXkbOption(pInfo, "XkbModel", &xkb_model);
|
||||
SetXkbOption(pInfo, "XkbLayout", &xkb_layout);
|
||||
SetXkbOption(pInfo, "XkbVariant", &xkb_variant);
|
||||
SetXkbOption(pInfo, "XkbOptions", &xkb_options);
|
||||
|
||||
pKbd->CustomKeycodes = FALSE;
|
||||
from = X_DEFAULT;
|
||||
@ -402,7 +264,7 @@ static void
|
||||
UpdateLeds(InputInfoPtr pInfo)
|
||||
{
|
||||
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
|
||||
int leds = 0;
|
||||
unsigned long leds = 0;
|
||||
|
||||
if (pKbd->keyLeds & CAPSFLAG) leds |= XLED1;
|
||||
if (pKbd->keyLeds & NUMFLAG) leds |= XLED2;
|
||||
@ -414,10 +276,10 @@ UpdateLeds(InputInfoPtr pInfo)
|
||||
pKbd->SetLeds(pInfo, pKbd->leds);
|
||||
}
|
||||
|
||||
static int
|
||||
static void
|
||||
KbdCtrl( DeviceIntPtr device, KeybdCtrl *ctrl)
|
||||
{
|
||||
int leds;
|
||||
unsigned long leds;
|
||||
InputInfoPtr pInfo = (InputInfoPtr) device->public.devicePrivate;
|
||||
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
|
||||
|
||||
@ -442,25 +304,13 @@ KbdCtrl( DeviceIntPtr device, KeybdCtrl *ctrl)
|
||||
pKbd->keyLeds &= ~COMPOSEFLAG;
|
||||
}
|
||||
leds = ctrl->leds & ~(XCAPS | XNUM | XSCR); /* ??? */
|
||||
#ifdef XKB
|
||||
if (pKbd->noXkb) {
|
||||
#endif
|
||||
pKbd->leds = (leds & pKbd->xledsMask) | (pKbd->leds & ~pKbd->xledsMask);
|
||||
#ifdef XKB
|
||||
} else {
|
||||
pKbd->leds = leds;
|
||||
}
|
||||
#endif
|
||||
pKbd->leds = leds;
|
||||
pKbd->SetLeds(pInfo, pKbd->leds);
|
||||
pKbd->autoRepeat = ctrl->autoRepeat;
|
||||
|
||||
return (Success);
|
||||
}
|
||||
|
||||
static void
|
||||
InitKBD(InputInfoPtr pInfo, Bool init)
|
||||
{
|
||||
char rad;
|
||||
xEvent kevent;
|
||||
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
|
||||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 1
|
||||
@ -513,16 +363,8 @@ InitKBD(InputInfoPtr pInfo, Bool init)
|
||||
pKbd->keyLeds = pKbd->GetLeds(pInfo);
|
||||
UpdateLeds(pInfo);
|
||||
pKbd->keyLeds |= INITFLAG;
|
||||
if( pKbd->delay <= 375) rad = 0x00;
|
||||
else if (pKbd->delay <= 625) rad = 0x20;
|
||||
else if (pKbd->delay <= 875) rad = 0x40;
|
||||
else rad = 0x60;
|
||||
if (pKbd->rate <= 2) rad |= 0x1F;
|
||||
else if (pKbd->rate >= 30) rad |= 0x00;
|
||||
else rad |= ((58 / pKbd->rate) - 2);
|
||||
pKbd->SetKbdRepeat(pInfo, rad);
|
||||
} else {
|
||||
int leds = pKbd->keyLeds;
|
||||
unsigned long leds = pKbd->keyLeds;
|
||||
|
||||
pKbd->keyLeds = pKbd->GetLeds(pInfo);
|
||||
UpdateLeds(pInfo);
|
||||
@ -551,37 +393,44 @@ KbdProc(DeviceIntPtr device, int what)
|
||||
|
||||
switch (what) {
|
||||
case DEVICE_INIT:
|
||||
ret = pKbd->KbdInit(pInfo, what);
|
||||
if (ret != Success)
|
||||
return ret;
|
||||
ret = pKbd->KbdInit(pInfo, what);
|
||||
if (ret != Success)
|
||||
return ret;
|
||||
|
||||
pKbd->KbdGetMapping(pInfo, &keySyms, modMap);
|
||||
pKbd->KbdGetMapping(pInfo, &keySyms, modMap);
|
||||
|
||||
device->public.on = FALSE;
|
||||
#ifdef XKB
|
||||
if (pKbd->noXkb) {
|
||||
#endif
|
||||
InitKeyboardDeviceStruct((DevicePtr) device,
|
||||
&keySyms,
|
||||
modMap,
|
||||
KbdBell,
|
||||
(KbdCtrlProcPtr)KbdCtrl);
|
||||
#ifdef XKB
|
||||
} else {
|
||||
if (xkbnames.keymap)
|
||||
xkb_rules = NULL;
|
||||
XkbSetRulesDflts(xkb_rules, xkb_model, xkb_layout,
|
||||
xkb_variant, xkb_options);
|
||||
XkbInitKeyboardDeviceStruct(device,
|
||||
&xkbnames,
|
||||
&keySyms,
|
||||
modMap,
|
||||
KbdBell,
|
||||
(KbdCtrlProcPtr)KbdCtrl);
|
||||
}
|
||||
#endif
|
||||
InitKBD(pInfo, TRUE);
|
||||
break;
|
||||
device->public.on = FALSE;
|
||||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 5
|
||||
{
|
||||
XkbRMLVOSet rmlvo;
|
||||
rmlvo.rules = xkb_rules;
|
||||
rmlvo.model = xkb_model;
|
||||
rmlvo.layout = xkb_layout;
|
||||
rmlvo.variant = xkb_variant;
|
||||
rmlvo.options = xkb_options;
|
||||
|
||||
if (!InitKeyboardDeviceStruct(device, &rmlvo, KbdBell, KbdCtrl))
|
||||
{
|
||||
xf86Msg(X_ERROR, "%s: Keyboard initialization failed. This "
|
||||
"could be a missing or incorrect setup of "
|
||||
"xkeyboard-config.\n", device->name);
|
||||
|
||||
return BadValue;
|
||||
}
|
||||
}
|
||||
#else
|
||||
{
|
||||
XkbComponentNamesRec xkbnames;
|
||||
memset(&xkbnames, 0, sizeof(xkbnames));
|
||||
XkbSetRulesDflts(xkb_rules, xkb_model, xkb_layout,
|
||||
xkb_variant, xkb_options);
|
||||
XkbInitKeyboardDeviceStruct(device, &xkbnames, &keySyms,
|
||||
modMap, KbdBell,
|
||||
(KbdCtrlProcPtr)KbdCtrl);
|
||||
}
|
||||
#endif /* XINPUT ABI 5*/
|
||||
InitKBD(pInfo, TRUE);
|
||||
break;
|
||||
case DEVICE_ON:
|
||||
if (device->public.on)
|
||||
break;
|
||||
@ -626,14 +475,6 @@ PostKbdEvent(InputInfoPtr pInfo, unsigned int scanCode, Bool down)
|
||||
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
|
||||
DeviceIntPtr device = pInfo->dev;
|
||||
KeyClassRec *keyc = device->key;
|
||||
KbdFeedbackClassRec *kbdfeed = device->kbdfeed;
|
||||
int specialkey = 0;
|
||||
|
||||
Bool UsePrefix = FALSE;
|
||||
KeySym *keysym;
|
||||
int keycode;
|
||||
unsigned long changeLock = 0;
|
||||
static int lockkeys = 0;
|
||||
|
||||
#ifdef DEBUG
|
||||
ErrorF("kbd driver rec scancode: 0x02%x %s\n", scanCode, down?"down":"up");
|
||||
@ -643,21 +484,6 @@ PostKbdEvent(InputInfoPtr pInfo, unsigned int scanCode, Bool down)
|
||||
if (xf86inSuspend)
|
||||
return;
|
||||
|
||||
#ifndef __OpenBSD__
|
||||
if (pKbd->sunKbd) {
|
||||
/*
|
||||
* XXX XXX XXX:
|
||||
*
|
||||
* I really don't know what's wrong here, but passing the real
|
||||
* scanCode offsets by one from XKB's point of view.
|
||||
*
|
||||
* (ecd@skynet.be, 980405)
|
||||
*/
|
||||
scanCode--;
|
||||
goto sunKeyboards;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* First do some special scancode remapping ...
|
||||
*/
|
||||
@ -672,204 +498,27 @@ PostKbdEvent(InputInfoPtr pInfo, unsigned int scanCode, Bool down)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* and now get some special keysequences
|
||||
*/
|
||||
|
||||
specialkey = scanCode;
|
||||
|
||||
if (pKbd->GetSpecialKey != NULL) {
|
||||
specialkey = pKbd->GetSpecialKey(pInfo, scanCode);
|
||||
} else {
|
||||
if (pKbd->specialMap != NULL) {
|
||||
TransMapPtr map = pKbd->specialMap;
|
||||
if (scanCode >= map->begin && scanCode < map->end)
|
||||
specialkey = map->map[scanCode - map->begin];
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef TERMINATE_FALLBACK
|
||||
#define TERMINATE_FALLBACK 0
|
||||
#endif
|
||||
#ifdef XKB
|
||||
if (noXkbExtension
|
||||
#if TERMINATE_FALLBACK
|
||||
|| specialkey == KEY_BackSpace
|
||||
#endif
|
||||
)
|
||||
#endif
|
||||
{
|
||||
if (CommonSpecialKey(specialkey, down, keyc->state))
|
||||
return;
|
||||
if (pKbd->SpecialKey != NULL)
|
||||
if (pKbd->SpecialKey(pInfo, specialkey, down, keyc->state))
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef __sparc64__
|
||||
/*
|
||||
* PC keyboards generate separate key codes for
|
||||
* Alt+Print and Control+Pause but in the X keyboard model
|
||||
* they need to get the same key code as the base key on the same
|
||||
* physical keyboard key.
|
||||
*/
|
||||
|
||||
if (!xf86IsPc98()) {
|
||||
if (ModifierDown(AltMask) && (scanCode == KEY_SysReqest))
|
||||
int state;
|
||||
|
||||
state = XkbStateFieldFromRec(&keyc->xkbInfo->state);
|
||||
|
||||
if (((state & AltMask) == AltMask) && (scanCode == KEY_SysReqest))
|
||||
scanCode = KEY_Print;
|
||||
else if (scanCode == KEY_Break)
|
||||
scanCode = KEY_Pause;
|
||||
}
|
||||
#endif
|
||||
|
||||
sunKeyboards:
|
||||
/*
|
||||
* Now map the scancodes to real X-keycodes ...
|
||||
*/
|
||||
keycode = scanCode + MIN_KEYCODE;
|
||||
keysym = (keyc->curKeySyms.map +
|
||||
keyc->curKeySyms.mapWidth *
|
||||
(keycode - keyc->curKeySyms.minKeyCode));
|
||||
|
||||
#ifdef XKB
|
||||
if (pKbd->noXkb) {
|
||||
#endif
|
||||
/*
|
||||
* Filter autorepeated caps/num/scroll lock keycodes.
|
||||
*/
|
||||
if( down ) {
|
||||
switch( keysym[0] ) {
|
||||
case XK_Caps_Lock :
|
||||
if (lockkeys & CAPSFLAG)
|
||||
return;
|
||||
else
|
||||
lockkeys |= CAPSFLAG;
|
||||
break;
|
||||
|
||||
case XK_Num_Lock :
|
||||
if (lockkeys & NUMFLAG)
|
||||
return;
|
||||
else
|
||||
lockkeys |= NUMFLAG;
|
||||
break;
|
||||
|
||||
case XK_Scroll_Lock :
|
||||
if (lockkeys & SCROLLFLAG)
|
||||
return;
|
||||
else
|
||||
lockkeys |= SCROLLFLAG;
|
||||
break;
|
||||
}
|
||||
if (keysym[1] == XF86XK_ModeLock)
|
||||
{
|
||||
if (lockkeys & MODEFLAG)
|
||||
return;
|
||||
else
|
||||
lockkeys |= MODEFLAG;
|
||||
}
|
||||
}
|
||||
else {
|
||||
switch( keysym[0] ) {
|
||||
case XK_Caps_Lock :
|
||||
lockkeys &= ~CAPSFLAG;
|
||||
break;
|
||||
|
||||
case XK_Num_Lock :
|
||||
lockkeys &= ~NUMFLAG;
|
||||
break;
|
||||
|
||||
case XK_Scroll_Lock :
|
||||
lockkeys &= ~SCROLLFLAG;
|
||||
break;
|
||||
}
|
||||
if (keysym[1] == XF86XK_ModeLock)
|
||||
lockkeys &= ~MODEFLAG;
|
||||
}
|
||||
|
||||
/*
|
||||
* LockKey special handling:
|
||||
* ignore releases, toggle on & off on presses.
|
||||
* Don't deal with the Caps_Lock keysym directly, but check the lock modifier
|
||||
*/
|
||||
|
||||
if (keyc->modifierMap[keycode] & LockMask)
|
||||
changeLock = CAPSFLAG;
|
||||
if (keysym[0] == XK_Num_Lock)
|
||||
changeLock = NUMFLAG;
|
||||
if (keysym[0] == XK_Scroll_Lock)
|
||||
changeLock = SCROLLFLAG;
|
||||
if (keysym[1] == XF86XK_ModeLock)
|
||||
changeLock = MODEFLAG;
|
||||
|
||||
if (changeLock) {
|
||||
if (!down)
|
||||
return;
|
||||
|
||||
pKbd->keyLeds &= ~changeLock;
|
||||
|
||||
if (KeyPressed(keycode)) {
|
||||
down = !down;
|
||||
} else {
|
||||
pKbd->keyLeds |= changeLock;
|
||||
}
|
||||
UpdateLeds(pInfo);
|
||||
}
|
||||
|
||||
if (!pKbd->CustomKeycodes) {
|
||||
/*
|
||||
* normal, non-keypad keys
|
||||
*/
|
||||
if (scanCode < KEY_KP_7 || scanCode > KEY_KP_Decimal) {
|
||||
#if !defined(CSRG_BASED) && \
|
||||
!defined(__GNU__) && \
|
||||
defined(KB_84)
|
||||
/*
|
||||
* magic ALT_L key on AT84 keyboards for multilingual support
|
||||
*/
|
||||
if (pKbd->kbdType == KB_84 &&
|
||||
ModifierDown(AltMask) &&
|
||||
keysym[2] != NoSymbol)
|
||||
{
|
||||
UsePrefix = TRUE;
|
||||
}
|
||||
#endif /* !CSRG_BASED && ... */
|
||||
}
|
||||
}
|
||||
#ifdef XKB
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* check for an autorepeat-event
|
||||
*/
|
||||
if (down && KeyPressed(keycode)) {
|
||||
int num = keycode >> 3;
|
||||
int bit = 1 << (keycode & 7);
|
||||
|
||||
if ((pKbd->autoRepeat != AutoRepeatModeOn) ||
|
||||
keyc->modifierMap[keycode] ||
|
||||
!(kbdfeed->ctrl.autoRepeats[num] & bit))
|
||||
return;
|
||||
}
|
||||
|
||||
if (UsePrefix) {
|
||||
xf86PostKeyboardEvent(device,
|
||||
keyc->modifierKeyMap[keyc->maxKeysPerModifier*7], TRUE);
|
||||
xf86PostKeyboardEvent(device, keycode, down);
|
||||
xf86PostKeyboardEvent(device,
|
||||
keyc->modifierKeyMap[keyc->maxKeysPerModifier*7], FALSE);
|
||||
} else {
|
||||
xf86PostKeyboardEvent(device, keycode, down);
|
||||
}
|
||||
xf86PostKeyboardEvent(device, scanCode + MIN_KEYCODE, down);
|
||||
}
|
||||
|
||||
ModuleInfoRec KbdInfo = {
|
||||
1,
|
||||
"KBD",
|
||||
NULL,
|
||||
0,
|
||||
KeyboardAvailableOptions,
|
||||
};
|
||||
|
||||
static void
|
||||
xf86KbdUnplug(pointer p)
|
||||
{
|
||||
@ -881,11 +530,6 @@ xf86KbdPlug(pointer module,
|
||||
int *errmaj,
|
||||
int *errmin)
|
||||
{
|
||||
static Bool Initialised = FALSE;
|
||||
|
||||
if (!Initialised)
|
||||
Initialised = TRUE;
|
||||
|
||||
xf86AddInputDriver(&KBD, module, 0);
|
||||
|
||||
return module;
|
||||
|
@ -57,17 +57,6 @@ SetKbdLeds(InputInfoPtr pInfo, int leds)
|
||||
{
|
||||
int real_leds = 0;
|
||||
|
||||
#if defined (__sparc__)
|
||||
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
|
||||
if (pKbd->sunKbd) {
|
||||
if (leds & 0x08) real_leds |= XLED1;
|
||||
if (leds & 0x04) real_leds |= XLED3;
|
||||
if (leds & 0x02) real_leds |= XLED4;
|
||||
if (leds & 0x01) real_leds |= XLED2;
|
||||
leds = real_leds;
|
||||
real_leds = 0;
|
||||
}
|
||||
#endif /* defined (__sparc__) */
|
||||
#ifdef LED_CAP
|
||||
if (leds & XLED1) real_leds |= LED_CAP;
|
||||
if (leds & XLED2) real_leds |= LED_NUM;
|
||||
@ -84,7 +73,8 @@ SetKbdLeds(InputInfoPtr pInfo, int leds)
|
||||
static int
|
||||
GetKbdLeds(InputInfoPtr pInfo)
|
||||
{
|
||||
int real_leds, leds = 0;
|
||||
char real_leds;
|
||||
int leds = 0;
|
||||
|
||||
ioctl(pInfo->fd, KDGETLED, &real_leds);
|
||||
|
||||
@ -95,151 +85,6 @@ GetKbdLeds(InputInfoPtr pInfo)
|
||||
return(leds);
|
||||
}
|
||||
|
||||
static int
|
||||
KDKBDREP_ioctl_ok(int rate, int delay) {
|
||||
#if defined(KDKBDREP) && !defined(__sparc__)
|
||||
/* This ioctl is defined in <linux/kd.h> but is not
|
||||
implemented anywhere - must be in some m68k patches. */
|
||||
struct kbd_repeat kbdrep_s;
|
||||
|
||||
/* don't change, just test */
|
||||
kbdrep_s.LNX_KBD_PERIOD_NAME = -1;
|
||||
kbdrep_s.delay = -1;
|
||||
if (ioctl( xf86Info.consoleFd, KDKBDREP, &kbdrep_s )) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* do the change */
|
||||
if (rate == 0) /* switch repeat off */
|
||||
kbdrep_s.LNX_KBD_PERIOD_NAME = 0;
|
||||
else
|
||||
kbdrep_s.LNX_KBD_PERIOD_NAME = 10000 / rate; /* convert cps to msec */
|
||||
if (kbdrep_s.LNX_KBD_PERIOD_NAME < 1)
|
||||
kbdrep_s.LNX_KBD_PERIOD_NAME = 1;
|
||||
kbdrep_s.delay = delay;
|
||||
if (kbdrep_s.delay < 1)
|
||||
kbdrep_s.delay = 1;
|
||||
|
||||
if (ioctl( xf86Info.consoleFd, KDKBDREP, &kbdrep_s )) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1; /* success! */
|
||||
#else /* no KDKBDREP */
|
||||
return 0;
|
||||
#endif /* KDKBDREP */
|
||||
}
|
||||
|
||||
static int
|
||||
KIOCSRATE_ioctl_ok(int rate, int delay) {
|
||||
#ifdef KIOCSRATE
|
||||
struct kbd_rate kbdrate_s;
|
||||
int fd;
|
||||
|
||||
fd = open("/dev/kbd", O_RDONLY);
|
||||
if (fd == -1)
|
||||
return 0;
|
||||
|
||||
kbdrate_s.rate = (rate + 5) / 10; /* must be integer, so round up */
|
||||
kbdrate_s.delay = delay * HZ / 1000; /* convert ms to Hz */
|
||||
if (kbdrate_s.rate > 50)
|
||||
kbdrate_s.rate = 50;
|
||||
|
||||
if (ioctl( fd, KIOCSRATE, &kbdrate_s )) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
close( fd );
|
||||
|
||||
return 1;
|
||||
#else /* no KIOCSRATE */
|
||||
return 0;
|
||||
#endif /* KIOCSRATE */
|
||||
}
|
||||
|
||||
#undef rate
|
||||
|
||||
static void
|
||||
SetKbdRepeat(InputInfoPtr pInfo, char rad)
|
||||
{
|
||||
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
|
||||
int i;
|
||||
int timeout;
|
||||
int value = 0x7f; /* Maximum delay with slowest rate */
|
||||
|
||||
#ifdef __sparc__
|
||||
int rate = 500; /* Default rate */
|
||||
int delay = 200; /* Default delay */
|
||||
#else
|
||||
int rate = 300; /* Default rate */
|
||||
int delay = 250; /* Default delay */
|
||||
#endif
|
||||
|
||||
static int valid_rates[] = { 300, 267, 240, 218, 200, 185, 171, 160, 150,
|
||||
133, 120, 109, 100, 92, 86, 80, 75, 67,
|
||||
60, 55, 50, 46, 43, 40, 37, 33, 30, 27,
|
||||
25, 23, 21, 20 };
|
||||
#define RATE_COUNT (sizeof( valid_rates ) / sizeof( int ))
|
||||
|
||||
static int valid_delays[] = { 250, 500, 750, 1000 };
|
||||
#define DELAY_COUNT (sizeof( valid_delays ) / sizeof( int ))
|
||||
|
||||
if (pKbd->rate >= 0)
|
||||
rate = pKbd->rate * 10;
|
||||
if (pKbd->delay >= 0)
|
||||
delay = pKbd->delay;
|
||||
|
||||
if(KDKBDREP_ioctl_ok(rate, delay)) /* m68k? */
|
||||
return;
|
||||
|
||||
if(KIOCSRATE_ioctl_ok(rate, delay)) /* sparc? */
|
||||
return;
|
||||
|
||||
if (xf86IsPc98())
|
||||
return;
|
||||
|
||||
#if defined(__alpha__) || defined (__i386__) || defined(__ia64__)
|
||||
|
||||
if (!xorgHWAccess) {
|
||||
if (xf86EnableIO())
|
||||
xorgHWAccess = TRUE;
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
/* The ioport way */
|
||||
|
||||
for (i = 0; i < RATE_COUNT; i++)
|
||||
if (rate >= valid_rates[i]) {
|
||||
value &= 0x60;
|
||||
value |= i;
|
||||
break;
|
||||
}
|
||||
|
||||
for (i = 0; i < DELAY_COUNT; i++)
|
||||
if (delay <= valid_delays[i]) {
|
||||
value &= 0x1f;
|
||||
value |= i << 5;
|
||||
break;
|
||||
}
|
||||
|
||||
timeout = KBC_TIMEOUT;
|
||||
while (((inb(0x64) & 2) == 2) && --timeout)
|
||||
usleep(1000); /* wait */
|
||||
|
||||
if (timeout == 0)
|
||||
return;
|
||||
|
||||
outb(0x60, 0xf3); /* set typematic rate */
|
||||
while (((inb(0x64) & 2) == 2) && --timeout)
|
||||
usleep(1000); /* wait */
|
||||
|
||||
usleep(10000);
|
||||
outb(0x60, value);
|
||||
|
||||
#endif /* __alpha__ || __i386__ || __ia64__ */
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
int kbdtrans;
|
||||
struct termios kbdtty;
|
||||
@ -302,83 +147,6 @@ KbdOff(InputInfoPtr pInfo, int what)
|
||||
return Success;
|
||||
}
|
||||
|
||||
static int
|
||||
GetSpecialKey(InputInfoPtr pInfo, int scanCode)
|
||||
{
|
||||
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
|
||||
int specialkey = scanCode;
|
||||
|
||||
#if defined (__sparc__)
|
||||
if (pKbd->sunKbd) {
|
||||
switch (scanCode) {
|
||||
case 0x2b: specialkey = KEY_BackSpace; break;
|
||||
case 0x47: specialkey = KEY_KP_Minus; break;
|
||||
case 0x7d: specialkey = KEY_KP_Plus; break;
|
||||
/* XXX needs cases for KEY_KP_Divide and KEY_KP_Multiply */
|
||||
case 0x05: specialkey = KEY_F1; break;
|
||||
case 0x06: specialkey = KEY_F2; break;
|
||||
case 0x08: specialkey = KEY_F3; break;
|
||||
case 0x0a: specialkey = KEY_F4; break;
|
||||
case 0x0c: specialkey = KEY_F5; break;
|
||||
case 0x0e: specialkey = KEY_F6; break;
|
||||
case 0x10: specialkey = KEY_F7; break;
|
||||
case 0x11: specialkey = KEY_F8; break;
|
||||
case 0x12: specialkey = KEY_F9; break;
|
||||
case 0x07: specialkey = KEY_F10; break;
|
||||
case 0x09: specialkey = KEY_F11; break;
|
||||
case 0x0b: specialkey = KEY_F12; break;
|
||||
default: specialkey = 0; break;
|
||||
}
|
||||
return specialkey;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (pKbd->CustomKeycodes) {
|
||||
specialkey = pKbd->specialMap->map[scanCode];
|
||||
}
|
||||
return specialkey;
|
||||
}
|
||||
|
||||
#define ModifierSet(k) ((modifiers & (k)) == (k))
|
||||
|
||||
static
|
||||
Bool SpecialKey(InputInfoPtr pInfo, int key, Bool down, int modifiers)
|
||||
{
|
||||
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
|
||||
|
||||
if(!pKbd->vtSwitchSupported)
|
||||
return FALSE;
|
||||
|
||||
if ((ModifierSet(ControlMask | AltMask)) ||
|
||||
(ModifierSet(ControlMask | AltLangMask))) {
|
||||
if (VTSwitchEnabled && !xf86Info.vtSysreq && !xf86Info.dontVTSwitch) {
|
||||
switch (key) {
|
||||
case KEY_F1:
|
||||
case KEY_F2:
|
||||
case KEY_F3:
|
||||
case KEY_F4:
|
||||
case KEY_F5:
|
||||
case KEY_F6:
|
||||
case KEY_F7:
|
||||
case KEY_F8:
|
||||
case KEY_F9:
|
||||
case KEY_F10:
|
||||
if (down) {
|
||||
ioctl(xf86Info.consoleFd, VT_ACTIVATE, key - KEY_F1 + 1);
|
||||
return TRUE;
|
||||
}
|
||||
case KEY_F11:
|
||||
case KEY_F12:
|
||||
if (down) {
|
||||
ioctl(xf86Info.consoleFd, VT_ACTIVATE, key - KEY_F11 + 11);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
stdReadInput(InputInfoPtr pInfo)
|
||||
{
|
||||
@ -453,12 +221,9 @@ xf86OSKbdPreInit(InputInfoPtr pInfo)
|
||||
pKbd->Bell = SoundBell;
|
||||
pKbd->SetLeds = SetKbdLeds;
|
||||
pKbd->GetLeds = GetKbdLeds;
|
||||
pKbd->SetKbdRepeat = SetKbdRepeat;
|
||||
pKbd->KbdGetMapping = KbdGetMapping;
|
||||
pKbd->SpecialKey = SpecialKey;
|
||||
|
||||
pKbd->RemapScanCode = NULL;
|
||||
pKbd->GetSpecialKey = GetSpecialKey;
|
||||
|
||||
pKbd->OpenKeyboard = OpenKeyboard;
|
||||
pKbd->vtSwitchSupported = FALSE;
|
||||
|
@ -334,64 +334,6 @@ KbdOff(InputInfoPtr pInfo, int what)
|
||||
return Success;
|
||||
}
|
||||
|
||||
static int
|
||||
GetSpecialKey(InputInfoPtr pInfo, int scanCode)
|
||||
{
|
||||
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
|
||||
int specialkey = scanCode;
|
||||
|
||||
if (pKbd->CustomKeycodes) {
|
||||
specialkey = pKbd->specialMap->map[scanCode];
|
||||
}
|
||||
return specialkey;
|
||||
}
|
||||
|
||||
#define ModifierSet(k) ((modifiers & (k)) == (k))
|
||||
|
||||
static Bool
|
||||
SpecialKey(InputInfoPtr pInfo, int key, Bool down, int modifiers)
|
||||
{
|
||||
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
|
||||
|
||||
if(!pKbd->vtSwitchSupported)
|
||||
return FALSE;
|
||||
|
||||
if ((!ModifierSet(ShiftMask)) && ((ModifierSet(ControlMask | AltMask)) ||
|
||||
(ModifierSet(ControlMask | AltLangMask)))) {
|
||||
if (VTSwitchEnabled && !xf86Info.vtSysreq) {
|
||||
switch (key) {
|
||||
case KEY_F1:
|
||||
case KEY_F2:
|
||||
case KEY_F3:
|
||||
case KEY_F4:
|
||||
case KEY_F5:
|
||||
case KEY_F6:
|
||||
case KEY_F7:
|
||||
case KEY_F8:
|
||||
case KEY_F9:
|
||||
case KEY_F10:
|
||||
if (down) {
|
||||
int sts = key - KEY_F1;
|
||||
if (sts != xf86Info.vtno) {
|
||||
ioctl(pInfo->fd, VT_ACTIVATE, sts);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
case KEY_F11:
|
||||
case KEY_F12:
|
||||
if (down) {
|
||||
int sts = key - KEY_F11 + 10;
|
||||
if (sts != xf86Info.vtno) {
|
||||
ioctl(pInfo->fd, VT_ACTIVATE, sts);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
stdReadInput(InputInfoPtr pInfo)
|
||||
{
|
||||
@ -469,8 +411,6 @@ xf86OSKbdPreInit(InputInfoPtr pInfo)
|
||||
pKbd->GetLeds = GetKbdLeds;
|
||||
pKbd->SetKbdRepeat = SetKbdRepeat;
|
||||
pKbd->KbdGetMapping = KbdGetMapping;
|
||||
pKbd->SpecialKey = SpecialKey;
|
||||
pKbd->GetSpecialKey = GetSpecialKey;
|
||||
pKbd->OpenKeyboard = OpenKeyboard;
|
||||
pKbd->RemapScanCode = ATScancode;
|
||||
pKbd->vtSwitchSupported = FALSE;
|
||||
|
@ -22,7 +22,7 @@
|
||||
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
/* Copyright 2004-2007 Sun Microsystems, Inc. All rights reserved.
|
||||
/* Copyright 2004-2009 Sun Microsystems, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
@ -63,6 +63,12 @@
|
||||
#include <sys/stropts.h>
|
||||
#include <sys/vuid_event.h>
|
||||
#include <sys/kbd.h>
|
||||
#include <sys/note.h> /* needed before including older versions of hid.h */
|
||||
#include <sys/usb/clients/hid/hid.h>
|
||||
|
||||
static int KbdOn(InputInfoPtr pInfo, int what);
|
||||
static Bool OpenKeyboard(InputInfoPtr pInfo);
|
||||
static void CloseKeyboard(InputInfoPtr pInfo);
|
||||
|
||||
static void
|
||||
sunKbdSetLeds(InputInfoPtr pInfo, int leds)
|
||||
@ -105,6 +111,7 @@ KbdInit(InputInfoPtr pInfo, int what)
|
||||
int ktype, klayout, i;
|
||||
const char *ktype_name;
|
||||
|
||||
priv->kbdActive = FALSE;
|
||||
priv->otranslation = -1;
|
||||
priv->odirect = -1;
|
||||
|
||||
@ -114,15 +121,11 @@ KbdInit(InputInfoPtr pInfo, int what)
|
||||
priv->strmod = NULL;
|
||||
}
|
||||
|
||||
if (priv->strmod) {
|
||||
SYSCALL(i = ioctl(pInfo->fd, I_PUSH, priv->strmod));
|
||||
if (i < 0) {
|
||||
xf86Msg(X_ERROR,
|
||||
"%s: cannot push module '%s' onto keyboard device: %s\n",
|
||||
pInfo->name, priv->strmod, strerror(errno));
|
||||
}
|
||||
i = KbdOn(pInfo, DEVICE_INIT);
|
||||
if (i != Success) {
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
SYSCALL(i = ioctl(pInfo->fd, KIOCTYPE, &ktype));
|
||||
if (i < 0) {
|
||||
xf86Msg(X_ERROR, "%s: Unable to determine keyboard type: %s\n",
|
||||
@ -155,7 +158,6 @@ KbdInit(InputInfoPtr pInfo, int what)
|
||||
xf86Msg(X_PROBED, "%s: Keyboard layout: %d\n", pInfo->name, klayout);
|
||||
|
||||
priv->ktype = ktype;
|
||||
priv->oleds = sunKbdGetLeds(pInfo);
|
||||
|
||||
return Success;
|
||||
}
|
||||
@ -168,8 +170,41 @@ KbdOn(InputInfoPtr pInfo, int what)
|
||||
sunKbdPrivPtr priv = (sunKbdPrivPtr) pKbd->private;
|
||||
|
||||
int ktrans, kdirect, i;
|
||||
int io_get_direct = KIOCGDIRECT;
|
||||
int io_set_direct = KIOCSDIRECT;
|
||||
|
||||
SYSCALL(i = ioctl(pInfo->fd, KIOCGDIRECT, &kdirect));
|
||||
if (priv->kbdActive) {
|
||||
return Success;
|
||||
}
|
||||
|
||||
if (pInfo->fd == -1) {
|
||||
if (!OpenKeyboard(pInfo)) {
|
||||
return BadImplementation;
|
||||
}
|
||||
}
|
||||
|
||||
if (priv->strmod) {
|
||||
/* Check to see if module is already pushed */
|
||||
SYSCALL(i = ioctl(pInfo->fd, I_FIND, priv->strmod));
|
||||
|
||||
if (i == 0) { /* Not already pushed */
|
||||
SYSCALL(i = ioctl(pInfo->fd, I_PUSH, priv->strmod));
|
||||
if (i < 0) {
|
||||
xf86Msg(X_ERROR, "%s: cannot push module '%s' onto "
|
||||
"keyboard device: %s\n",
|
||||
pInfo->name, priv->strmod, strerror(errno));
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HIDIOCKMSDIRECT
|
||||
if (strcmp(priv->strmod, "usbkbm") == 0) {
|
||||
io_get_direct = HIDIOCKMGDIRECT;
|
||||
io_set_direct = HIDIOCKMSDIRECT;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
SYSCALL(i = ioctl(pInfo->fd, io_get_direct, &kdirect));
|
||||
if (i < 0) {
|
||||
xf86Msg(X_ERROR,
|
||||
"%s: Unable to determine keyboard direct setting: %s\n",
|
||||
@ -180,7 +215,7 @@ KbdOn(InputInfoPtr pInfo, int what)
|
||||
priv->odirect = kdirect;
|
||||
kdirect = 1;
|
||||
|
||||
SYSCALL(i = ioctl(pInfo->fd, KIOCSDIRECT, &kdirect));
|
||||
SYSCALL(i = ioctl(pInfo->fd, io_set_direct, &kdirect));
|
||||
if (i < 0) {
|
||||
xf86Msg(X_ERROR, "%s: Failed turning keyboard direct mode on: %s\n",
|
||||
pInfo->name, strerror(errno));
|
||||
@ -207,6 +242,13 @@ KbdOn(InputInfoPtr pInfo, int what)
|
||||
return BadImplementation;
|
||||
}
|
||||
|
||||
priv->oleds = sunKbdGetLeds(pInfo);
|
||||
|
||||
/* Allocate here so we don't alloc in ReadInput which may be called
|
||||
from SIGIO handler. */
|
||||
priv->remove_timer = TimerSet(priv->remove_timer, 0, 0, NULL, NULL);
|
||||
|
||||
priv->kbdActive = TRUE;
|
||||
return Success;
|
||||
}
|
||||
|
||||
@ -217,6 +259,21 @@ KbdOff(InputInfoPtr pInfo, int what)
|
||||
sunKbdPrivPtr priv = (sunKbdPrivPtr) pKbd->private;
|
||||
|
||||
int i;
|
||||
int io_set_direct, kdirect;
|
||||
|
||||
if (priv->remove_timer) {
|
||||
TimerFree(priv->remove_timer);
|
||||
priv->remove_timer = NULL;
|
||||
}
|
||||
|
||||
if (!priv->kbdActive) {
|
||||
return Success;
|
||||
}
|
||||
|
||||
if (pInfo->fd == -1) {
|
||||
priv->kbdActive = FALSE;
|
||||
return Success;
|
||||
}
|
||||
|
||||
/* restore original state */
|
||||
|
||||
@ -236,8 +293,18 @@ KbdOff(InputInfoPtr pInfo, int what)
|
||||
priv->otranslation = -1;
|
||||
}
|
||||
|
||||
if (priv->odirect != -1) {
|
||||
SYSCALL(i = ioctl(pInfo->fd, KIOCSDIRECT, &priv->odirect));
|
||||
io_set_direct = KIOCSDIRECT;
|
||||
kdirect = priv->odirect;
|
||||
|
||||
#ifdef HIDIOCKMSDIRECT
|
||||
if ((priv->strmod != NULL) && (strcmp(priv->strmod, "usbkbm") == 0)) {
|
||||
io_set_direct = HIDIOCKMSDIRECT;
|
||||
kdirect = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (kdirect != -1) {
|
||||
SYSCALL(i = ioctl(pInfo->fd, io_set_direct, &kdirect));
|
||||
if (i < 0) {
|
||||
xf86Msg(X_ERROR,
|
||||
"%s: Unable to restore keyboard direct setting: %s\n",
|
||||
@ -254,9 +321,9 @@ KbdOff(InputInfoPtr pInfo, int what)
|
||||
"%s: cannot pop module '%s' off keyboard device: %s\n",
|
||||
pInfo->name, priv->strmod, strerror(errno));
|
||||
}
|
||||
priv->strmod = NULL;
|
||||
}
|
||||
|
||||
CloseKeyboard(pInfo);
|
||||
return Success;
|
||||
}
|
||||
|
||||
@ -264,9 +331,6 @@ KbdOff(InputInfoPtr pInfo, int what)
|
||||
static void
|
||||
SoundKbdBell(InputInfoPtr pInfo, int loudness, int pitch, int duration)
|
||||
{
|
||||
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
|
||||
sunKbdPrivPtr priv = (sunKbdPrivPtr) pKbd->private;
|
||||
|
||||
int kbdCmd, i;
|
||||
#ifdef KIOCMKTONE
|
||||
int cycles;
|
||||
@ -356,20 +420,72 @@ SetKbdRepeat(InputInfoPtr pInfo, char rad)
|
||||
/* Nothing to do */
|
||||
}
|
||||
|
||||
static void
|
||||
CloseKeyboard(InputInfoPtr pInfo)
|
||||
{
|
||||
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
|
||||
sunKbdPrivPtr priv = (sunKbdPrivPtr) pKbd->private;
|
||||
|
||||
close(pInfo->fd);
|
||||
pInfo->fd = -1;
|
||||
priv->kbdActive = FALSE;
|
||||
}
|
||||
|
||||
/* Called from OsTimer callback, since removing a device from the device
|
||||
list or changing pInfo->fd while xf86Wakeup is looping through the list
|
||||
causes server crashes */
|
||||
static CARD32
|
||||
RemoveKeyboard(OsTimerPtr timer, CARD32 time, pointer arg)
|
||||
{
|
||||
InputInfoPtr pInfo = (InputInfoPtr) arg;
|
||||
|
||||
CloseKeyboard(pInfo);
|
||||
xf86DisableDevice(pInfo->dev, TRUE);
|
||||
|
||||
return 0; /* All done, don't set to run again */
|
||||
}
|
||||
|
||||
static void
|
||||
ReadInput(InputInfoPtr pInfo)
|
||||
{
|
||||
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
|
||||
sunKbdPrivPtr priv = (sunKbdPrivPtr) pKbd->private;
|
||||
Firm_event event[64];
|
||||
int nBytes, i;
|
||||
|
||||
/* I certainly hope its not possible to read partial events */
|
||||
|
||||
if ((nBytes = read(pInfo->fd, (char *)event, sizeof(event))) > 0)
|
||||
{
|
||||
for (i = 0; i < (nBytes / sizeof(Firm_event)); i++) {
|
||||
pKbd->PostEvent(pInfo, event[i].id & 0xFF,
|
||||
event[i].value == VKEY_DOWN ? TRUE : FALSE);
|
||||
while (TRUE) {
|
||||
/* I certainly hope it's not possible to read partial events */
|
||||
nBytes = read(pInfo->fd, (char *)event, sizeof(event));
|
||||
if (nBytes > 0) {
|
||||
for (i = 0; i < (nBytes / sizeof(Firm_event)); i++) {
|
||||
pKbd->PostEvent(pInfo, event[i].id & 0xFF,
|
||||
event[i].value == VKEY_DOWN ? TRUE : FALSE);
|
||||
}
|
||||
} else if (nBytes == -1) {
|
||||
switch (errno) {
|
||||
case EAGAIN: /* Nothing to read now */
|
||||
return;
|
||||
case EINTR: /* Interrupted, try again */
|
||||
break;
|
||||
case ENODEV: /* May happen when USB kbd is unplugged */
|
||||
/* We use X_NONE here because it doesn't alloc since we
|
||||
may be called from SIGIO handler */
|
||||
xf86MsgVerb(X_NONE, 0,
|
||||
"%s: Device no longer present - removing.\n",
|
||||
pInfo->name);
|
||||
xf86RemoveEnabledDevice(pInfo);
|
||||
priv->remove_timer = TimerSet(priv->remove_timer, 0, 1,
|
||||
RemoveKeyboard, pInfo);
|
||||
return;
|
||||
default: /* All other errors */
|
||||
/* We use X_NONE here because it doesn't alloc since we
|
||||
may be called from SIGIO handler */
|
||||
xf86MsgVerb(X_NONE, 0, "%s: Read error: %s\n", pInfo->name,
|
||||
strerror(errno));
|
||||
return;
|
||||
}
|
||||
} else { /* nBytes == 0, so nothing more to read */
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -423,8 +539,6 @@ xf86OSKbdPreInit(InputInfoPtr pInfo)
|
||||
pKbd->KbdGetMapping = KbdGetMapping;
|
||||
|
||||
pKbd->RemapScanCode = NULL;
|
||||
pKbd->GetSpecialKey = NULL;
|
||||
pKbd->SpecialKey = NULL;
|
||||
|
||||
pKbd->OpenKeyboard = OpenKeyboard;
|
||||
|
||||
|
@ -36,6 +36,7 @@ typedef struct {
|
||||
int odirect; /* Original "direct" mode setting */
|
||||
int oleds; /* Original LED state */
|
||||
const char * strmod; /* Streams module pushed on kbd device */
|
||||
OsTimerPtr remove_timer; /* Callback for removal on ENODEV */
|
||||
} sunKbdPrivRec, *sunKbdPrivPtr;
|
||||
|
||||
/* sun_kbdMap.c */
|
||||
|
@ -36,10 +36,17 @@
|
||||
|
||||
/* Map the Solaris keycodes to the "XFree86" keycodes. */
|
||||
|
||||
/* Additional Sun Japanese Keyboard Keys not defined in common/atKeynames.h */
|
||||
/* Additional Sun Japanese Keyboard Keys not defined in atKeynames.h */
|
||||
#define KEY_Kanji 0x82
|
||||
#define KEY_Execute 0x83
|
||||
|
||||
/* Override atKeynames.h values with unique keycodes, so we can distinguish
|
||||
KEY_F15 from KEY_HKTG & KEY_KP_DEC from KEY_BSlash2 */
|
||||
#undef KEY_HKTG
|
||||
#define KEY_HKTG /* Hirugana/Katakana tog 0xC8 */ 200 /* was 112 */
|
||||
#undef KEY_BSlash2
|
||||
#define KEY_BSlash2 /* \ _ 0xCB */ 203 /* was 115 */
|
||||
|
||||
static unsigned char sunmap[256] = {
|
||||
#if defined(i386) || defined(__i386) || defined(__i386__) || defined(__x86)
|
||||
KEY_NOTUSED, /* 0 */
|
||||
@ -571,7 +578,6 @@ KbdGetMapping (InputInfoPtr pInfo, KeySymsPtr pKeySyms, CARD8 *pModMap)
|
||||
{
|
||||
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
|
||||
sunKbdPrivPtr priv = (sunKbdPrivPtr) pKbd->private;
|
||||
const unsigned char *keymap;
|
||||
int i;
|
||||
KeySym *k;
|
||||
|
||||
|
@ -173,8 +173,7 @@ static KeySym map[NUM_KEYCODES * GLYPHS_PER_KEY] = {
|
||||
!defined(linux) && \
|
||||
!defined(CSRG_BASED) && \
|
||||
!defined(__CYGWIN__) && \
|
||||
!defined(__SOL8__) && \
|
||||
(!defined(sun) || defined(i386))
|
||||
!defined(sun)
|
||||
|
||||
static KeySym map84[NUM_KEYCODES * GLYPHS_PER_KEY] = {
|
||||
/* 0x00 */ NoSymbol, NoSymbol, NoSymbol, NoSymbol,
|
||||
|
@ -43,9 +43,6 @@ typedef int (*GetLedsProc)(InputInfoPtr pInfo);
|
||||
typedef void (*SetKbdRepeatProc)(InputInfoPtr pInfo, char rad);
|
||||
typedef void (*KbdGetMappingProc)(InputInfoPtr pInfo,
|
||||
KeySymsPtr pKeySyms, CARD8* pModMap);
|
||||
typedef int (*GetSpecialKeyProc)(InputInfoPtr pInfo, int scanCode);
|
||||
typedef Bool (*SpecialKeyProc)(InputInfoPtr pInfo,
|
||||
int key, Bool down, int modifiers);
|
||||
typedef int (*RemapScanCodeProc)(InputInfoPtr pInfo, int *scanCode);
|
||||
typedef Bool (*OpenKeyboardProc)(InputInfoPtr pInfo);
|
||||
typedef void (*PostEventProc)(InputInfoPtr pInfo,
|
||||
@ -66,24 +63,18 @@ typedef struct {
|
||||
SetKbdRepeatProc SetKbdRepeat;
|
||||
KbdGetMappingProc KbdGetMapping;
|
||||
RemapScanCodeProc RemapScanCode;
|
||||
GetSpecialKeyProc GetSpecialKey;
|
||||
SpecialKeyProc SpecialKey;
|
||||
|
||||
OpenKeyboardProc OpenKeyboard;
|
||||
PostEventProc PostEvent;
|
||||
|
||||
int rate;
|
||||
int delay;
|
||||
int bell_pitch;
|
||||
int bell_duration;
|
||||
Bool autoRepeat;
|
||||
unsigned long leds;
|
||||
unsigned long xledsMask;
|
||||
unsigned long keyLeds;
|
||||
int scanPrefix;
|
||||
Bool vtSwitchSupported;
|
||||
Bool CustomKeycodes;
|
||||
Bool noXkb;
|
||||
Bool isConsole;
|
||||
TransMapPtr scancodeMap;
|
||||
TransMapPtr specialMap;
|
||||
@ -93,8 +84,6 @@ typedef struct {
|
||||
int kbdType;
|
||||
int consType;
|
||||
int wsKbdType;
|
||||
Bool sunKbd;
|
||||
Bool Panix106;
|
||||
|
||||
} KbdDevRec, *KbdDevPtr;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user