update to xf86-input-keyboard 1.5.0

Tested by ajacoutot@, shadchin@, jasper@ and landry@. Thanks.
This commit is contained in:
matthieu 2010-11-27 14:41:06 +00:00
parent 05303600f5
commit da250ff15b
30 changed files with 1619 additions and 2894 deletions

View File

@ -202,29 +202,23 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Copyright 2004-2007 Sun Microsystems, Inc. All rights reserved.
Copyright (c) 2004-2009, Oracle and/or its affiliates. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, and/or sell copies of the Software, and to permit persons
to whom the Software is furnished to do so, provided that the above
copyright notice(s) and this permission notice appear in all copies of
the Software and that both the above copyright notice(s) and this
permission notice appear in supporting documentation.
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
Except as contained in this notice, the name of a copyright holder
shall not be used in advertising or otherwise to promote the sale, use
or other dealings in this Software without prior written authorization
of the copyright holder.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

View File

@ -1,3 +1,453 @@
commit 90f69d7b859caff9f51b6fe20580582a91ed6d0d
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Oct 30 09:15:11 2010 -0700
xf86-input-keyboard 1.5.0
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 53f3eb734fe4dfccbce602b3dd19ee06e0850c44
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Oct 30 09:13:47 2010 -0700
Sun's copyrights now belong to Oracle
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 251c5d6dcc09c46be67274853e79026cc3d10fd4
Author: Trevor Woerner <twoerner@gmail.com>
Date: Mon Oct 18 11:38:48 2010 -0400
Code cleanup, structure initialization.
The InputDriverRec data structure in xserver/hw/xfree86/common/xf86Xinput.h
no longer contains an integer refCount member.
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit 25d1e340eec73b010c4a5b1160aa0fa762a41cd0
Author: Trevor Woerner <twoerner@gmail.com>
Date: Mon Oct 18 11:38:28 2010 -0400
Deprecated code cleanup.
Replace calls to deprecated functions with calls to standard dynamic
memory functions in driver code.
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit ed3458c0b534a15777b7305cd594e1f9181c80b8
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri Jun 18 14:37:44 2010 +1000
Don't set AutoRepeat if we're not actually using it.
Autorepeat was removed from the driver with version 1.4.0. So there is not
much point in setting this option anymore.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 3a8bae0fd2275a6dc62a88072b2a3a651840326c
Author: Jesse Adkins <jesserayadkins@gmail.com>
Date: Tue Sep 28 13:29:50 2010 -0700
Purge cvs tags.
Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 66b222493b3af6b7fc200d8a296317e9f3e1820a
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Aug 14 01:11:53 2010 -0700
Revert "Close device fd when called with DEVICE_CLOSE"
This reverts commit f8e219828db920c4cd7a2645a6194de029dc9bb5.
(Sorry, failed to finish rebase operation to remove before pushing.
As noted on xorg-devel, this patch was originally made for 1.3.2
and needs to be reworked to reflect later upstream changes.)
commit 2aaef2754215d1a9f1073ad32f2ba498ce12188a
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri Aug 13 11:25:34 2010 +1000
Remove unused keyboardOptions.
These have been unused since May 2009 when the struct that used them was
removed from the driver. See fe8d1f70fc7edce4f030766159aebae8f8a89ffc.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit 425c1280439fe37497a33c47b5a8432e59cbfb76
Author: Osamu Sayama <osamu.sayama@oracle.com>
Date: Wed Aug 11 19:00:23 2010 -0700
sun_kbd: Add mappings for Hangul and Hanja keys on Korean keyboard
Fixes Sun bug 6897086:
Hangul and Hanja keys on Korean PC 105 keyboard are not recognized
http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6897086
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit f8e219828db920c4cd7a2645a6194de029dc9bb5
Author: Aaron Zang <aaron.zang@sun.com>
Date: Wed Aug 11 18:55:59 2010 -0700
Close device fd when called with DEVICE_CLOSE
Fixes Solaris bug 6886424:
VT - keyboard and mouse do not work when switching to vt7
http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6886424
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit bfb1b7a319eab8e13542cfc00b8407121eabb4d5
Author: Fernando Carrijo <fcarrijo@yahoo.com.br>
Date: Thu Jul 1 07:12:02 2010 -0300
Purge macro NEED_EVENTS
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 1c05b48f976d89519a327c791a9a2bd7149ad581
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Wed Jun 16 16:00:01 2010 -0400
config: restore inputdir automake variable
All input drivers use this variable to set the installation
path of the input module. For this driver, it was changed
in commit 708ecbf8557d9e676e3bb07c1f83170f6d9f7cd7.
One way or another is fine, but breaking a pattern is error prone.
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
commit 2fb99e01f44f7c1dad3fedb0422f2ae39cbd5e49
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Fri Jun 11 13:57:13 2010 -0400
config: use AC_PROG_INSTALL now supplied by XORG_DEFAULT_OPTIONS
It depends on util-macros 1.8
The existing statement can now be removed from the configuration file.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
commit b58f64eb53b5d9a2e116d23c0aee6f1c9079cfa7
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Fri Jun 11 11:53:46 2010 -0400
config: use AC_PROG_SED now supplied by XORG_MANPAGE_SECTIONS
It depends on util-macros 1.8
The existing statement can now be removed from the configuration file.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
commit 53d1fdd3a716ebcee0e75e0097106ff25db38498
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Thu May 27 22:01:55 2010 -0400
config: upgrade to util-macros 1.8 for additional man page support
Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
The value of MAN_SUBST is the same for all X.Org packages.
Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
commit 652bf3657b116af2d012116b15d01a8bb23e7850
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Wed May 12 10:59:49 2010 -0400
config: fix warnings, m4 quoting and layout
Fix some m4 quoting
Fix some autoconf warnings
remove AC_PROG_CC as it overrides AC_PROG_C_C99 from XORG_DEFAULT_OPTIONS
Regroup statements per section
Add comments
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
commit 613b44eb0878adf05a9bb4af01c84766ab5828d2
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Wed May 12 10:55:11 2010 -0400
config: remove unrequired AC_HEADER_STDC
Autoconf says:
"This macro is obsolescent, as current systems have conforming
header files. New programs need not use this macro".
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
commit 0aa1afb5b1e52c7e945b3a010372362c3157533b
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Mon May 10 17:36:14 2010 -0400
config: move inputproto check to PKG_CHECK_MODULES
The XORG_DRIVER_CHECK_EXT macro conditionally adds inputproto
to PKG_CHECK_MODULES if this extension is defined in xorg-server.h.
It allows a module to use ifdef XINPUT if the extension is available.
In this module, the extension is required and not optional.
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
commit 9a93f9c5ad7c3ddf226dfdc987e60c580b6e0912
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Mon May 10 17:35:37 2010 -0400
config: remove extension check for unused RANDR extension
The randr protocol is not used, no randr*.h are included.
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
commit 2b491ed2339047f906e3008c085411da851b87cd
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Mon May 10 17:14:44 2010 -0400
config: remove extension check for non-existing XKB extension
This extension name does not exist in xorg-server.h and
cannot be used in XORG_DRIVER_CHECK_EXT.
Further more, headers from kbproto are not used.
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
commit 0ac76bf1a0d5e6b34a89682f1b20f62575ef2389
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Mon May 10 15:54:08 2010 -0400
config: Upgrade X.Org macros to 1.4 for INSTALL file copying
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
commit 1cb8dd780e18283d3dffaff076dd63452573a198
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Mon May 10 15:51:19 2010 -0400
config: remove AC_PROG_CC as it overrides AC_PROG_C_C99
XORG_STRICT_OPTION from XORG_DEFAULT_OPTIONS calls
AC_PROG_C_C99. This sets gcc with -std=gnu99.
If AC_PROG_CC macro is called afterwards, it resets CC to gcc.
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
commit b89c71e7e956d35f2989d419b1076e8bd6f90e34
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Mon May 10 15:50:34 2010 -0400
config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS
Regroup AC statements at the top.
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
commit 367c39341e2bf063c0d5f25aa1b51a897281ad57
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Mon May 10 15:47:14 2010 -0400
config: update AC_PREREQ statement to 2.60
Unrelated to the previous patches, the new value simply reflects
the reality that the minimum level for autoconf to configure
all x.org modules is 2.60 dated June 2006.
ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
commit db1e92685155f25dbff3aaac6b7045ad68fe441a
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Sat Apr 10 10:16:06 2010 -0400
config: LNX_KBD_PERIOD_NAME not used since autorepeat was removed
In commit ae630aef17185dd8d2c23d0eb1b3287fa6e26268,
the autorepeat feature was removed which was the only
user of LNX_KBD_PERIOD_NAME.
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
commit cee8a4241c86a00b90b74428473680cb022a8b7f
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Mon May 10 11:40:06 2010 -0400
Remove unused SCO driver files
The SCO driver has never been enabled since the original commit
95e5d2521fc39a661e13b313e5aa2514ddac9a5e.
The configure.ac file never sets the IS_SCO variable.
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
commit 6b7655d6ea0115ea6edabd26aa0bcf0241ab0740
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Sat May 8 13:37:07 2010 -0400
Missing #ifdef for PCCONS
PCCONS support is not always present and should be condiontally compiled.
Refer to xserver definition of PCCONS_SUPPORT
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
commit d307dc016485f2811d2d722285a3a6c8a7f8cf12
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Sat May 8 10:41:19 2010 -0400
config: remove AH_TOP autoheader statement
The generated config.h does not need to include xorg-server.h
for the content it provides.
Add #include <xorg-server.h> in .[hc] files as needed.
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
commit 2dc73fa6308b2ea01b82744a44f8c5c11bfca538
Author: Julien Cristau <jcristau@debian.org>
Date: Sat Mar 13 12:04:24 2010 +0100
man: the old xkb options are gone
The kbd manpage mentions the existence of other, undocumented xkb
options (those allowing to set keycodes/types/compat/symbols/geometry).
These options are gone as of commit 62e663e (Switch to new XKB API).
Signed-off-by: Julien Cristau <jcristau@debian.org>
commit daf147d10f9eb93c08c4ba0dfe4d61e87a41ddf3
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Thu Feb 11 10:08:07 2010 -0500
config: move CWARNFLAGS from configure.ac to Makefile.am
Compiler warning flags should be explicitly set in the makefile
rather than being merged with other packages compiler flags.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
commit 5e1dacfd0ce3298f8c3d7660af0f8ca995b867b2
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Fri Jan 15 15:58:07 2010 -0800
Update Sun license notices to current X.Org standard form
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
commit f6e6a09a14b43e01bd378ea0870a474b84b86594
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Tue Dec 15 22:01:02 2009 -0500
configure.ac: remove unused sdkdir=$(pkg-config...) statement
The sdkdir variable isn't use, so remove the statement.
Acked-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
commit 4f09bebe936dcad41a53d46d8c8e96337dd3edc4
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Wed Dec 16 18:14:59 2009 -0800
Silence sed substitutions in make output
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
commit cb635080a484f8e87ed1df5360112ec5e2ad7e88
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Mon Nov 23 09:25:05 2009 -0500
Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
Now that the INSTALL file is generated.
Allows running make maintainer-clean.
commit 25d30641812834919ec3d3ac8a13f225876b1979
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Wed Oct 28 14:41:41 2009 -0400
INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
Automake 'foreign' option is specified in configure.ac.
Remove from Makefile.am
commit c1ff277ae557a2d8967f7dd4b8a8af0031670076
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Wed Oct 28 14:09:09 2009 -0400
INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
Add missing INSTALL file. Use standard GNU file on building tarball
README may have been updated
Remove AUTHORS file as it is empty and no content available yet.
Remove NEWS file as it is empty and no content available yet.
commit b3da011aab766d62e39cc43a7aaf80d9fd20c840
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Tue Oct 27 08:48:14 2009 -0400
Deploy the new XORG_DEFAULT_OPTIONS #24242
Pre-req for generating INSTALL file
commit 5fa8e062b246971f478a0da5308fd8ac9743b606
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Mon Oct 26 12:54:20 2009 -0400
Several driver modules do not have a ChangeLog target in Makefile.am #23814
The git generated ChangeLog replaces the hand written one.
Update configure.ac to xorg-macros level 1.3.
Use XORG_DEFAULT_OPTIONS which replaces four XORG_* macros
Update Makefile.am to add ChangeLog target if missing
Remove ChangeLog from EXTRA_DIST or *CLEAN variables
This is a pre-req for the INSTALL_CMD
commit 42f1e73f04ceb10533361df8f2d5e82076c8b121
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Thu Oct 22 12:34:16 2009 -0400
.gitignore: use common defaults with custom section # 24239
Using common defaults will reduce errors and maintenance.
Only the very small or inexistent custom section need periodic maintenance
when the structure of the component changes. Do not edit defaults.
commit c66f4f9fcc7450f2c1378f6117bda4442d2af8ae
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed Oct 7 10:53:14 2009 +1000
keyboard 1.4.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit 0c75afb4895b60aa08209ccfee9dfad4e4495f4d
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Oct 6 17:02:33 2009 +1000

View File

@ -0,0 +1,291 @@
Installation Instructions
*************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
2006, 2007, 2008 Free Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. Caching is
disabled by default to prevent problems with accidental use of stale
cache files.
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You need `configure.ac' if
you want to change it or regenerate `configure' using a newer version
of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system.
Running `configure' might take a while. While running, it prints
some messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
6. Often, you can also type `make uninstall' to remove the installed
files again.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. Run `./configure --help'
for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c99 CFLAGS=-g LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you can use GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
With a non-GNU `make', it is safer to compile the package for one
architecture at a time in the source code directory. After you have
installed the package for one architecture, use `make distclean' before
reconfiguring for another architecture.
On MacOS X 10.5 and later systems, you can create libraries and
executables that work on multiple system types--known as "fat" or
"universal" binaries--by specifying multiple `-arch' options to the
compiler but only a single `-arch' option to the preprocessor. Like
this:
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CPP="gcc -E" CXXCPP="g++ -E"
This is not guaranteed to produce working output in all cases, you
may have to build one architecture at a time and combine the results
using the `lipo' tool if you have problems.
Installation Names
==================
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Particular systems
==================
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
CC is not installed, it is recommended to use the following options in
order to use an ANSI C compiler:
./configure CC="cc -Ae"
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
a workaround. If GNU CC is not installed, it is therefore recommended
to try
./configure CC="cc"
and if that doesn't work, try
./configure CC="cc -nodtk"
Specifying the System Type
==========================
There may be some features `configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
_same_ architectures, `configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script).
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
an Autoconf bug. Until the bug is fixed you can use this workaround:
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
======================
`configure' recognizes the following options to control how it
operates.
`--help'
`-h'
Print a summary of all of the options to `configure', and exit.
`--help=short'
`--help=recursive'
Print a summary of the options unique to this package's
`configure', and exit. The `short' variant lists options used
only in the top level, while the `recursive' variant lists options
also present in any nested packages.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--prefix=DIR'
Use DIR as the installation prefix. *Note Installation Names::
for more details, including other options available for fine-tuning
the installation locations.
`--no-create'
`-n'
Run the configure checks, but stop before creating any output
files.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.

View File

@ -18,16 +18,15 @@
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
AUTOMAKE_OPTIONS = foreign
SUBDIRS = src man
MAINTAINERCLEANFILES = ChangeLog INSTALL
EXTRA_DIST = ChangeLog
.PHONY: ChangeLog INSTALL
MAINTAINERCLEANFILES=ChangeLog
.PHONY: ChangeLog
INSTALL:
$(INSTALL_CMD)
ChangeLog:
$(CHANGELOG_CMD)
dist-hook: ChangeLog
dist-hook: ChangeLog INSTALL

View File

@ -57,7 +57,7 @@ build_triplet = @build@
host_triplet = @host@
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure COPYING ChangeLog config.guess \
$(top_srcdir)/configure COPYING ChangeLog INSTALL config.guess \
config.sub depcomp install-sh ltmain.sh missing
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@ -157,6 +157,7 @@ MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MAN_SUBSTS = @MAN_SUBSTS@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
NMEDIT = @NMEDIT@
@ -170,8 +171,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SCO_FALSE = @SCO_FALSE@
SCO_TRUE = @SCO_TRUE@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
@ -181,6 +180,7 @@ STRIP = @STRIP@
VERSION = @VERSION@
XORG_CFLAGS = @XORG_CFLAGS@
XORG_LIBS = @XORG_LIBS@
XORG_MAN_PAGE = @XORG_MAN_PAGE@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
@ -212,6 +212,7 @@ host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
inputdir = @inputdir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
@ -219,7 +220,6 @@ localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
moduledir = @moduledir@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
@ -229,10 +229,8 @@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
AUTOMAKE_OPTIONS = foreign
SUBDIRS = src man
EXTRA_DIST = ChangeLog
MAINTAINERCLEANFILES = ChangeLog
MAINTAINERCLEANFILES = ChangeLog INSTALL
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
@ -672,12 +670,15 @@ uninstall-info: uninstall-info-recursive
tags tags-recursive uninstall uninstall-am uninstall-info-am
.PHONY: ChangeLog
.PHONY: ChangeLog INSTALL
INSTALL:
$(INSTALL_CMD)
ChangeLog:
$(CHANGELOG_CMD)
dist-hook: ChangeLog
dist-hook: ChangeLog INSTALL
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -7134,18 +7134,6 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
])
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 8
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
@ -7633,7 +7621,7 @@ AC_SUBST([am__untar])
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 Copyright (c) 2005, 2006, Oracle and/or its affiliates. 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 "Software"),
@ -7670,7 +7658,7 @@ dnl DEALINGS IN THE SOFTWARE.
# See the "minimum version" comment for each macro you use to see what
# version you require.
m4_defun([XORG_MACROS_VERSION],[
m4_define([vers_have], [1.7.0])
m4_define([vers_have], [1.11.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,,
@ -7738,9 +7726,12 @@ AC_SUBST(RAWCPPFLAGS)
# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
# Not sure if there's any better way than just hardcoding by OS name.
# Override default settings by setting environment variables
# Added MAN_SUBSTS in version 1.8
# Added AC_PROG_SED in version 1.8
AC_DEFUN([XORG_MANPAGE_SECTIONS],[
AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AC_PROG_SED])
if test x$APP_MAN_SUFFIX = x ; then
APP_MAN_SUFFIX=1
@ -7809,31 +7800,58 @@ AC_SUBST([FILE_MAN_DIR])
AC_SUBST([MISC_MAN_DIR])
AC_SUBST([DRIVER_MAN_DIR])
AC_SUBST([ADMIN_MAN_DIR])
XORG_MAN_PAGE="X Version 11"
AC_SUBST([XORG_MAN_PAGE])
MAN_SUBSTS="\
-e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
-e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
-e 's|__xservername__|Xorg|g' \
-e 's|__xconfigfile__|xorg.conf|g' \
-e 's|__projectroot__|\$(prefix)|g' \
-e 's|__apploaddir__|\$(appdefaultdir)|g' \
-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
-e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
-e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
-e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
AC_SUBST([MAN_SUBSTS])
]) # XORG_MANPAGE_SECTIONS
# XORG_CHECK_SGML_DOCTOOLS
# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
# ------------------------
# 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])
AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
XORG_SGML_PATH=
PKG_CHECK_EXISTS([xorg-sgml-doctools],
PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
[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])
[m4_ifval([$1],[:],
[if test x"$cross_compiling" != x"yes" ; then
AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
[XORG_SGML_PATH=$prefix/share/sgml])
fi])
])
# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
# the path and the name of the doc stylesheet
if test "x$XORG_SGML_PATH" != "x" ; then
AC_MSG_RESULT([$XORG_SGML_PATH])
STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
else
AC_MSG_RESULT([no])
fi
AC_SUBST(XORG_SGML_PATH)
AC_SUBST(STYLESHEET_SRCDIR)
AC_SUBST(XSL_STYLESHEET)
AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
]) # XORG_CHECK_SGML_DOCTOOLS
# XORG_CHECK_LINUXDOC
@ -7846,9 +7864,9 @@ AC_SUBST(XORG_SGML_PATH)
# with the AM_CONDITIONAL "BUILD_LINUXDOC"
AC_DEFUN([XORG_CHECK_LINUXDOC],[
AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
AC_REQUIRE([XORG_WITH_PS2PDF])
AC_PATH_PROG(LINUXDOC, linuxdoc)
AC_PATH_PROG(PS2PDF, ps2pdf)
AC_MSG_CHECKING([whether to build documentation])
@ -7864,7 +7882,7 @@ AC_MSG_RESULT([$BUILDDOC])
AC_MSG_CHECKING([whether to build pdf documentation])
if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
BUILDPDFDOC=yes
else
BUILDPDFDOC=no
@ -7874,7 +7892,7 @@ AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
AC_MSG_RESULT([$BUILDPDFDOC])
MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
MAKE_PDF="$PS2PDF"
MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0"
@ -7949,15 +7967,17 @@ AC_SUBST(MAKE_PDF)
AC_SUBST(MAKE_HTML)
]) # XORG_CHECK_DOCBOOK
# XORG_WITH_XMLTO([MIN-VERSION])
# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
# ----------------
# Minimum version: 1.5.0
# Minimum version for optional DEFAULT argument: 1.11.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.
# as whether or not to use the xmlto package. When DEFAULT is not specified,
# --with-xmlto assumes 'auto'.
#
# Interface to module:
# HAVE_XMLTO: used in makefiles to conditionally generate documentation
@ -7966,14 +7986,20 @@ AC_SUBST(MAKE_HTML)
# --with-xmlto: 'yes' user instructs the module to use xmlto
# 'no' user instructs the module not to use xmlto
#
# Added in version 1.10.0
# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
# xmlto for text output requires either lynx, links, or w3m browsers
#
# 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])
m4_define([_defopt], m4_default([$2], [auto]))
AC_ARG_WITH(xmlto,
AS_HELP_STRING([--with-xmlto],
[Use xmlto to regenerate documentation (default: yes, if installed)]),
[use_xmlto=$withval], [use_xmlto=auto])
[Use xmlto to regenerate documentation (default: ]_defopt[)]),
[use_xmlto=$withval], [use_xmlto=]_defopt)
m4_undefine([_defopt])
if test "x$use_xmlto" = x"auto"; then
AC_PATH_PROG([XMLTO], [xmlto])
@ -7997,6 +8023,8 @@ elif test "x$use_xmlto" = x"no" ; then
else
AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
fi
# Test for a minimum version of xmlto, if provided.
m4_ifval([$1],
[if test "$have_xmlto" = yes; then
# scrape the xmlto version
@ -8011,18 +8039,31 @@ m4_ifval([$1],
AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
fi])
fi])
# Test for the ability of xmlto to generate a text target
have_xmlto_text=no
cat > conftest.xml << "EOF"
EOF
AS_IF([test "$have_xmlto" = yes],
[AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
[have_xmlto_text=yes],
[AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
rm -f conftest.xml
AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
]) # XORG_WITH_XMLTO
# XORG_WITH_ASCIIDOC([MIN-VERSION])
# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
# ----------------
# Minimum version: 1.5.0
# Minimum version for optional DEFAULT argument: 1.11.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.
# as whether or not to use the asciidoc package. When DEFAULT is not specified,
# --with-asciidoc assumes 'auto'.
#
# Interface to module:
# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
@ -8035,10 +8076,12 @@ AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
#
AC_DEFUN([XORG_WITH_ASCIIDOC],[
AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
m4_define([_defopt], m4_default([$2], [auto]))
AC_ARG_WITH(asciidoc,
AS_HELP_STRING([--with-asciidoc],
[Use asciidoc to regenerate documentation (default: yes, if installed)]),
[use_asciidoc=$withval], [use_asciidoc=auto])
[Use asciidoc to regenerate documentation (default: ]_defopt[)]),
[use_asciidoc=$withval], [use_asciidoc=]_defopt)
m4_undefine([_defopt])
if test "x$use_asciidoc" = x"auto"; then
AC_PATH_PROG([ASCIIDOC], [asciidoc])
@ -8079,15 +8122,17 @@ fi])
AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
]) # XORG_WITH_ASCIIDOC
# XORG_WITH_DOXYGEN([MIN-VERSION])
# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
# --------------------------------
# Minimum version: 1.5.0
# Minimum version for optional DEFAULT argument: 1.11.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.
# as whether or not to use the doxygen package. When DEFAULT is not specified,
# --with-doxygen assumes 'auto'.
#
# Interface to module:
# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
@ -8100,10 +8145,12 @@ AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
#
AC_DEFUN([XORG_WITH_DOXYGEN],[
AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
m4_define([_defopt], m4_default([$2], [auto]))
AC_ARG_WITH(doxygen,
AS_HELP_STRING([--with-doxygen],
[Use doxygen to regenerate documentation (default: yes, if installed)]),
[use_doxygen=$withval], [use_doxygen=auto])
[Use doxygen to regenerate documentation (default: ]_defopt[)]),
[use_doxygen=$withval], [use_doxygen=]_defopt)
m4_undefine([_defopt])
if test "x$use_doxygen" = x"auto"; then
AC_PATH_PROG([DOXYGEN], [doxygen])
@ -8144,15 +8191,17 @@ fi])
AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
]) # XORG_WITH_DOXYGEN
# XORG_WITH_GROFF
# XORG_WITH_GROFF([DEFAULT])
# ----------------
# Minimum version: 1.6.0
# Minimum version for optional DEFAULT argument: 1.11.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.
# as whether or not to use the groff package. When DEFAULT is not specified,
# --with-groff assumes 'auto'.
#
# Interface to module:
# HAVE_GROFF: used in makefiles to conditionally generate documentation
@ -8163,6 +8212,12 @@ AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
# --with-groff: 'yes' user instructs the module to use groff
# 'no' user instructs the module not to use groff
#
# Added in version 1.9.0:
# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
# psselect from the psutils package.
# the ghostcript package. Refer to the grohtml man pages
#
# 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
@ -8175,10 +8230,12 @@ AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
#
AC_DEFUN([XORG_WITH_GROFF],[
AC_ARG_VAR([GROFF], [Path to groff command])
m4_define([_defopt], m4_default([$1], [auto]))
AC_ARG_WITH(groff,
AS_HELP_STRING([--with-groff],
[Use groff to regenerate documentation (default: yes, if installed)]),
[use_groff=$withval], [use_groff=auto])
[Use groff to regenerate documentation (default: ]_defopt[)]),
[use_groff=$withval], [use_groff=]_defopt)
m4_undefine([_defopt])
if test "x$use_groff" = x"auto"; then
AC_PATH_PROG([GROFF], [groff])
@ -8202,6 +8259,7 @@ elif test "x$use_groff" = x"no" ; then
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])
@ -8219,20 +8277,38 @@ if test "x$have_groff" = x"yes"; then
fi
AC_MSG_RESULT([$groff_mm_works])
fi
# We have groff, test for HTML dependencies, one command per package
if test "x$have_groff" = x"yes"; then
AC_PATH_PROGS(GS_PATH, [gs gswin32c])
AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
AC_PATH_PROG(PSSELECT_PATH, [psselect])
if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
have_groff_html=yes
else
have_groff_html=no
AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
fi
fi
# Set Automake conditionals for Makefiles
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])
AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
]) # XORG_WITH_GROFF
# XORG_WITH_FOP
# XORG_WITH_FOP([DEFAULT])
# ----------------
# Minimum version: 1.6.0
# Minimum version for optional DEFAULT argument: 1.11.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.
# as whether or not to use the fop package. When DEFAULT is not specified,
# --with-fop assumes 'auto'.
#
# Interface to module:
# HAVE_FOP: used in makefiles to conditionally generate documentation
@ -8245,10 +8321,12 @@ AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
#
AC_DEFUN([XORG_WITH_FOP],[
AC_ARG_VAR([FOP], [Path to fop command])
m4_define([_defopt], m4_default([$1], [auto]))
AC_ARG_WITH(fop,
AS_HELP_STRING([--with-fop],
[Use fop to regenerate documentation (default: yes, if installed)]),
[use_fop=$withval], [use_fop=auto])
[Use fop to regenerate documentation (default: ]_defopt[)]),
[use_fop=$withval], [use_fop=]_defopt)
m4_undefine([_defopt])
if test "x$use_fop" = x"auto"; then
AC_PATH_PROG([FOP], [fop])
@ -8275,15 +8353,17 @@ fi
AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
]) # XORG_WITH_FOP
# XORG_WITH_PS2PDF
# XORG_WITH_PS2PDF([DEFAULT])
# ----------------
# Minimum version: 1.6.0
# Minimum version for optional DEFAULT argument: 1.11.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.
# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
# --with-ps2pdf assumes 'auto'.
#
# Interface to module:
# HAVE_PS2PDF: used in makefiles to conditionally generate documentation
@ -8296,10 +8376,12 @@ AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
#
AC_DEFUN([XORG_WITH_PS2PDF],[
AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
m4_define([_defopt], m4_default([$1], [auto]))
AC_ARG_WITH(ps2pdf,
AS_HELP_STRING([--with-ps2pdf],
[Use ps2pdf to regenerate documentation (default: yes, if installed)]),
[use_ps2pdf=$withval], [use_ps2pdf=auto])
[Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
[use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
m4_undefine([_defopt])
if test "x$use_ps2pdf" = x"auto"; then
AC_PATH_PROG([PS2PDF], [ps2pdf])
@ -8350,14 +8432,12 @@ AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
# parm1: specify the default value, yes or no.
#
AC_DEFUN([XORG_ENABLE_DOCS],[
default=$1
if test "x$default" = x ; then
default="yes"
fi
m4_define([default], m4_default([$1], [yes]))
AC_ARG_ENABLE(docs,
AS_HELP_STRING([--enable-docs],
[Enable building the documentation (default: yes)]),
[build_docs=$enableval], [build_docs=$default])
[Enable building the documentation (default: ]default[)]),
[build_docs=$enableval], [build_docs=]default)
m4_undefine([default])
AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
AC_MSG_CHECKING([whether to build documentation])
AC_MSG_RESULT([$build_docs])
@ -8385,14 +8465,12 @@ AC_MSG_RESULT([$build_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
m4_define([devel_default], m4_default([$1], [yes]))
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])
[Enable building the developer documentation (default: ]devel_default[)]),
[build_devel_docs=$enableval], [build_devel_docs=]devel_default)
m4_undefine([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])
@ -8420,14 +8498,12 @@ AC_MSG_RESULT([$build_devel_docs])
# 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
m4_define([spec_default], m4_default([$1], [yes]))
AC_ARG_ENABLE(specs,
AS_HELP_STRING([--enable-specs],
[Enable building the specs (default: yes)]),
[build_specs=$enableval], [build_specs=$spec_default])
[Enable building the specs (default: ]spec_default[)]),
[build_specs=$enableval], [build_specs=]spec_default)
m4_undefine([spec_default])
AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
AC_MSG_CHECKING([whether to build functional specifications])
AC_MSG_RESULT([$build_specs])
@ -8486,38 +8562,69 @@ AC_SUBST([XTMALLOC_ZERO_CFLAGS])
# ----------------
# Minimum version: 1.1.0
#
# Sets up flags for source checkers such as lint and sparse if --with-lint
# is specified. (Use --with-lint=sparse for sparse.)
# Sets $LINT to name of source checker passed with --with-lint (default: lint)
# Sets $LINT_FLAGS to flags to pass to source checker
# Sets LINT automake conditional if enabled (default: disabled)
# This macro enables the use of a tool that flags some suspicious and
# non-portable constructs (likely to be bugs) in C language source code.
# It will attempt to locate the tool and use appropriate options.
# There are various lint type tools on different platforms.
#
# Interface to module:
# LINT: returns the path to the tool found on the platform
# or the value set to LINT on the configure cmd line
# also an Automake conditional
# LINT_FLAGS: an Automake variable with appropriate flags
#
# --with-lint: 'yes' user instructs the module to use lint
# 'no' user instructs the module not to use lint (default)
#
# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
# If the user sets the value of LINT_FLAGS, they are used verbatim.
#
AC_DEFUN([XORG_WITH_LINT],[
# Allow checking code with lint, sparse, etc.
AC_ARG_VAR([LINT], [Path to a lint-style command])
AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
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
LINT="lint"
# Obtain platform specific info like program name and options
# The lint program on FreeBSD and NetBSD is different from the one on Solaris
case $host_os in
*linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
lint_name=splint
lint_options="-badflag"
;;
*freebsd* | *netbsd*)
lint_name=lint
lint_options="-u -b"
;;
*solaris*)
lint_name=lint
lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
;;
esac
# Test for the presence of the program (either guessed by the code or spelled out by the user)
if test "x$use_lint" = x"yes" ; then
AC_PATH_PROG([LINT], [$lint_name])
if test "x$LINT" = "x"; then
AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
fi
elif test "x$use_lint" = x"no" ; then
if test "x$LINT" != "x"; then
AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
fi
else
LINT="$use_lint"
fi
if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
case $LINT in
lint|*/lint)
case $host_os in
solaris*)
LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
;;
esac
;;
esac
AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
fi
AC_SUBST(LINT)
AC_SUBST(LINT_FLAGS)
AM_CONDITIONAL(LINT, [test x$LINT != xno])
# User supplied flags override default flags
if test "x$LINT_FLAGS" != "x"; then
lint_options=$LINT_FLAGS
fi
AC_SUBST([LINT_FLAGS],[$lint_options])
AM_CONDITIONAL(LINT, [test "x$LINT" != x])
]) # XORG_WITH_LINT
@ -8527,28 +8634,29 @@ AM_CONDITIONAL(LINT, [test x$LINT != xno])
#
# Sets up flags for building lint libraries for checking programs that call
# functions in the library.
# Disabled by default, enable with --enable-lint-library
# Sets:
# @LINTLIB@ - name of lint library file to make
# MAKE_LINT_LIB - automake conditional
#
# Interface to module:
# LINTLIB - Automake variable with the name of lint library file to make
# MAKE_LINT_LIB - Automake conditional
#
# --enable-lint-library: - 'yes' user instructs the module to created a lint library
# - 'no' user instructs the module not to create a lint library (default)
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, [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
if test "x$LINT" = "xno" ; then
AC_MSG_ERROR([Cannot make lint library without --with-lint])
fi
if test "x$make_lint_lib" = "xyes" ; then
LINTLIB=llib-l$1.ln
else
LINTLIB=$make_lint_lib
fi
if test "x$make_lint_lib" = x"yes" ; then
LINTLIB=llib-l$1.ln
if test "x$LINT" = "x"; then
AC_MSG_ERROR([Cannot make lint library without --with-lint])
fi
elif test "x$make_lint_lib" != x"no" ; then
AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
fi
AC_SUBST(LINTLIB)
AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
@ -8561,7 +8669,7 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
# Defines CWARNFLAGS to enable C compiler warnings.
#
AC_DEFUN([XORG_CWARNFLAGS], [
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_PROG_CC_C99])
if test "x$GCC" = xyes ; then
CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
@ -8586,7 +8694,7 @@ AC_SUBST(CWARNFLAGS)
#
# Add configure option to enable strict compilation
AC_DEFUN([XORG_STRICT_OPTION], [
AC_REQUIRE([AC_PROG_CC])
# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
AC_REQUIRE([AC_PROG_CC_C99])
AC_REQUIRE([XORG_CWARNFLAGS])
@ -8616,6 +8724,7 @@ AC_SUBST([CWARNFLAGS])
# Defines default options for X.Org modules.
#
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
AC_REQUIRE([AC_PROG_INSTALL])
XORG_CWARNFLAGS
XORG_STRICT_OPTION
XORG_RELEASE_VERSION
@ -8669,22 +8778,9 @@ dnl
# XORG_RELEASE_VERSION
# --------------------
# Adds --with/without-release-string and changes the PACKAGE and
# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If
# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also
# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
AC_DEFUN([XORG_RELEASE_VERSION],[
AC_ARG_WITH(release-version,
AS_HELP_STRING([--with-release-version=STRING],
[Use release version string in package name]),
[RELEASE_VERSION="$withval"],
[RELEASE_VERSION=""])
if test "x$RELEASE_VERSION" != "x"; then
PACKAGE="$PACKAGE-$RELEASE_VERSION"
PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
AC_MSG_NOTICE([Building with package name set to $PACKAGE])
fi
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
[`echo $PACKAGE_VERSION | cut -d . -f 1`],
[Major version of this package])
@ -8720,52 +8816,3 @@ echo 'git directory not found: installing possibly empty changelog.' >&2)"
AC_SUBST([CHANGELOG_CMD])
]) # XORG_CHANGELOG
dnl Copyright 2005 Red Hat, Inc
dnl
dnl Permission to use, copy, modify, distribute, and sell this software and its
dnl documentation for any purpose is hereby granted without fee, provided that
dnl the above copyright notice appear in all copies and that both that
dnl copyright notice and this permission notice appear in supporting
dnl documentation.
dnl
dnl The above copyright notice and this permission notice shall be included
dnl in all copies or substantial portions of the Software.
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 IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
dnl OTHER DEALINGS IN THE SOFTWARE.
dnl
dnl Except as contained in this notice, the name of the copyright holders shall
dnl not be used in advertising or otherwise to promote the sale, use or
dnl other dealings in this Software without prior written authorization
dnl from the copyright holders.
dnl
# XORG_DRIVER_CHECK_EXT()
# --------------------------
# Checks for the $1 define in xorg-server.h (from the sdk). If it
# is defined, then add $1 to $REQUIRED_MODULES.
AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include "xorg-server.h"
#if !defined $1
#error $1 not defined
#endif
]])],
[_EXT_CHECK=yes],
[_EXT_CHECK=no])
CFLAGS="$SAVE_CFLAGS"
AC_MSG_CHECKING([if $1 is defined])
AC_MSG_RESULT([$_EXT_CHECK])
if test "$_EXT_CHECK" != no; then
REQUIRED_MODULES="$REQUIRED_MODULES $2"
fi
])

View File

@ -1,7 +1,5 @@
/* config.h.in. Generated from configure.ac by autoheader. */
#include "xorg-server.h"
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
@ -32,9 +30,6 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Name of the period field in struct kbd_repeat */
#undef LNX_KBD_PERIOD_NAME
/* Name of package */
#undef PACKAGE

File diff suppressed because it is too large Load Diff

View File

@ -20,55 +20,46 @@
#
# Process this file with autoconf to produce a configure script
AC_PREREQ(2.57)
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xf86-input-keyboard],
1.4.0,
[1.5.0],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
xf86-input-keyboard)
# 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)
[xf86-input-keyboard])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR(.)
AM_INIT_AUTOMAKE([dist-bzip2])
# Initialize Automake
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
DRIVER_NAME=kbd
AC_SUBST([DRIVER_NAME])
AM_CONFIG_HEADER([config.h])
# Checks for programs.
# Initialize libtool
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
AC_PROG_CC
AH_TOP([#include "xorg-server.h"])
# Initialize X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
m4_ifndef([XORG_MACROS_VERSION],
[m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS
# Obtain compiler/linker options from server and required extensions
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.2.99.0] xproto inputproto)
# Define a configure option for an alternate input module directory
AC_ARG_WITH(xorg-module-dir,
AC_HELP_STRING([--with-xorg-module-dir=DIR],
[Default xorg module directory [[default=$libdir/xorg/modules]]]),
[moduledir="$withval"],
[moduledir="$libdir/xorg/modules"])
inputdir=${moduledir}/input
AC_SUBST(inputdir)
# The keyboard driver code is O/S specific
case $host_os in
linux*)
IS_LINUX="yes"
# check whether struct kbd_repeat has the 'period' field.
# on kernels < 2.5.42 it's called 'rate' instead.
AC_TRY_COMPILE([
#include <linux/kd.h>
#ifdef __sparc__
#include <asm/param.h>
#include <asm/kbio.h>
#endif
],[
int main () {
struct kbd_repeat k;
k.period = 0;
return 0;
}],
[period_field="period"],
[period_field="rate"])
AC_DEFINE_UNQUOTED(LNX_KBD_PERIOD_NAME, [$period_field],
[Name of the period field in struct kbd_repeat])
;;
freebsd* | kfreebsd-gnu* | netbsd* | openbsd*)
@ -93,31 +84,11 @@ AM_CONDITIONAL(LINUX, [test "x$IS_LINUX" = xyes])
AM_CONDITIONAL(BSD, [test "x$IS_BSD" = xyes])
AM_CONDITIONAL(SOLARIS, [test "x$IS_SOLARIS" = xyes])
AM_CONDITIONAL(HURD, [test "x$IS_HURD" = xyes])
AM_CONDITIONAL(SCO, [test "x$IS_SCO" = xyes])
AC_ARG_WITH(xorg-module-dir,
AC_HELP_STRING([--with-xorg-module-dir=DIR],
[Default xorg module directory [[default=$libdir/xorg/modules]]]),
[moduledir="$withval"],
[moduledir="$libdir/xorg/modules"])
AC_SUBST(moduledir)
DRIVER_NAME=kbd
AC_SUBST([DRIVER_NAME])
# Checks for extensions
XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
XORG_DRIVER_CHECK_EXT(XINPUT, inputproto)
XORG_DRIVER_CHECK_EXT(XKB, kbproto)
# Checks for pkg-config packages
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.2.99.0] xproto $REQUIRED_MODULES)
sdkdir=$(pkg-config --variable=sdkdir xorg-server)
XORG_DEFAULT_OPTIONS
XORG_CFLAGS="$CWARNFLAGS $XORG_CFLAGS"
AC_SUBST([XORG_CFLAGS])
# Checks for libraries.
# Checks for header files.
AC_HEADER_STDC
AC_OUTPUT([Makefile src/Makefile man/Makefile])
AC_CONFIG_FILES([Makefile
src/Makefile
man/Makefile])
AC_OUTPUT

View File

@ -1,28 +1,25 @@
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation.
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the copyright holders shall
# not be used in advertising or otherwise to promote the sale, use or
# other dealings in this Software without prior written authorization
# from the copyright holders.
#
# Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
drivermandir = $(DRIVER_MAN_DIR)
@ -34,29 +31,10 @@ EXTRA_DIST = @DRIVER_NAME@.man
CLEANFILES = $(driverman_DATA)
SED = sed
# Strings to replace in man pages
XORGRELSTRING = @PACKAGE_STRING@
XORGMANNAME = X Version 11
# should allow configure override like xserver's configure.ac does
XKBPATH=${datadir}/X11/xkb
MAN_SUBSTS = \
-e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-e 's|__xservername__|Xorg|g' \
-e 's|__xconfigfile__|xorg.conf|g' \
-e 's|__projectroot__|$(prefix)|g' \
-e 's|__xkb_path__|$(XKBPATH)|g' \
-e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-e 's|__drivermansuffix__|$(DRIVER_MAN_SUFFIX)|g' \
-e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
MAN_SUBSTS += -e 's|__xkb_path__|$(XKBPATH)|g'
SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man
.man.$(DRIVER_MAN_SUFFIX):
sed $(MAN_SUBSTS) < $< > $@
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@

View File

@ -15,30 +15,27 @@
@SET_MAKE@
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation.
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the copyright holders shall
# not be used in advertising or otherwise to promote the sale, use or
# other dealings in this Software without prior written authorization
# from the copyright holders.
#
# Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
srcdir = @srcdir@
top_srcdir = @top_srcdir@
@ -149,6 +146,9 @@ MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
MAN_SUBSTS = @MAN_SUBSTS@ -e 's|__xkb_path__|$(XKBPATH)|g'
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
NMEDIT = @NMEDIT@
@ -162,9 +162,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SCO_FALSE = @SCO_FALSE@
SCO_TRUE = @SCO_TRUE@
SED = sed
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SOLARIS_FALSE = @SOLARIS_FALSE@
@ -173,6 +171,7 @@ STRIP = @STRIP@
VERSION = @VERSION@
XORG_CFLAGS = @XORG_CFLAGS@
XORG_LIBS = @XORG_LIBS@
XORG_MAN_PAGE = @XORG_MAN_PAGE@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
@ -204,6 +203,7 @@ host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
inputdir = @inputdir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
@ -211,7 +211,6 @@ localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
moduledir = @moduledir@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
@ -226,26 +225,6 @@ driverman_PRE = @DRIVER_NAME@.man
driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@)
EXTRA_DIST = @DRIVER_NAME@.man
CLEANFILES = $(driverman_DATA)
# Strings to replace in man pages
XORGRELSTRING = @PACKAGE_STRING@
XORGMANNAME = X Version 11
# should allow configure override like xserver's configure.ac does
XKBPATH = ${datadir}/X11/xkb
MAN_SUBSTS = \
-e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-e 's|__xservername__|Xorg|g' \
-e 's|__xconfigfile__|xorg.conf|g' \
-e 's|__projectroot__|$(prefix)|g' \
-e 's|__xkb_path__|$(XKBPATH)|g' \
-e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-e 's|__drivermansuffix__|$(DRIVER_MAN_SUFFIX)|g' \
-e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man
all: all-am
@ -260,9 +239,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu man/Makefile
$(AUTOMAKE) --foreign man/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@ -432,7 +411,7 @@ uninstall-am: uninstall-drivermanDATA uninstall-info-am
.man.$(DRIVER_MAN_SUFFIX):
sed $(MAN_SUBSTS) < $< > $@
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -1,5 +1,3 @@
.\" $XdotOrg: $
.\" $XFree86: xc/programs/Xserver/hw/xfree86/input/keyboard/keyboard.man,v 1.2 2001/01/27 18:20:57 dawes Exp $
.\" shorthand for double quote that works everywhere.
.ds q \N'34'
.TH KBD __drivermansuffix__ __vendorversion__
@ -92,10 +90,6 @@ enhance the keyboard layout details. Default: not set.
.BI "Option \*qXkbOptions\*q \*q" options \*q
specifies the XKB keyboard option components. These can be used to
enhance the keyboard behaviour. Default: not set.
.PP
Some other XKB-related options are available, but they are incompatible
with the ones listed above and are not recommended, so they are not
documented here.
.SH EXAMPLE
The following xorg.conf fragment ensures that user will be able to switch between
.I us

View File

@ -18,16 +18,16 @@
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
AM_CFLAGS = @XORG_CFLAGS@
AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS)
kbd_drv_la_LTLIBRARIES = kbd_drv.la
kbd_drv_la_LDFLAGS = -avoid-version -module
kbd_drv_la_SOURCES = kbd.c xf86OSKbd.h xf86Keymap.h atKeynames.h
kbd_drv_ladir = @moduledir@/input
kbd_drv_ladir = @inputdir@
BSD_SRCS = bsd_KbdMap.c bsd_kbd.c bsd_kbd.h at_scancode.c
HURD_SRCS = hurd_kbd.c at_scancode.c
LINUX_SRCS = lnx_KbdMap.c lnx_kbd.c lnx_kbd.h at_scancode.c
SCO_SRCS = sco_KbdMap.c sco_kbd.c sco_kbd.h
SOLARIS_SRCS = sun_kbd.c sun_kbd.h sun_kbdMap.c
if BSD
@ -42,12 +42,8 @@ if LINUX
kbd_drv_la_SOURCES += $(LINUX_SRCS)
endif
if SCO
kbd_drv_la_SOURCES += $(SCO_SRCS)
endif
if HURD
kbd_drv_la_SOURCES += $(HURD_SRCS)
endif
EXTRA_DIST = $(BSD_SRCS) $(HURD_SRCS) $(LINUX_SRCS) $(SCO_SRCS) $(SOLARIS_SRCS)
EXTRA_DIST = $(BSD_SRCS) $(HURD_SRCS) $(LINUX_SRCS) $(SOLARIS_SRCS)

View File

@ -59,8 +59,7 @@ host_triplet = @host@
@BSD_TRUE@am__append_1 = $(BSD_SRCS)
@SOLARIS_TRUE@am__append_2 = $(SOLARIS_SRCS)
@LINUX_TRUE@am__append_3 = $(LINUX_SRCS)
@SCO_TRUE@am__append_4 = $(SCO_SRCS)
@HURD_TRUE@am__append_5 = $(HURD_SRCS)
@HURD_TRUE@am__append_4 = $(HURD_SRCS)
subdir = src
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@ -83,19 +82,17 @@ kbd_drv_la_LIBADD =
am__kbd_drv_la_SOURCES_DIST = kbd.c xf86OSKbd.h xf86Keymap.h \
atKeynames.h bsd_KbdMap.c bsd_kbd.c bsd_kbd.h at_scancode.c \
sun_kbd.c sun_kbd.h sun_kbdMap.c lnx_KbdMap.c lnx_kbd.c \
lnx_kbd.h sco_KbdMap.c sco_kbd.c sco_kbd.h hurd_kbd.c
lnx_kbd.h hurd_kbd.c
am__objects_1 = bsd_KbdMap.lo bsd_kbd.lo at_scancode.lo
@BSD_TRUE@am__objects_2 = $(am__objects_1)
am__objects_3 = sun_kbd.lo sun_kbdMap.lo
@SOLARIS_TRUE@am__objects_4 = $(am__objects_3)
am__objects_5 = lnx_KbdMap.lo lnx_kbd.lo at_scancode.lo
@LINUX_TRUE@am__objects_6 = $(am__objects_5)
am__objects_7 = sco_KbdMap.lo sco_kbd.lo
@SCO_TRUE@am__objects_8 = $(am__objects_7)
am__objects_9 = hurd_kbd.lo at_scancode.lo
@HURD_TRUE@am__objects_10 = $(am__objects_9)
am__objects_7 = hurd_kbd.lo at_scancode.lo
@HURD_TRUE@am__objects_8 = $(am__objects_7)
am_kbd_drv_la_OBJECTS = kbd.lo $(am__objects_2) $(am__objects_4) \
$(am__objects_6) $(am__objects_8) $(am__objects_10)
$(am__objects_6) $(am__objects_8)
kbd_drv_la_OBJECTS = $(am_kbd_drv_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
@ -179,6 +176,7 @@ MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MAN_SUBSTS = @MAN_SUBSTS@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
NMEDIT = @NMEDIT@
@ -192,8 +190,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SCO_FALSE = @SCO_FALSE@
SCO_TRUE = @SCO_TRUE@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
@ -203,6 +199,7 @@ STRIP = @STRIP@
VERSION = @VERSION@
XORG_CFLAGS = @XORG_CFLAGS@
XORG_LIBS = @XORG_LIBS@
XORG_MAN_PAGE = @XORG_MAN_PAGE@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
@ -234,6 +231,7 @@ host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
inputdir = @inputdir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
@ -241,7 +239,6 @@ localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
moduledir = @moduledir@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
@ -251,19 +248,18 @@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
AM_CFLAGS = @XORG_CFLAGS@
AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS)
kbd_drv_la_LTLIBRARIES = kbd_drv.la
kbd_drv_la_LDFLAGS = -avoid-version -module
kbd_drv_la_SOURCES = kbd.c xf86OSKbd.h xf86Keymap.h atKeynames.h \
$(am__append_1) $(am__append_2) $(am__append_3) \
$(am__append_4) $(am__append_5)
kbd_drv_ladir = @moduledir@/input
$(am__append_4)
kbd_drv_ladir = @inputdir@
BSD_SRCS = bsd_KbdMap.c bsd_kbd.c bsd_kbd.h at_scancode.c
HURD_SRCS = hurd_kbd.c at_scancode.c
LINUX_SRCS = lnx_KbdMap.c lnx_kbd.c lnx_kbd.h at_scancode.c
SCO_SRCS = sco_KbdMap.c sco_kbd.c sco_kbd.h
SOLARIS_SRCS = sun_kbd.c sun_kbd.h sun_kbdMap.c
EXTRA_DIST = $(BSD_SRCS) $(HURD_SRCS) $(LINUX_SRCS) $(SCO_SRCS) $(SOLARIS_SRCS)
EXTRA_DIST = $(BSD_SRCS) $(HURD_SRCS) $(LINUX_SRCS) $(SOLARIS_SRCS)
all: all-am
.SUFFIXES:
@ -277,9 +273,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu src/Makefile
$(AUTOMAKE) --foreign src/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@ -340,8 +336,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kbd.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_KbdMap.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_kbd.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sco_KbdMap.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sco_kbd.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_kbd.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_kbdMap.Plo@am__quote@

View File

@ -29,6 +29,7 @@
#include "config.h"
#endif
#include <xorg-server.h>
#include "xf86.h"
#include "xf86Xinput.h"
#include "xf86OSKbd.h"

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/*
* Slightly modified xf86KbdBSD.c which is
*
@ -12,6 +10,7 @@
#include "config.h"
#endif
#include <xorg-server.h>
#include <X11/X.h>
#include <X11/Xmd.h>
#include "input.h"

View File

@ -8,12 +8,11 @@
* Copyright 1993 by David Dawes <dawes@xfree86.org>
*/
#define NEED_EVENTS
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <xorg-server.h>
#include <X11/X.h>
#include <termios.h>
@ -124,8 +123,10 @@ SetKbdLeds(InputInfoPtr pInfo, int leds)
switch (pKbd->consType) {
#ifdef PCCONS_SUPPORT
case PCCONS:
break;
#endif
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
case SYSCONS:
case PCVT:
@ -147,8 +148,11 @@ GetKbdLeds(InputInfoPtr pInfo)
int leds = 0, real_leds = 0;
switch (pKbd->consType) {
#ifdef PCCONS_SUPPORT
case PCCONS:
break;
#endif
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
case SYSCONS:
case PCVT:
@ -181,8 +185,10 @@ SetKbdRepeat(InputInfoPtr pInfo, char rad)
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
switch (pKbd->consType) {
#ifdef PCCONS_SUPPORT
case PCCONS:
break;
#endif
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
case SYSCONS:
case PCVT:

View File

@ -1,5 +1,3 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_kbd.h,v 1.1 2002/10/11 01:40:34 dawes Exp $ */
extern void KbdGetMapping(InputInfoPtr pInfo, KeySymsPtr pKeySyms,
CARD8 *pModMap);

View File

@ -20,13 +20,12 @@
* PERFORMANCE OF THIS SOFTWARE.
*
*/
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/hurd/hurd_io.c,v 1.8 2002/10/11 01:40:35 dawes Exp $ */
#define NEED_EVENTS
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <xorg-server.h>
#include <X11/X.h>
#include "compiler.h"

View File

@ -18,8 +18,8 @@
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#define NEED_EVENTS
#include <xorg-server.h>
#include <X11/X.h>
#include <X11/Xproto.h>
@ -65,8 +65,7 @@ _X_EXPORT InputDriverRec KBD = {
NULL,
KbdPreInit,
NULL,
NULL,
0
NULL
};
_X_EXPORT InputDriverRec KEYBOARD = {
@ -75,42 +74,7 @@ _X_EXPORT InputDriverRec KEYBOARD = {
NULL,
KbdPreInit,
NULL,
NULL,
0
};
typedef enum {
OPTION_ALWAYS_CORE,
OPTION_SEND_CORE_EVENTS,
OPTION_CORE_KEYBOARD,
OPTION_DEVICE,
OPTION_PROTOCOL,
OPTION_AUTOREPEAT,
OPTION_XLEDS,
OPTION_XKB_RULES,
OPTION_XKB_MODEL,
OPTION_XKB_LAYOUT,
OPTION_XKB_VARIANT,
OPTION_XKB_OPTIONS,
OPTION_CUSTOM_KEYCODES
} KeyboardOpts;
/* These aren't actually used ... */
static const OptionInfoRec KeyboardOptions[] = {
{ OPTION_ALWAYS_CORE, "AlwaysCore", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_SEND_CORE_EVENTS, "SendCoreEvents", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_CORE_KEYBOARD, "CoreKeyboard", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_DEVICE, "Device", OPTV_STRING, {0}, FALSE },
{ OPTION_PROTOCOL, "Protocol", OPTV_STRING, {0}, FALSE },
{ OPTION_AUTOREPEAT, "AutoRepeat", OPTV_STRING, {0}, FALSE },
{ OPTION_XLEDS, "XLeds", 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_CUSTOM_KEYCODES, "CustomKeycodes", OPTV_BOOLEAN, {0}, FALSE },
{ -1, NULL, OPTV_NONE, {0}, FALSE }
NULL
};
static const char *kbdDefaults[] = {
@ -119,7 +83,6 @@ static const char *kbdDefaults[] = {
#else
"Protocol", "standard",
#endif
"AutoRepeat", "500 30",
"XkbRules", "xorg",
"XkbModel", "pc105",
"CustomKeycodes", "off",
@ -132,7 +95,6 @@ static const char *kbd98Defaults[] = {
#else
"Protocol", "standard",
#endif
"AutoRepeat", "500 30",
"XkbRules", "xfree98",
"XkbModel", "pc98",
"XkbLayout", "jp",
@ -153,7 +115,7 @@ SetXkbOption(InputInfoPtr pInfo, char *name, char **option)
if ((s = xf86SetStrOption(pInfo->options, name, NULL))) {
if (!s[0]) {
xfree(s);
free(s);
*option = NULL;
} else {
*option = s;
@ -200,7 +162,7 @@ KbdPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
xf86CollectInputOptions(pInfo, kbd98Defaults, NULL);
xf86ProcessCommonOptions(pInfo, pInfo->options);
if (!(pKbd = xcalloc(sizeof(KbdDevRec), 1)))
if (!(pKbd = calloc(sizeof(KbdDevRec), 1)))
return pInfo;
pInfo->private = pKbd;
@ -226,7 +188,7 @@ KbdPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
}
l = strtok(NULL, " \t\n");
}
xfree(s);
free(s);
}
SetXkbOption(pInfo, "XkbRules", &xkb_rules);

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/*
* Slightly modified xf86KbdLnx.c which is
*
@ -10,6 +8,7 @@
#include "config.h"
#endif
#include <xorg-server.h>
#include <X11/X.h>
#include <X11/Xmd.h>
#include "input.h"
@ -523,12 +522,12 @@ readKernelMapping(InputInfoPtr pInfo, KeySymsPtr pKeySyms, CARD8 *pModMap)
/*
* Find the Mapping for the special server functions
*/
pKbd->specialMap = (TransMapPtr) xcalloc(NUM_CUSTOMKEYS, 1);
pKbd->specialMap = (TransMapPtr) calloc(NUM_CUSTOMKEYS, 1);
if (pKbd->specialMap != NULL) {
pKbd->specialMap->end = NUM_CUSTOMKEYS;
pKbd->specialMap->map = (unsigned char*) xcalloc(NUM_CUSTOMKEYS, 1);
pKbd->specialMap->map = (unsigned char*) calloc(NUM_CUSTOMKEYS, 1);
if (pKbd->specialMap == NULL) {
xfree(pKbd->specialMap);
free(pKbd->specialMap);
pKbd->specialMap = NULL;
}
}

View File

@ -12,12 +12,11 @@
* This program comes with ABSOLUTELY NO WARRANTY.
*/
#define NEED_EVENTS
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <xorg-server.h>
#include <X11/X.h>
#include "compiler.h"
@ -182,12 +181,12 @@ OpenKeyboard(InputInfoPtr pInfo)
break;
default:
xf86Msg(X_ERROR,"\"%s\" is not a valid keyboard protocol name\n", s);
xfree(s);
free(s);
return FALSE;
}
xf86Msg(X_CONFIG, "%s: Protocol: %s\n", pInfo->name, s);
xfree(s);
free(s);
s = xf86SetStrOption(pInfo->options, "Device", NULL);
if (s == NULL) {
@ -197,11 +196,11 @@ OpenKeyboard(InputInfoPtr pInfo)
pInfo->fd = open(s, O_RDONLY | O_NONBLOCK | O_EXCL);
if (pInfo->fd == -1) {
xf86Msg(X_ERROR, "%s: cannot open \"%s\"\n", pInfo->name, s);
xfree(s);
free(s);
return FALSE;
}
pKbd->isConsole = FALSE;
xfree(s);
free(s);
}
if (pKbd->isConsole)
@ -228,7 +227,7 @@ xf86OSKbdPreInit(InputInfoPtr pInfo)
pKbd->OpenKeyboard = OpenKeyboard;
pKbd->vtSwitchSupported = FALSE;
pKbd->private = xcalloc(sizeof(LnxKbdPrivRec), 1);
pKbd->private = calloc(sizeof(LnxKbdPrivRec), 1);
if (pKbd->private == NULL) {
xf86Msg(X_ERROR,"can't allocate keyboard OS private data\n");
return FALSE;

View File

@ -1,5 +1,3 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.h,v 1.1 2002/10/11 01:40:35 dawes Exp $ */
extern void KbdGetMapping(InputInfoPtr pInfo, KeySymsPtr pKeySyms,
CARD8 *pModMap);

View File

@ -1,308 +0,0 @@
/* $XFree86$ */
/*
* Copyright 2005 by J. Kean Johnston <jkj@sco.com>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name J. Kean Johnston not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. J. Kean Johnston makes no
* representations about the suitability of this software for any purpose.
* It is provided "as is" without express or implied warranty.
*
* J. KEAN JOHNSTON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL J. KEAN JOHNSTON BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
* USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/*
* Based on xf86KbdMap.c, which is
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
* Copyright (c) 1992-2003 by The XFree86 Project, Inc.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <X11/X.h>
#include <X11/Xmd.h>
#include "input.h"
#include "scrnintstr.h"
#include "compiler.h"
#include "xf86.h"
#include "xf86Priv.h"
#include "xf86_OSlib.h"
#include "xf86Xinput.h"
#include "xf86OSKbd.h"
#include "atKeynames.h"
#include "xf86Keymap.h"
#include "sco_kbd.h"
#define KD_GET_ENTRY(i,n) \
eascii_to_x[((priv->keymap.key[i].spcl << (n+1)) & 0x100) + priv->keymap.key[i].map[n]]
/*
* NOTE: Not all possible remappable symbols are remapped. There are two main
* reasons:
* a) The mapping between scancode and SYSV/386 - symboltable
* is inconsistent between different versions and has some
* BIG mistakes.
* b) In X-Windows there is a difference between numpad-keys
* and normal keys. SYSV/386 uses for both kinds of keys
* the same symbol.
*
* Thus only the alpha keypad and the function keys are translated.
* Also CapsLock, NumLock, ScrollLock, Shift, Control & Alt.
*/
static unsigned char remap[128] = {
0, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00 - 0x07 */
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08 - 0x0f */
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10 - 0x17 */
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, /* 0x18 - 0x1f */
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, /* 0x20 - 0x27 */
0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, /* 0x28 - 0x2f */
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0, /* 0x30 - 0x37 */
0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, /* 0x38 - 0x3f */
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0, /* 0x40 - 0x47 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 - 0x4f */
0, 0, 0, 0, 0, 0, 0x56, 0x57, /* 0x50 - 0x57 */
0x58, 0, 0, 0, 0, 0, 0, 0, /* 0x58 - 0x5f */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 - 0x67 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 - 0x6f */
0, 0, 0x69, 0x65, 0, 0, 0, 0, /* 0x70 - 0x77 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 - 0x7f */
};
static KeySym eascii_to_x[512] = {
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
XK_BackSpace, XK_Tab, XK_Linefeed, NoSymbol,
NoSymbol, XK_Return, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, XK_Escape,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
XK_space, XK_exclam, XK_quotedbl, XK_numbersign,
XK_dollar, XK_percent, XK_ampersand, XK_apostrophe,
XK_parenleft, XK_parenright, XK_asterisk, XK_plus,
XK_comma, XK_minus, XK_period, XK_slash,
XK_0, XK_1, XK_2, XK_3,
XK_4, XK_5, XK_6, XK_7,
XK_8, XK_9, XK_colon, XK_semicolon,
XK_less, XK_equal, XK_greater, XK_question,
XK_at, XK_A, XK_B, XK_C,
XK_D, XK_E, XK_F, XK_G,
XK_H, XK_I, XK_J, XK_K,
XK_L, XK_M, XK_N, XK_O,
XK_P, XK_Q, XK_R, XK_S,
XK_T, XK_U, XK_V, XK_W,
XK_X, XK_Y, XK_Z, XK_bracketleft,
XK_backslash, XK_bracketright,XK_asciicircum, XK_underscore,
XK_grave, XK_a, XK_b, XK_c,
XK_d, XK_e, XK_f, XK_g,
XK_h, XK_i, XK_j, XK_k,
XK_l, XK_m, XK_n, XK_o,
XK_p, XK_q, XK_r, XK_s,
XK_t, XK_u, XK_v, XK_w,
XK_x, XK_y, XK_z, XK_braceleft,
XK_bar, XK_braceright, XK_asciitilde, XK_Delete,
XK_Ccedilla, XK_udiaeresis, XK_eacute, XK_acircumflex,
XK_adiaeresis, XK_agrave, XK_aring, XK_ccedilla,
XK_ecircumflex, XK_ediaeresis, XK_egrave, XK_idiaeresis,
XK_icircumflex, XK_igrave, XK_Adiaeresis, XK_Aring,
XK_Eacute, XK_ae, XK_AE, XK_ocircumflex,
XK_odiaeresis, XK_ograve, XK_ucircumflex, XK_ugrave,
XK_ydiaeresis, XK_Odiaeresis, XK_Udiaeresis, XK_cent,
XK_sterling, XK_yen, XK_paragraph, XK_section,
XK_aacute, XK_iacute, XK_oacute, XK_uacute,
XK_ntilde, XK_Ntilde, XK_ordfeminine, XK_masculine,
XK_questiondown,XK_hyphen, XK_notsign, XK_onehalf,
XK_onequarter, XK_exclamdown, XK_guillemotleft,XK_guillemotright,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
XK_Greek_alpha, XK_ssharp, XK_Greek_GAMMA, XK_Greek_pi,
XK_Greek_SIGMA, XK_Greek_sigma, XK_mu, XK_Greek_tau,
XK_Greek_PHI, XK_Greek_THETA, XK_Greek_OMEGA, XK_Greek_delta,
XK_infinity, XK_Ooblique, XK_Greek_epsilon, XK_intersection,
XK_identical, XK_plusminus, XK_greaterthanequal, XK_lessthanequal,
XK_topintegral, XK_botintegral, XK_division, XK_similarequal,
XK_degree, NoSymbol, NoSymbol, XK_radical,
XK_Greek_eta, XK_twosuperior, XK_periodcentered, NoSymbol,
/*
* special marked entries (256 + x)
*/
NoSymbol, NoSymbol, XK_Shift_L, XK_Shift_R,
XK_Caps_Lock, XK_Num_Lock, XK_Scroll_Lock, XK_Alt_L,
NoSymbol, XK_Control_L, XK_Alt_L, XK_Alt_R,
XK_Control_L, XK_Control_R, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, XK_F1,
XK_F2, XK_F3, XK_F4, XK_F5,
XK_F6, XK_F7, XK_F8, XK_F9,
XK_F10, XK_F11, XK_F12, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
};
/*
* KbdGetMapping --
* Get the national keyboard mapping. The keyboard type is set, a new map
* and the modifiermap is computed.
*/
void
KbdGetMapping (InputInfoPtr pInfo, KeySymsPtr pKeySyms, CARD8 *pModMap)
{
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
ScoKbdPrivPtr priv = (ScoKbdPrivPtr) pKbd->private;
KeySym *k;
int i;
KeySym *pMap = map;
for (i = 0; i < priv->keymap.n_keys && i < NUM_KEYCODES; i++) {
if (remap[i]) {
k = pMap + (remap[i] << 2);
k[0] = KD_GET_ENTRY(i,0); /* non-shifed */
k[1] = KD_GET_ENTRY(i,1); /* shifted */
k[2] = KD_GET_ENTRY(i,4); /* alt */
k[3] = KD_GET_ENTRY(i,5); /* alt - shifted */
if (k[3] == k[2]) k[3] = NoSymbol;
if (k[2] == k[1]) k[2] = NoSymbol;
if (k[1] == k[0]) k[1] = NoSymbol;
if (k[0] == k[2] && k[1] == k[3]) k[2] = k[3] = NoSymbol;
}
}
/*
* compute the modifier map
*/
for (i = 0; i < MAP_LENGTH; i++)
pModMap[i] = NoSymbol; /* make sure it is restored */
for (k = pMap, i = MIN_KEYCODE;
i < (NUM_KEYCODES + MIN_KEYCODE);
i++, k += GLYPHS_PER_KEY) {
switch(*k) {
case XK_Shift_L:
case XK_Shift_R:
pModMap[i] = ShiftMask;
break;
case XK_Control_L:
case XK_Control_R:
pModMap[i] = ControlMask;
break;
case XK_Caps_Lock:
pModMap[i] = LockMask;
break;
case XK_Alt_L:
case XK_Alt_R:
pModMap[i] = AltMask;
break;
case XK_Num_Lock:
pModMap[i] = NumLockMask;
break;
case XK_Scroll_Lock:
pModMap[i] = ScrollLockMask;
break;
/* kana support */
case XK_Kana_Lock:
case XK_Kana_Shift:
pModMap[i] = KanaMask;
break;
/* alternate toggle for multinational support */
case XK_Mode_switch:
pModMap[i] = AltLangMask;
break;
}
}
pKeySyms->map = pMap;
pKeySyms->mapWidth = GLYPHS_PER_KEY;
pKeySyms->minKeyCode = MIN_KEYCODE;
pKeySyms->maxKeyCode = MAX_KEYCODE;
}

View File

@ -1,425 +0,0 @@
/* $XFree86$ */
/*
* Copyright 2005 by J. Kean Johnston <jkj@sco.com>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name J. Kean Johnston not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. J. Kean Johnston makes no
* representations about the suitability of this software for any purpose.
* It is provided "as is" without express or implied warranty.
*
* J. KEAN JOHNSTON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL J. KEAN JOHNSTON BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
* USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $XConsortium$ */
/*
* Based on sco_io.c which is
* (C) Copyright 2003 J. Kean Johnston <jkj@sco.com>
*
* Based on lnx_kbd.c which is
* Copyright (c) 2002 by The XFree86 Project, Inc.
*
* Based on the code from lnx_io.c which is
* Copyright 1992 by Orest Zborowski <obz@Kodak.com>
* Copyright 1993 by David Dawes <dawes@xfree86.org>
*/
#define NEED_EVENTS
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <X11/X.h>
#include "compiler.h"
#define _NEED_SYSI86
#include "xf86.h"
#include "xf86Priv.h"
#include "xf86OSpriv.h"
#include "xf86_OSlib.h"
#include "xf86Xinput.h"
#include "xf86OSKbd.h"
#include "atKeynames.h"
#include "sco_kbd.h"
#include <sys/param.h>
#include <sys/emap.h>
#include <sys/nmap.h>
static KbdProtocolRec protocols[] = {
{ "standard", PROT_STD },
{ NULL, PROT_UNKNOWN_KBD }
};
extern Bool VTSwitchEnabled;
static void
SoundBell(InputInfoPtr pInfo, int loudness, int pitch, int duration)
{
if (loudness && pitch) {
ioctl(pInfo->fd, KIOCSOUND, 1193180 / pitch);
usleep(duration * loudness * 20);
ioctl(pInfo->fd, KIOCSOUND, 0);
}
}
static void
SetKbdLeds(InputInfoPtr pInfo, int leds)
{
int real_leds = 0;
static int once = 1;
/*
* sleep the first time through under SCO. There appears to be a
* timing problem in the driver which causes the keyboard to be lost.
* This usleep stops it from occurring. NOTE: this was in the old code.
* I am not convinced it is true any longer, but it doesn't hurt to
* leave this in here.
*/
if (once) {
usleep(100);
once = 0;
}
#ifdef LED_CAP
if (leds & XLED1)
real_leds |= LED_CAP;
if (leds & XLED2)
real_leds |= LED_NUM;
if (leds & XLED3)
real_leds |= LED_SCR;
#ifdef LED_COMP
if (leds & XLED4)
real_leds |= LED_COMP;
#else
if (leds & XLED4)
real_leds |= LED_SCR;
#endif
#endif
ioctl(pInfo->fd, KDSETLED, real_leds);
}
static int
GetKbdLeds(InputInfoPtr pInfo)
{
int real_leds, leds = 0;
ioctl(pInfo->fd, KDGETLED, &real_leds);
if (real_leds & LED_CAP) leds |= XLED1;
if (real_leds & LED_NUM) leds |= XLED2;
if (real_leds & LED_SCR) leds |= XLED3;
return(leds);
}
/*
* NOTE: Only OpenServer Release 5.0.6 with Release Supplement 5.0.6A
* and later have the required ioctl. 5.0.6A or higher is HIGHLY
* recommended. The console driver is quite a different beast on that OS.
*/
#undef rate
static void
SetKbdRepeat(InputInfoPtr pInfo, char rad)
{
#if defined(KBIO_SETRATE)
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
int i;
int value = 0x7f; /* Maximum delay with slowest rate */
int delay = 250; /* Default delay */
int rate = 300; /* Default repeat rate */
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;
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;
}
ioctl (pInfo->fd, KBIO_SETRATE, value);
#endif /* defined(KBIO_SETRATE) */
}
static int
KbdInit(InputInfoPtr pInfo, int what)
{
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
ScoKbdPrivPtr priv = (ScoKbdPrivPtr) pKbd->private;
if (pKbd->isConsole) {
priv->use_tcs = 1;
priv->use_kd = 1;
priv->no_nmap = 1;
priv->no_emap = 1;
priv->orig_getsc = 0;
if (ioctl (pInfo->fd, TCGETSC, &priv->orig_getsc) < 0)
priv->use_tcs = 0;
if (ioctl (pInfo->fd, KDGKBMODE, &priv->orig_kbm) < 0)
priv->use_kd = 0;
if (!priv->use_tcs && !priv->use_kd) {
xf86Msg (X_ERROR, "KbdInit: Could not determine keyboard mode\n");
return !Success;
}
/*
* One day this should be fixed to translate normal ASCII characters
* back into scancodes or into events that XFree86 wants, but not
* now. For the time being, we only support scancode mode screens.
*/
if (priv->use_tcs && !(priv->orig_getsc & KB_ISSCANCODE)) {
xf86Msg (X_ERROR, "KbdInit: Keyboard can not send scancodes\n");
return !Success;
}
/*
* We need to get the original keyboard map and NUL out the lock
* modifiers. This prevents the scancode API from messing with
* the keyboard LED's. We restore the original map when we exit.
*/
if (ioctl (pInfo->fd, GIO_KEYMAP, &priv->keymap) < 0) {
xf86Msg (X_ERROR, "KbdInit: Failed to get keyboard map (%s)\n",
strerror(errno));
return !Success;
}
if (ioctl (pInfo->fd, GIO_KEYMAP, &priv->noledmap) < 0) {
xf86Msg (X_ERROR, "KbdInit: Failed to get keyboard map (%s)\n",
strerror(errno));
return !Success;
} else {
int i, j;
for (i = 0; i < priv->noledmap.n_keys; i++) {
for (j = 0; j < NUM_STATES; j++) {
if (IS_SPECIAL(priv->noledmap, i, j) &&
((priv->noledmap.key[i].map[j] == K_CLK) ||
(priv->noledmap.key[i].map[j] == K_NLK) ||
(priv->noledmap.key[i].map[j] == K_SLK))) {
priv->noledmap.key[i].map[j] = K_NOP;
}
}
}
}
if (ioctl (pInfo->fd, XCGETA, &priv->kbdtty) < 0) {
xf86Msg (X_ERROR, "KbdInit: Failed to get terminal modes (%s)\n",
strerror(errno));
return !Success;
}
priv->sc_mapbuf = xalloc (10*BSIZE);
priv->sc_mapbuf2 = xalloc(10*BSIZE);
/* Get the emap */
if (ioctl (pInfo->fd, LDGMAP, priv->sc_mapbuf) < 0) {
if (errno != ENAVAIL) {
xf86Msg (X_ERROR, "KbdInit: Failed to retrieve e-map (%s)\n",
strerror (errno));
return !Success;
}
priv->no_emap = 0;
}
/* Get the nmap */
if (ioctl (pInfo->fd, NMGMAP, priv->sc_mapbuf2) < 0) {
if (errno != ENAVAIL) {
xf86Msg (X_ERROR, "KbdInit: Failed to retrieve n-map (%s)\n",
strerror (errno));
return !Success;
}
priv->no_nmap = 0;
}
} /* End of if we are on a console */
return Success;
}
static int
KbdOn(InputInfoPtr pInfo, int what)
{
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
ScoKbdPrivPtr priv = (ScoKbdPrivPtr) pKbd->private;
struct termios newtio;
if (pKbd->isConsole) {
ioctl (pInfo->fd, LDNMAP); /* Turn e-mapping off */
ioctl (pInfo->fd, NMNMAP); /* Turn n-mapping off */
newtio = priv->kbdtty; /* structure copy */
newtio.c_iflag = (IGNPAR | IGNBRK) & (~PARMRK) & (~ISTRIP);
newtio.c_oflag = 0;
newtio.c_cflag = CREAD | CS8 | B9600;
newtio.c_lflag = 0;
newtio.c_cc[VTIME]=0;
newtio.c_cc[VMIN]=1;
cfsetispeed(&newtio, 9600);
cfsetospeed(&newtio, 9600);
ioctl(pInfo->fd, XCSETA, &newtio);
/* Now tell the keyboard driver to send us raw scancodes */
if (priv->use_tcs) {
int nm = priv->orig_getsc;
nm &= ~KB_XSCANCODE;
ioctl (pInfo->fd, TCSETSC, &nm);
}
if (priv->use_kd)
ioctl (pInfo->fd, KDSKBMODE, K_RAW);
ioctl (pInfo->fd, PIO_KEYMAP, &priv->noledmap);
}
return Success;
}
static int
KbdOff(InputInfoPtr pInfo, int what)
{
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
ScoKbdPrivPtr priv = (ScoKbdPrivPtr) pKbd->private;
if (pKbd->isConsole) {
/* Revert back to original translate scancode mode */
if (priv->use_tcs)
ioctl (pInfo->fd, TCSETSC, &priv->orig_getsc);
if (priv->use_kd)
ioctl (pInfo->fd, KDSKBMODE, priv->orig_kbm);
ioctl (pInfo->fd, PIO_KEYMAP, &priv->keymap);
if (priv->no_emap)
ioctl (pInfo->fd, LDSMAP, priv->sc_mapbuf);
if (priv->no_nmap)
ioctl (pInfo->fd, NMSMAP, priv->sc_mapbuf2);
ioctl(pInfo->fd, XCSETA, &priv->kbdtty);
}
return Success;
}
static void
stdReadInput(InputInfoPtr pInfo)
{
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
unsigned char rBuf[64];
int nBytes, i;
if ((nBytes = read( pInfo->fd, (char *)rBuf, sizeof(rBuf))) > 0) {
for (i = 0; i < nBytes; i++) {
pKbd->PostEvent(pInfo, rBuf[i] & 0x7f, rBuf[i] & 0x80 ? FALSE : TRUE);
}
}
}
static Bool
OpenKeyboard(InputInfoPtr pInfo)
{
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
int i;
KbdProtocolId prot = PROT_UNKNOWN_KBD;
char *s;
s = xf86SetStrOption(pInfo->options, "Protocol", NULL);
for (i = 0; protocols[i].name; i++) {
if (xf86NameCmp(s, protocols[i].name) == 0) {
prot = protocols[i].id;
break;
}
}
switch (prot) {
case PROT_STD:
pInfo->read_input = stdReadInput;
break;
default:
xf86Msg(X_ERROR,"\"%s\" is not a valid keyboard protocol name\n", s);
xfree(s);
return FALSE;
}
xf86Msg(X_CONFIG, "%s: Protocol: %s\n", pInfo->name, s);
xfree(s);
s = xf86SetStrOption(pInfo->options, "Device", NULL);
if (s == NULL) {
pInfo->fd = xf86Info.consoleFd;
pKbd->isConsole = TRUE;
} else {
pInfo->fd = open(s, O_RDONLY | O_NONBLOCK | O_EXCL);
if (pInfo->fd == -1) {
xf86Msg(X_ERROR, "%s: cannot open \"%s\"\n", pInfo->name, s);
xfree(s);
return FALSE;
}
pKbd->isConsole = FALSE;
xfree(s);
}
if (pKbd->isConsole)
pKbd->vtSwitchSupported = TRUE;
return TRUE;
}
_X_EXPORT Bool
xf86OSKbdPreInit(InputInfoPtr pInfo)
{
KbdDevPtr pKbd = pInfo->private;
pKbd->KbdInit = KbdInit;
pKbd->KbdOn = KbdOn;
pKbd->KbdOff = KbdOff;
pKbd->Bell = SoundBell;
pKbd->SetLeds = SetKbdLeds;
pKbd->GetLeds = GetKbdLeds;
pKbd->SetKbdRepeat = SetKbdRepeat;
pKbd->KbdGetMapping = KbdGetMapping;
pKbd->OpenKeyboard = OpenKeyboard;
pKbd->RemapScanCode = ATScancode;
pKbd->vtSwitchSupported = FALSE;
pKbd->private = xcalloc(sizeof(ScoKbdPrivRec), 1);
if (pKbd->private == NULL) {
xf86Msg(X_ERROR,"can't allocate keyboard OS private data\n");
return FALSE;
}
return TRUE;
}

View File

@ -1,20 +0,0 @@
/* $XFree86$ */
#ifndef SCO_KBD_HDR
#define SCO_KBD_HDR
typedef struct {
int use_tcs;
int use_kd;
int no_nmap;
int no_emap;
int orig_getsc;
int orig_kbm;
struct termios kbdtty;
keymap_t keymap, noledmap;
uchar_t *sc_mapbuf;
uchar_t *sc_mapbuf2;
} ScoKbdPrivRec, *ScoKbdPrivPtr;
extern void KbdGetMapping(InputInfoPtr pInfo, KeySymsPtr pKeySyms,
CARD8 *pModMap);
#endif /* SCO_KBD_HDR */

View File

@ -22,38 +22,34 @@
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* Copyright 2004-2009 Sun Microsystems, Inc. All rights reserved.
/*
* Copyright (c) 2004-2009, Oracle and/or its affiliates. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, and/or sell copies of the Software, and to permit persons
* to whom the Software is furnished to do so, provided that the above
* copyright notice(s) and this permission notice appear in all copies of
* the Software and that both the above copyright notice(s) and this
* permission notice appear in supporting documentation.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
* OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
* INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Except as contained in this notice, the name of a copyright holder
* shall not be used in advertising or otherwise to promote the sale, use
* or other dealings in this Software without prior written authorization
* of the copyright holder.
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <xorg-server.h>
#include "xf86.h"
#include "xf86Priv.h"
#include "xf86_OSlib.h"

View File

@ -1,29 +1,24 @@
/* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
/*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, and/or sell copies of the Software, and to permit persons
* to whom the Software is furnished to do so, provided that the above
* copyright notice(s) and this permission notice appear in all copies of
* the Software and that both the above copyright notice(s) and this
* permission notice appear in supporting documentation.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
* OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
* INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Except as contained in this notice, the name of a copyright holder
* shall not be used in advertising or otherwise to promote the sale, use
* or other dealings in this Software without prior written authorization
* of the copyright holder.
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#ifndef _XORG_SUN_KBD_H_

View File

@ -25,6 +25,7 @@
#include "config.h"
#endif
#include <xorg-server.h>
#include <X11/Xfuncproto.h>
#include <X11/Sunkeysym.h>
#include "atKeynames.h"
@ -40,6 +41,17 @@
#define KEY_Kanji 0x82
#define KEY_Execute 0x83
/*
* Additional Korean 106 Keyboard Keys not defined in atKeynames.h
* These are exactly same USB usage id with Kana(0x90) and Eisu(0x91) keys
* in Mac Japanese keyboard. From /usr/X11/lib/X11/xkb/keycodes/xfree86, these
* are 209 and 210. So these should be 0xc9(209-8=201) and 0xca(210-8=202).
* <EISU> = 210; // Alphanumeric mode on macintosh
* <KANA> = 209; // Kana mode on macintosh
*/
#define KEY_Hangul 0xC9 /* Also Kana in Mac Japanaese kbd */
#define KEY_Hangul_Hanja 0xCA /* Also Eisu in Mac Japanaese kbd */
/* 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
@ -475,8 +487,8 @@ static unsigned char usbmap[256] = {
/* 141 */ KEY_NOTUSED,
/* 142 */ KEY_NOTUSED,
/* 143 */ KEY_NOTUSED,
/* 144 */ KEY_NOTUSED,
/* 145 */ KEY_NOTUSED,
/* 144 */ KEY_Hangul, /* Korean 106 Kbd: Hangul */
/* 145 */ KEY_Hangul_Hanja, /* Korean 106 Kbd: Hanja */
/* 146 */ KEY_NOTUSED,
/* 147 */ KEY_NOTUSED,
/* 148 */ KEY_NOTUSED,

View File

@ -31,7 +31,6 @@
* For Scancodes see notes in atKeynames.h !!!!
*
*/
/* $XConsortium: xf86Keymap.h /main/14 1996/02/21 17:38:47 kaleb $ */
#include "xorg-server.h"