diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2010-07-27 19:08:47 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2010-07-27 19:08:47 +0000 |
commit | 186951746554e4cb4b6439489712d95127d29eb9 (patch) | |
tree | 9da0afa8b07a57eee1b8391c4400b7f85cc4de27 /driver/xf86-input-mouse | |
parent | 2409f4efcd737d0282d055d60e1a53079bdbdf0c (diff) |
Update to xf86-input-mouse 1.5.0. Tested by many with xserver 1.8
ok oga@, todd@.
Diffstat (limited to 'driver/xf86-input-mouse')
-rw-r--r-- | driver/xf86-input-mouse/ChangeLog | 198 | ||||
-rw-r--r-- | driver/xf86-input-mouse/Makefile.in | 5 | ||||
-rw-r--r-- | driver/xf86-input-mouse/aclocal.m4 | 706 | ||||
-rw-r--r-- | driver/xf86-input-mouse/configure | 1042 | ||||
-rw-r--r-- | driver/xf86-input-mouse/configure.ac | 19 | ||||
-rw-r--r-- | driver/xf86-input-mouse/man/Makefile.in | 4 | ||||
-rw-r--r-- | driver/xf86-input-mouse/man/mousedrv.man | 3 | ||||
-rw-r--r-- | driver/xf86-input-mouse/src/Makefile.in | 4 | ||||
-rw-r--r-- | driver/xf86-input-mouse/src/mouse.c | 198 | ||||
-rw-r--r-- | driver/xf86-input-mouse/src/mouse.h | 3 | ||||
-rw-r--r-- | driver/xf86-input-mouse/src/sun_mouse.c | 104 |
11 files changed, 1661 insertions, 625 deletions
diff --git a/driver/xf86-input-mouse/ChangeLog b/driver/xf86-input-mouse/ChangeLog index 84f370fb2..d800f1f2d 100644 --- a/driver/xf86-input-mouse/ChangeLog +++ b/driver/xf86-input-mouse/ChangeLog @@ -1,3 +1,201 @@ +commit 2b6dc8ccfe85356d309e3191cf5b942c6d4e0cd5 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Oct 6 12:09:46 2009 +1000 + + mouse 1.5.0 + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6bae95035db026b7f3189a21942ce7953a6e3437 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Oct 6 12:07:45 2009 +1000 + + Require macros 1.3 for XORG_DEFAULT_OPTIONS + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 622cf1834725c3348cfdc41c12e39b327011c836 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Sat Sep 12 20:18:06 2009 -0700 + + Fix crashes due to MouseBlockHandler/MouseWakeupHandler with invalid devices + + Don't install the handlers if devices failed to open/initalize. + Remove the handlers when disabling Emulate3Soft mode, since otherwise + they'll be left around when device is closed & device structs are freed. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit bc7933171e08215ba28bc06c80ee1bc1febc0522 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Sep 9 11:48:58 2009 +1000 + + mouse 1.4.99.1 + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 04a29c8c8ebc6fbc6f5b67026b659a2ffdd6540b +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Mon Sep 7 11:12:13 2009 -0400 + + xf86-input-mouse: Remove unused .cvsignore file #23776 + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit fa997144458527856b71fa162a105a46af8e688a +Author: Donald Kayser <xorg@kayser.net> +Date: Thu Sep 3 09:22:30 2009 +1000 + + signed/unsigned fixes for delta x,y movement + + Changed the cast of (char) to (signed char) while computing delta x + and delta y mouse movements. The C standard does not define compiler + behavior, and currently with PPC builds, the (char) cast is unsigned. + To guarantee that the compiler will generate signed values, the cast + has been changed + + Signed-off-by: Donald Kayser <xorg@kayser.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f292f23baf4db048917a2acd4def9fab4293bc85 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Aug 20 13:49:52 2009 -0700 + + sun_mouse: Don't try calling ioctls if mouse fd wasn't opened + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit f93c927178a352eec00b3323eb935cc6f27243b0 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Aug 20 13:29:25 2009 -0700 + + Remove check for OS/2 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 1be9e3cf0c491cddfb5985b6b3cc65581313f98f +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Aug 20 13:26:40 2009 -0700 + + sun_mouse: Check if streams module is already on the stack before pushing it + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit bf95ccf496d6674a83c44d559e3eef8729c69449 +Author: Dima Kogan <dkogan@secretsauce.net> +Date: Sun Aug 16 22:27:28 2009 -0700 + + Restrict wheel emulation to a single axis at a time. + + Wheel emulation works for both horizontal and vertical axes. Thus, if a + device doesn't move in perfect straight line, scroll events build up on the + respective other axis. + + In some clients, scroll wheel events have specific meanings other than + scrolling (e.g. mplayer). In these clients, erroneous scrolling events come + at a high cost. + + Thus, if a scroll wheel event is generated for one axis, reset the inertia + of the other axis to 0, avoiding the buildup of these erroneous scrolling + events. + + Signed-off-by: Dima Kogan <dkogan@secretsauce.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2d43329d778d7bfae5d9c99611ad49efa56716a6 +Author: Dima Kogan <dkogan@secretsauce.net> +Date: Sun Aug 16 21:33:43 2009 -0700 + + Allow 0 as wheel emulation button for unconditional scrolling (#20529) + + If wheel emulation is on and the emulation button is 0, then any x/y motion + of the device is converted into wheel events. The device becomes a + scrolling-only device. + + Signed-off-by: Dima Kogan <dkogan@dkogan@cds.caltech.edu> + Signed-off-by: Dima Kogan <dkogan@secretsauce.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0996fd2e3dcac813ad450884e8c117bc4d49b89a +Merge: 66bdf8d 8a3f6f7 +Author: Charlie <root@netbsd.(none)> +Date: Thu Jul 9 10:05:46 2009 +0200 + + Merge branch 'master' of ssh://mbalmer@git.freedesktop.org/git/xorg/driver/xf86-input-mouse + +commit 66bdf8d3f289a3ada44c37f3ceb00fc728975cac +Author: Charlie <root@netbsd.(none)> +Date: Thu Jul 9 08:09:54 2009 +0200 + + Conditionally declare some variables that are only used conditionally. + + Reviewed-by: Matthieu Herrn <matthieu@openbsd.org> + Acked-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8a3f6f75218080b3e7657cb104c6f8e025f358ef +Author: Charlie <root@netbsd.(none)> +Date: Thu Jul 9 08:09:54 2009 +0200 + + Conditionally declare some variables that are only used conditionally. + +commit 2ddc4e9b2882914a56508613fe069c7335c64cc7 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jun 18 16:11:47 2009 +1000 + + Protect against ABI_XINPUT_VERSION 7. + + Missing the actual button and axis labeling, this can be added at a later + point in time. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 91bf15dd2af4bf9a83e317b8821bcbbfdba02338 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 29 10:07:19 2009 +1000 + + Remove ModuleInfoRec and associated bits. + + ModuleInfoRec was removed with 2107becb0ce2ffda001be65728c53563496d8d50 from + the server. The MouseOpts were only used from the ModuleInfoRec, they're + gone now too. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b698a24ab233ec5da2ebd36b5f6f199219de6d44 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Mar 25 08:37:01 2009 +1000 + + Remove xf86MouseProtocolIDToName and xf86MouseProtocolNameToID. + + Both were only used from the xf86-misc extension which is gone from the + server as of 1.6. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6887ca0de8314b6029d5df63777b29c46eeb9442 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Mar 25 08:45:10 2009 +1000 + + Require xorg-server 1.5.99.901 or higher. + + 1.6 is the first server release that has the xf86OSmouse.h and related code + removed. This code has moved into the mouse driver and attempts of using a + mouse driver that provides xf86OSmouse.h with a pre-1.6 xserver may fail. + + See also: + http://lists.freedesktop.org/archives/xorg/2009-March/044501.html + + Reported-by: Jeremy C. Reed <reed@reedmedia.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit abc65bec5c88acd0a8699920e18473cfa007169f +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Wed Feb 4 20:48:33 2009 -0200 + + Janitor: use $PKG_CONFIG and update .gitignore. + + Signed-off-by: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> + commit 5058dc340278f2498dd1b4db129dc6dd6b0e0964 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Jan 9 18:38:57 2009 -0800 diff --git a/driver/xf86-input-mouse/Makefile.in b/driver/xf86-input-mouse/Makefile.in index f0a81408f..b939b6fe2 100644 --- a/driver/xf86-input-mouse/Makefile.in +++ b/driver/xf86-input-mouse/Makefile.in @@ -90,12 +90,14 @@ am__remove_distdir = \ DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -136,6 +138,7 @@ FFLAGS = @FFLAGS@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ GREP = @GREP@ +INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -183,6 +186,7 @@ STRIP = @STRIP@ VERSION = @VERSION@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_LIBS = @XORG_LIBS@ +XORG_SGML_PATH = @XORG_SGML_PATH@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ @@ -203,7 +207,6 @@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ -distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ diff --git a/driver/xf86-input-mouse/aclocal.m4 b/driver/xf86-input-mouse/aclocal.m4 index 3ec9c2c92..3ecdba9f1 100644 --- a/driver/xf86-input-mouse/aclocal.m4 +++ b/driver/xf86-input-mouse/aclocal.m4 @@ -7631,34 +7631,28 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR -dnl xorg-macros.m4. Generated from xorg-macros.m4.in:xorgversion.m4 by configure. +dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. dnl dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. dnl dnl Permission is hereby granted, free of charge, to any person obtaining a -dnl copy of this software and associated documentation files (the -dnl "Software"), to deal in the Software without restriction, including -dnl without limitation the rights to use, copy, modify, merge, publish, -dnl distribute, and/or sell copies of the Software, and to permit persons -dnl to whom the Software is furnished to do so, provided that the above -dnl copyright notice(s) and this permission notice appear in all copies of -dnl the Software and that both the above copyright notice(s) and this -dnl permission notice appear in supporting documentation. +dnl copy of this software and associated documentation files (the "Software"), +dnl to deal in the Software without restriction, including without limitation +dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, +dnl and/or sell copies of the Software, and to permit persons to whom the +dnl Software is furnished to do so, subject to the following conditions: dnl -dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL -dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING -dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, -dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION -dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +dnl The above copyright notice and this permission notice (including the next +dnl paragraph) shall be included in all copies or substantial portions of the +dnl Software. dnl -dnl Except as contained in this notice, the name of a copyright holder -dnl shall not be used in advertising or otherwise to promote the sale, use -dnl or other dealings in this Software without prior written authorization -dnl of the copyright holder. +dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +dnl DEALINGS IN THE SOFTWARE. # XORG_MACROS_VERSION(required-version) # ------------------------------------- @@ -7668,27 +7662,24 @@ dnl of the copyright holder. # your configure.ac with the minimum required version, such as: # XORG_MACROS_VERSION(1.1) # -# To force at least a version with this macro defined, also add: -# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) +# To ensure that this macro is defined, also add: +# m4_ifndef([XORG_MACROS_VERSION], +# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) # # # See the "minimum version" comment for each macro you use to see what # version you require. -AC_DEFUN([XORG_MACROS_VERSION],[ - [XORG_MACROS_needed_version=$1 - XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` - XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] - AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) - [XORG_MACROS_version=1.2.1 - XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` - XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] - if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then - AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) - fi - if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then - AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer]) - fi - AC_MSG_RESULT([yes, $XORG_MACROS_version]) +m4_defun([XORG_MACROS_VERSION],[ +m4_define([vers_have], [1.7.0]) +m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) +m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) +m4_if(m4_cmp(maj_have, maj_needed), 0,, + [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) +m4_if(m4_version_compare(vers_have, [$1]), -1, + [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) +m4_undefine([vers_have]) +m4_undefine([maj_have]) +m4_undefine([maj_needed]) ]) # XORG_MACROS_VERSION # XORG_PROG_RAWCPP() @@ -7820,6 +7811,31 @@ AC_SUBST([DRIVER_MAN_DIR]) AC_SUBST([ADMIN_MAN_DIR]) ]) # XORG_MANPAGE_SECTIONS +# XORG_CHECK_SGML_DOCTOOLS +# ------------------------ +# Minimum version: 1.7.0 +# +# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent +# provided by xorg-sgml-doctools, if installed. +AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ +AC_MSG_CHECKING([for X.Org SGML entities]) +XORG_SGML_PATH= +PKG_CHECK_EXISTS([xorg-sgml-doctools], + [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], + [if test x"$cross_compiling" != x"yes" ; then + AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], + [XORG_SGML_PATH=$prefix/share/sgml]) + fi]) + +if test "x$XORG_SGML_PATH" != "x" ; then + AC_MSG_RESULT([$XORG_SGML_PATH]) +else + AC_MSG_RESULT([no]) +fi + +AC_SUBST(XORG_SGML_PATH) +]) # XORG_CHECK_SGML_DOCTOOLS + # XORG_CHECK_LINUXDOC # ------------------- # Minimum version: 1.0.0 @@ -7829,23 +7845,14 @@ AC_SUBST([ADMIN_MAN_DIR]) # Whether or not the necessary tools and files are found can be checked # with the AM_CONDITIONAL "BUILD_LINUXDOC" AC_DEFUN([XORG_CHECK_LINUXDOC],[ -if test x$XORG_SGML_PATH = x ; then - XORG_SGML_PATH=$prefix/share/sgml -fi -HAVE_DEFS_ENT= - -if test x"$cross_compiling" = x"yes" ; then - HAVE_DEFS_ENT=no -else - AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) -fi +AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) AC_PATH_PROG(LINUXDOC, linuxdoc) AC_PATH_PROG(PS2PDF, ps2pdf) -AC_MSG_CHECKING([Whether to build documentation]) +AC_MSG_CHECKING([whether to build documentation]) -if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then +if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then BUILDDOC=yes else BUILDDOC=no @@ -7855,7 +7862,7 @@ AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) AC_MSG_RESULT([$BUILDDOC]) -AC_MSG_CHECKING([Whether to build pdf documentation]) +AC_MSG_CHECKING([whether to build pdf documentation]) if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then BUILDPDFDOC=yes @@ -7887,48 +7894,44 @@ AC_SUBST(MAKE_HTML) # indicates whether the necessary tools and files are found and, if set, # $(MAKE_XXX) blah.sgml will produce blah.xxx. AC_DEFUN([XORG_CHECK_DOCBOOK],[ -if test x$XORG_SGML_PATH = x ; then - XORG_SGML_PATH=$prefix/share/sgml -fi -HAVE_DEFS_ENT= +AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) + BUILDTXTDOC=no BUILDPDFDOC=no BUILDPSDOC=no BUILDHTMLDOC=no -AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) - AC_PATH_PROG(DOCBOOKPS, docbook2ps) AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) AC_PATH_PROG(DOCBOOKHTML, docbook2html) AC_PATH_PROG(DOCBOOKTXT, docbook2txt) -AC_MSG_CHECKING([Whether to build text documentation]) -if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && +AC_MSG_CHECKING([whether to build text documentation]) +if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && test x$BUILD_TXTDOC != xno; then BUILDTXTDOC=yes fi AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) AC_MSG_RESULT([$BUILDTXTDOC]) -AC_MSG_CHECKING([Whether to build PDF documentation]) -if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && +AC_MSG_CHECKING([whether to build PDF documentation]) +if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && test x$BUILD_PDFDOC != xno; then BUILDPDFDOC=yes fi AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) AC_MSG_RESULT([$BUILDPDFDOC]) -AC_MSG_CHECKING([Whether to build PostScript documentation]) -if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && +AC_MSG_CHECKING([whether to build PostScript documentation]) +if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && test x$BUILD_PSDOC != xno; then BUILDPSDOC=yes fi AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) AC_MSG_RESULT([$BUILDPSDOC]) -AC_MSG_CHECKING([Whether to build HTML documentation]) -if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && +AC_MSG_CHECKING([whether to build HTML documentation]) +if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && test x$BUILD_HTMLDOC != xno; then BUILDHTMLDOC=yes fi @@ -7946,6 +7949,490 @@ AC_SUBST(MAKE_PDF) AC_SUBST(MAKE_HTML) ]) # XORG_CHECK_DOCBOOK +# XORG_WITH_XMLTO([MIN-VERSION]) +# ---------------- +# Minimum version: 1.5.0 +# +# Documentation tools are not always available on all platforms and sometimes +# not at the appropriate level. This macro enables a module to test for the +# presence of the tool and obtain it's path in separate variables. Coupled with +# the --with-xmlto option, it allows maximum flexibilty in making decisions +# as whether or not to use the xmlto package. +# +# Interface to module: +# HAVE_XMLTO: used in makefiles to conditionally generate documentation +# XMLTO: returns the path of the xmlto program found +# returns the path set by the user in the environment +# --with-xmlto: 'yes' user instructs the module to use xmlto +# 'no' user instructs the module not to use xmlto +# +# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. +# +AC_DEFUN([XORG_WITH_XMLTO],[ +AC_ARG_VAR([XMLTO], [Path to xmlto command]) +AC_ARG_WITH(xmlto, + AS_HELP_STRING([--with-xmlto], + [Use xmlto to regenerate documentation (default: yes, if installed)]), + [use_xmlto=$withval], [use_xmlto=auto]) + +if test "x$use_xmlto" = x"auto"; then + AC_PATH_PROG([XMLTO], [xmlto]) + if test "x$XMLTO" = "x"; then + AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) + have_xmlto=no + else + have_xmlto=yes + fi +elif test "x$use_xmlto" = x"yes" ; then + AC_PATH_PROG([XMLTO], [xmlto]) + if test "x$XMLTO" = "x"; then + AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) + fi + have_xmlto=yes +elif test "x$use_xmlto" = x"no" ; then + if test "x$XMLTO" != "x"; then + AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) + fi + have_xmlto=no +else + AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) +fi +m4_ifval([$1], +[if test "$have_xmlto" = yes; then + # scrape the xmlto version + AC_MSG_CHECKING([the xmlto version]) + xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` + AC_MSG_RESULT([$xmlto_version]) + AS_VERSION_COMPARE([$xmlto_version], [$1], + [if test "x$use_xmlto" = xauto; then + AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) + have_xmlto=no + else + AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) + fi]) +fi]) +AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) +]) # XORG_WITH_XMLTO + +# XORG_WITH_ASCIIDOC([MIN-VERSION]) +# ---------------- +# Minimum version: 1.5.0 +# +# Documentation tools are not always available on all platforms and sometimes +# not at the appropriate level. This macro enables a module to test for the +# presence of the tool and obtain it's path in separate variables. Coupled with +# the --with-asciidoc option, it allows maximum flexibilty in making decisions +# as whether or not to use the asciidoc package. +# +# Interface to module: +# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation +# ASCIIDOC: returns the path of the asciidoc program found +# returns the path set by the user in the environment +# --with-asciidoc: 'yes' user instructs the module to use asciidoc +# 'no' user instructs the module not to use asciidoc +# +# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. +# +AC_DEFUN([XORG_WITH_ASCIIDOC],[ +AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) +AC_ARG_WITH(asciidoc, + AS_HELP_STRING([--with-asciidoc], + [Use asciidoc to regenerate documentation (default: yes, if installed)]), + [use_asciidoc=$withval], [use_asciidoc=auto]) + +if test "x$use_asciidoc" = x"auto"; then + AC_PATH_PROG([ASCIIDOC], [asciidoc]) + if test "x$ASCIIDOC" = "x"; then + AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) + have_asciidoc=no + else + have_asciidoc=yes + fi +elif test "x$use_asciidoc" = x"yes" ; then + AC_PATH_PROG([ASCIIDOC], [asciidoc]) + if test "x$ASCIIDOC" = "x"; then + AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) + fi + have_asciidoc=yes +elif test "x$use_asciidoc" = x"no" ; then + if test "x$ASCIIDOC" != "x"; then + AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) + fi + have_asciidoc=no +else + AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) +fi +m4_ifval([$1], +[if test "$have_asciidoc" = yes; then + # scrape the asciidoc version + AC_MSG_CHECKING([the asciidoc version]) + asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` + AC_MSG_RESULT([$asciidoc_version]) + AS_VERSION_COMPARE([$asciidoc_version], [$1], + [if test "x$use_asciidoc" = xauto; then + AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) + have_asciidoc=no + else + AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) + fi]) +fi]) +AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) +]) # XORG_WITH_ASCIIDOC + +# XORG_WITH_DOXYGEN([MIN-VERSION]) +# -------------------------------- +# Minimum version: 1.5.0 +# +# Documentation tools are not always available on all platforms and sometimes +# not at the appropriate level. This macro enables a module to test for the +# presence of the tool and obtain it's path in separate variables. Coupled with +# the --with-doxygen option, it allows maximum flexibilty in making decisions +# as whether or not to use the doxygen package. +# +# Interface to module: +# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation +# DOXYGEN: returns the path of the doxygen program found +# returns the path set by the user in the environment +# --with-doxygen: 'yes' user instructs the module to use doxygen +# 'no' user instructs the module not to use doxygen +# +# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. +# +AC_DEFUN([XORG_WITH_DOXYGEN],[ +AC_ARG_VAR([DOXYGEN], [Path to doxygen command]) +AC_ARG_WITH(doxygen, + AS_HELP_STRING([--with-doxygen], + [Use doxygen to regenerate documentation (default: yes, if installed)]), + [use_doxygen=$withval], [use_doxygen=auto]) + +if test "x$use_doxygen" = x"auto"; then + AC_PATH_PROG([DOXYGEN], [doxygen]) + if test "x$DOXYGEN" = "x"; then + AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) + have_doxygen=no + else + have_doxygen=yes + fi +elif test "x$use_doxygen" = x"yes" ; then + AC_PATH_PROG([DOXYGEN], [doxygen]) + if test "x$DOXYGEN" = "x"; then + AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) + fi + have_doxygen=yes +elif test "x$use_doxygen" = x"no" ; then + if test "x$DOXYGEN" != "x"; then + AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) + fi + have_doxygen=no +else + AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) +fi +m4_ifval([$1], +[if test "$have_doxygen" = yes; then + # scrape the doxygen version + AC_MSG_CHECKING([the doxygen version]) + doxygen_version=`$DOXYGEN --version 2>/dev/null` + AC_MSG_RESULT([$doxygen_version]) + AS_VERSION_COMPARE([$doxygen_version], [$1], + [if test "x$use_doxygen" = xauto; then + AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) + have_doxygen=no + else + AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) + fi]) +fi]) +AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) +]) # XORG_WITH_DOXYGEN + +# XORG_WITH_GROFF +# ---------------- +# Minimum version: 1.6.0 +# +# Documentation tools are not always available on all platforms and sometimes +# not at the appropriate level. This macro enables a module to test for the +# presence of the tool and obtain it's path in separate variables. Coupled with +# the --with-groff option, it allows maximum flexibilty in making decisions +# as whether or not to use the groff package. +# +# Interface to module: +# HAVE_GROFF: used in makefiles to conditionally generate documentation +# HAVE_GROFF_MM: the memorandum macros (-mm) package +# HAVE_GROFF_MS: the -ms macros package +# GROFF: returns the path of the groff program found +# returns the path set by the user in the environment +# --with-groff: 'yes' user instructs the module to use groff +# 'no' user instructs the module not to use groff +# +# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. +# +# OS and distros often splits groff in a basic and full package, the former +# having the groff program and the later having devices, fonts and macros +# Checking for the groff executable is not enough. +# +# If macros are missing, we cannot assume that groff is useless, so we don't +# unset HAVE_GROFF or GROFF env variables. +# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. +# +AC_DEFUN([XORG_WITH_GROFF],[ +AC_ARG_VAR([GROFF], [Path to groff command]) +AC_ARG_WITH(groff, + AS_HELP_STRING([--with-groff], + [Use groff to regenerate documentation (default: yes, if installed)]), + [use_groff=$withval], [use_groff=auto]) + +if test "x$use_groff" = x"auto"; then + AC_PATH_PROG([GROFF], [groff]) + if test "x$GROFF" = "x"; then + AC_MSG_WARN([groff not found - documentation targets will be skipped]) + have_groff=no + else + have_groff=yes + fi +elif test "x$use_groff" = x"yes" ; then + AC_PATH_PROG([GROFF], [groff]) + if test "x$GROFF" = "x"; then + AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) + fi + have_groff=yes +elif test "x$use_groff" = x"no" ; then + if test "x$GROFF" != "x"; then + AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) + fi + have_groff=no +else + AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) +fi +# We have groff, test for the presence of the macro packages +if test "x$have_groff" = x"yes"; then + AC_MSG_CHECKING([for ${GROFF} -ms macros]) + if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then + groff_ms_works=yes + else + groff_ms_works=no + fi + AC_MSG_RESULT([$groff_ms_works]) + AC_MSG_CHECKING([for ${GROFF} -mm macros]) + if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then + groff_mm_works=yes + else + groff_mm_works=no + fi + AC_MSG_RESULT([$groff_mm_works]) +fi +AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) +AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) +AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) +]) # XORG_WITH_GROFF + +# XORG_WITH_FOP +# ---------------- +# Minimum version: 1.6.0 +# +# Documentation tools are not always available on all platforms and sometimes +# not at the appropriate level. This macro enables a module to test for the +# presence of the tool and obtain it's path in separate variables. Coupled with +# the --with-fop option, it allows maximum flexibilty in making decisions +# as whether or not to use the fop package. +# +# Interface to module: +# HAVE_FOP: used in makefiles to conditionally generate documentation +# FOP: returns the path of the fop program found +# returns the path set by the user in the environment +# --with-fop: 'yes' user instructs the module to use fop +# 'no' user instructs the module not to use fop +# +# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. +# +AC_DEFUN([XORG_WITH_FOP],[ +AC_ARG_VAR([FOP], [Path to fop command]) +AC_ARG_WITH(fop, + AS_HELP_STRING([--with-fop], + [Use fop to regenerate documentation (default: yes, if installed)]), + [use_fop=$withval], [use_fop=auto]) + +if test "x$use_fop" = x"auto"; then + AC_PATH_PROG([FOP], [fop]) + if test "x$FOP" = "x"; then + AC_MSG_WARN([fop not found - documentation targets will be skipped]) + have_fop=no + else + have_fop=yes + fi +elif test "x$use_fop" = x"yes" ; then + AC_PATH_PROG([FOP], [fop]) + if test "x$FOP" = "x"; then + AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) + fi + have_fop=yes +elif test "x$use_fop" = x"no" ; then + if test "x$FOP" != "x"; then + AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) + fi + have_fop=no +else + AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) +fi +AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) +]) # XORG_WITH_FOP + +# XORG_WITH_PS2PDF +# ---------------- +# Minimum version: 1.6.0 +# +# Documentation tools are not always available on all platforms and sometimes +# not at the appropriate level. This macro enables a module to test for the +# presence of the tool and obtain it's path in separate variables. Coupled with +# the --with-ps2pdf option, it allows maximum flexibilty in making decisions +# as whether or not to use the ps2pdf package. +# +# Interface to module: +# HAVE_PS2PDF: used in makefiles to conditionally generate documentation +# PS2PDF: returns the path of the ps2pdf program found +# returns the path set by the user in the environment +# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf +# 'no' user instructs the module not to use ps2pdf +# +# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. +# +AC_DEFUN([XORG_WITH_PS2PDF],[ +AC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) +AC_ARG_WITH(ps2pdf, + AS_HELP_STRING([--with-ps2pdf], + [Use ps2pdf to regenerate documentation (default: yes, if installed)]), + [use_ps2pdf=$withval], [use_ps2pdf=auto]) + +if test "x$use_ps2pdf" = x"auto"; then + AC_PATH_PROG([PS2PDF], [ps2pdf]) + if test "x$PS2PDF" = "x"; then + AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) + have_ps2pdf=no + else + have_ps2pdf=yes + fi +elif test "x$use_ps2pdf" = x"yes" ; then + AC_PATH_PROG([PS2PDF], [ps2pdf]) + if test "x$PS2PDF" = "x"; then + AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) + fi + have_ps2pdf=yes +elif test "x$use_ps2pdf" = x"no" ; then + if test "x$PS2PDF" != "x"; then + AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) + fi + have_ps2pdf=no +else + AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) +fi +AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) +]) # XORG_WITH_PS2PDF + +# XORG_ENABLE_DOCS (enable_docs=yes) +# ---------------- +# Minimum version: 1.6.0 +# +# Documentation tools are not always available on all platforms and sometimes +# not at the appropriate level. This macro enables a builder to skip all +# documentation targets except traditional man pages. +# Combined with the specific tool checking macros XORG_WITH_*, it provides +# maximum flexibilty in controlling documentation building. +# Refer to: +# XORG_WITH_XMLTO --with-xmlto +# XORG_WITH_ASCIIDOC --with-asciidoc +# XORG_WITH_DOXYGEN --with-doxygen +# XORG_WITH_FOP --with-fop +# XORG_WITH_GROFF --with-groff +# XORG_WITH_PS2PDF --with-ps2pdf +# +# Interface to module: +# ENABLE_DOCS: used in makefiles to conditionally generate documentation +# --enable-docs: 'yes' user instructs the module to generate docs +# 'no' user instructs the module not to generate docs +# parm1: specify the default value, yes or no. +# +AC_DEFUN([XORG_ENABLE_DOCS],[ +default=$1 +if test "x$default" = x ; then + default="yes" +fi +AC_ARG_ENABLE(docs, + AS_HELP_STRING([--enable-docs], + [Enable building the documentation (default: yes)]), + [build_docs=$enableval], [build_docs=$default]) +AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) +AC_MSG_CHECKING([whether to build documentation]) +AC_MSG_RESULT([$build_docs]) +]) # XORG_ENABLE_DOCS + +# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) +# ---------------- +# Minimum version: 1.6.0 +# +# This macro enables a builder to skip all developer documentation. +# Combined with the specific tool checking macros XORG_WITH_*, it provides +# maximum flexibilty in controlling documentation building. +# Refer to: +# XORG_WITH_XMLTO --with-xmlto +# XORG_WITH_ASCIIDOC --with-asciidoc +# XORG_WITH_DOXYGEN --with-doxygen +# XORG_WITH_FOP --with-fop +# XORG_WITH_GROFF --with-groff +# XORG_WITH_PS2PDF --with-ps2pdf +# +# Interface to module: +# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs +# --enable-devel-docs: 'yes' user instructs the module to generate developer docs +# 'no' user instructs the module not to generate developer docs +# parm1: specify the default value, yes or no. +# +AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ +devel_default=$1 +if test "x$devel_default" = x ; then + devel_default="yes" +fi +AC_ARG_ENABLE(devel-docs, + AS_HELP_STRING([--enable-devel-docs], + [Enable building the developer documentation (default: yes)]), + [build_devel_docs=$enableval], [build_devel_docs=$devel_default]) +AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) +AC_MSG_CHECKING([whether to build developer documentation]) +AC_MSG_RESULT([$build_devel_docs]) +]) # XORG_ENABLE_DEVEL_DOCS + +# XORG_ENABLE_SPECS (enable_specs=yes) +# ---------------- +# Minimum version: 1.6.0 +# +# This macro enables a builder to skip all functional specification targets. +# Combined with the specific tool checking macros XORG_WITH_*, it provides +# maximum flexibilty in controlling documentation building. +# Refer to: +# XORG_WITH_XMLTO --with-xmlto +# XORG_WITH_ASCIIDOC --with-asciidoc +# XORG_WITH_DOXYGEN --with-doxygen +# XORG_WITH_FOP --with-fop +# XORG_WITH_GROFF --with-groff +# XORG_WITH_PS2PDF --with-ps2pdf +# +# Interface to module: +# ENABLE_SPECS: used in makefiles to conditionally generate specs +# --enable-specs: 'yes' user instructs the module to generate specs +# 'no' user instructs the module not to generate specs +# parm1: specify the default value, yes or no. +# +AC_DEFUN([XORG_ENABLE_SPECS],[ +spec_default=$1 +if test "x$spec_default" = x ; then + spec_default="yes" +fi +AC_ARG_ENABLE(specs, + AS_HELP_STRING([--enable-specs], + [Enable building the specs (default: yes)]), + [build_specs=$enableval], [build_specs=$spec_default]) +AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) +AC_MSG_CHECKING([whether to build functional specifications]) +AC_MSG_RESULT([$build_specs]) +]) # XORG_ENABLE_SPECS + # XORG_CHECK_MALLOC_ZERO # ---------------------- # Minimum version: 1.0.0 @@ -7955,7 +8442,7 @@ AC_SUBST(MAKE_HTML) # their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ AC_ARG_ENABLE(malloc0returnsnull, - AC_HELP_STRING([--enable-malloc0returnsnull], + AS_HELP_STRING([--enable-malloc0returnsnull], [malloc(0) returns NULL (default: auto)]), [MALLOC_ZERO_RETURNS_NULL=$enableval], [MALLOC_ZERO_RETURNS_NULL=auto]) @@ -7975,7 +8462,8 @@ main() { exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); }], [MALLOC_ZERO_RETURNS_NULL=yes], - [MALLOC_ZERO_RETURNS_NULL=no]) + [MALLOC_ZERO_RETURNS_NULL=no], + [MALLOC_ZERO_RETURNS_NULL=yes]) fi AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) @@ -8007,7 +8495,7 @@ AC_SUBST([XTMALLOC_ZERO_CFLAGS]) AC_DEFUN([XORG_WITH_LINT],[ # Allow checking code with lint, sparse, etc. -AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], +AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], [Use a lint-style source code checker (default: disabled)])], [use_lint=$withval], [use_lint=no]) if test "x$use_lint" = "xyes" ; then @@ -8048,7 +8536,7 @@ AM_CONDITIONAL(LINT, [test x$LINT != xno]) AC_DEFUN([XORG_LINT_LIBRARY],[ AC_REQUIRE([XORG_WITH_LINT]) # Build lint "library" for more indepth checks of programs calling this library -AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], +AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], [Create lint library (default: disabled)])], [make_lint_lib=$enableval], [make_lint_lib=no]) if test "x$make_lint_lib" != "xno" ; then @@ -8077,10 +8565,10 @@ AC_REQUIRE([AC_PROG_CC]) if test "x$GCC" = xyes ; then CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ -Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ --Wbad-function-cast" - case `gcc -dumpversion` in +-Wbad-function-cast -Wformat=2" + case `$CC -dumpversion` in 3.4.* | 4.*) - CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement" + CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" ;; esac else @@ -8091,6 +8579,69 @@ else fi AC_SUBST(CWARNFLAGS) ]) # XORG_CWARNFLAGS + +# XORG_STRICT_OPTION +# ----------------------- +# Minimum version: 1.3.0 +# +# Add configure option to enable strict compilation +AC_DEFUN([XORG_STRICT_OPTION], [ +AC_REQUIRE([AC_PROG_CC]) +AC_REQUIRE([AC_PROG_CC_C99]) +AC_REQUIRE([XORG_CWARNFLAGS]) + +AC_ARG_ENABLE(strict-compilation, + AS_HELP_STRING([--enable-strict-compilation], + [Enable all warnings from compiler and make them errors (default: disabled)]), + [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) +if test "x$STRICT_COMPILE" = "xyes"; then + AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) + AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) + if test "x$GCC" = xyes ; then + STRICT_CFLAGS="-pedantic -Werror" + elif test "x$SUNCC" = "xyes"; then + STRICT_CFLAGS="-errwarn" + elif test "x$INTELCC" = "xyes"; then + STRICT_CFLAGS="-Werror" + fi +fi +CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" +AC_SUBST([CWARNFLAGS]) +]) # XORG_STRICT_OPTION + +# XORG_DEFAULT_OPTIONS +# -------------------- +# Minimum version: 1.3.0 +# +# Defines default options for X.Org modules. +# +AC_DEFUN([XORG_DEFAULT_OPTIONS], [ +XORG_CWARNFLAGS +XORG_STRICT_OPTION +XORG_RELEASE_VERSION +XORG_CHANGELOG +XORG_INSTALL +XORG_MANPAGE_SECTIONS +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], + [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) +]) # XORG_DEFAULT_OPTIONS + +# XORG_INSTALL() +# ---------------- +# Minimum version: 1.4.0 +# +# Defines the variable INSTALL_CMD as the command to copy +# INSTALL from $prefix/share/util-macros. +# +AC_DEFUN([XORG_INSTALL], [ +AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` +INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ +mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ +|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ +echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" +AC_SUBST([INSTALL_CMD]) +]) # XORG_INSTALL dnl Copyright 2005 Red Hat, Inc dnl dnl Permission to use, copy, modify, distribute, and sell this software and its @@ -8125,7 +8676,7 @@ dnl AC_DEFUN([XORG_RELEASE_VERSION],[ AC_ARG_WITH(release-version, - AC_HELP_STRING([--with-release-version=STRING], + AS_HELP_STRING([--with-release-version=STRING], [Use release version string in package name]), [RELEASE_VERSION="$withval"], [RELEASE_VERSION=""]) @@ -8160,14 +8711,13 @@ AC_DEFUN([XORG_RELEASE_VERSION],[ # Defines the variable CHANGELOG_CMD as the command to generate # ChangeLog from git. # -# Arrange that distcleancheck ignores ChangeLog left over by distclean. # AC_DEFUN([XORG_CHANGELOG], [ -CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ -mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ +CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ +mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ +|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ echo 'git directory not found: installing possibly empty changelog.' >&2)" AC_SUBST([CHANGELOG_CMD]) -AC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) ]) # XORG_CHANGELOG dnl Copyright 2005 Red Hat, Inc diff --git a/driver/xf86-input-mouse/configure b/driver/xf86-input-mouse/configure index f9a3cdd1b..ff31704a9 100644 --- a/driver/xf86-input-mouse/configure +++ b/driver/xf86-input-mouse/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.62 for xf86-input-mouse 1.4.0. +# Generated by GNU Autoconf 2.62 for xf86-input-mouse 1.5.0. # # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>. # @@ -750,8 +750,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='xf86-input-mouse' PACKAGE_TARNAME='xf86-input-mouse' -PACKAGE_VERSION='1.4.0' -PACKAGE_STRING='xf86-input-mouse 1.4.0' +PACKAGE_VERSION='1.5.0' +PACKAGE_STRING='xf86-input-mouse 1.5.0' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' ac_unique_file="Makefile.am" @@ -899,15 +899,9 @@ FFLAGS ac_ct_F77 LIBTOOL CWARNFLAGS -inputdir +CHANGELOG_CMD PKG_CONFIG -XORG_CFLAGS -XORG_LIBS -OS_MOUSE_NAME -LINT -LINT_FLAGS -LINT_TRUE -LINT_FALSE +INSTALL_CMD APP_MAN_SUFFIX LIB_MAN_SUFFIX FILE_MAN_SUFFIX @@ -920,8 +914,16 @@ FILE_MAN_DIR MISC_MAN_DIR DRIVER_MAN_DIR ADMIN_MAN_DIR -CHANGELOG_CMD -distcleancheck_listfiles +AM_DEFAULT_VERBOSITY +inputdir +XORG_CFLAGS +XORG_LIBS +OS_MOUSE_NAME +LINT +LINT_FLAGS +LINT_TRUE +LINT_FALSE +XORG_SGML_PATH LINUXDOC PS2PDF BUILD_LINUXDOC_TRUE @@ -946,9 +948,10 @@ with_gnu_ld enable_libtool_lock with_pic with_tags +enable_strict_compilation +with_release_version with_xorg_module_dir with_lint -with_release_version ' ac_precious_vars='build_alias host_alias @@ -1520,7 +1523,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures xf86-input-mouse 1.4.0 to adapt to many kinds of systems. +\`configure' configures xf86-input-mouse 1.5.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1591,7 +1594,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xf86-input-mouse 1.4.0:";; + short | recursive ) echo "Configuration of xf86-input-mouse 1.5.0:";; esac cat <<\_ACEOF @@ -1608,6 +1611,9 @@ Optional Features: --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-libtool-lock avoid locking (might break parallel builds) + --enable-strict-compilation + Enable all warnings from compiler and make them + errors (default: disabled) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1616,13 +1622,13 @@ Optional Packages: --with-pic try to use only PIC/non-PIC objects [default=use both] --with-tags[=TAGS] include additional configurations [automatic] + --with-release-version=STRING + Use release version string in package name --with-xorg-module-dir=DIR Default xorg module directory [default=$libdir/xorg/modules] --with-lint Use a lint-style source code checker (default: disabled) - --with-release-version=STRING - Use release version string in package name Some influential environment variables: CC C compiler command @@ -1708,7 +1714,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -xf86-input-mouse configure 1.4.0 +xf86-input-mouse configure 1.5.0 generated by GNU Autoconf 2.62 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1722,7 +1728,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xf86-input-mouse $as_me 1.4.0, which was +It was created by xf86-input-mouse $as_me 1.5.0, which was generated by GNU Autoconf 2.62. Invocation command line was $ $0 $@ @@ -2089,29 +2095,17 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -# Require xorg-macros version >= 1.2.0 for XORG_CWARNFLAGS & XORG_CHANGELOG +# Require xorg-macros version >= 1.3.0 for XORG_DEFAULT_OPTIONS + + + + + + + + - XORG_MACROS_needed_version=1.2 - XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` - XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'` - { $as_echo "$as_me:$LINENO: checking if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}" >&5 -$as_echo_n "checking if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}... " >&6; } - XORG_MACROS_version=1.2.1 - XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` - XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'` - if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then - { { $as_echo "$as_me:$LINENO: error: configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x" >&5 -$as_echo "$as_me: error: configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x" >&2;} - { (exit 1); exit 1; }; } - fi - if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then - { { $as_echo "$as_me:$LINENO: error: configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer" >&5 -$as_echo "$as_me: error: configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer" >&2;} - { (exit 1); exit 1; }; } - fi - { $as_echo "$as_me:$LINENO: result: yes, $XORG_MACROS_version" >&5 -$as_echo "yes, $XORG_MACROS_version" >&6; } @@ -2398,7 +2392,7 @@ fi # Define the identity of the package. PACKAGE='xf86-input-mouse' - VERSION='1.4.0' + VERSION='1.5.0' cat >>confdefs.h <<_ACEOF @@ -4463,7 +4457,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4466 "configure"' > conftest.$ac_ext + echo '#line 4460 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7571,11 +7565,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7574: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7568: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7578: \$? = $ac_status" >&5 + echo "$as_me:7572: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7861,11 +7855,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7864: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7858: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7868: \$? = $ac_status" >&5 + echo "$as_me:7862: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7965,11 +7959,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7968: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7962: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7972: \$? = $ac_status" >&5 + echo "$as_me:7966: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -10365,7 +10359,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 10368 "configure" +#line 10362 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10465,7 +10459,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 10468 "configure" +#line 10462 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12874,11 +12868,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12877: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12871: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12881: \$? = $ac_status" >&5 + echo "$as_me:12875: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -12978,11 +12972,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12981: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12975: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12985: \$? = $ac_status" >&5 + echo "$as_me:12979: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14561,11 +14555,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14564: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14558: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14568: \$? = $ac_status" >&5 + echo "$as_me:14562: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -14665,11 +14659,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14668: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14662: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14672: \$? = $ac_status" >&5 + echo "$as_me:14666: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -16880,11 +16874,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16883: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16877: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16887: \$? = $ac_status" >&5 + echo "$as_me:16881: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17170,11 +17164,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17173: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17167: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17177: \$? = $ac_status" >&5 + echo "$as_me:17171: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17274,11 +17268,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17277: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17271: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17281: \$? = $ac_status" >&5 + echo "$as_me:17275: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -20757,15 +20751,338 @@ else fi + { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C99" >&5 +$as_echo_n "checking for $CC option to accept ISO C99... " >&6; } +if test "${ac_cv_prog_cc_c99+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdarg.h> +#include <stdbool.h> +#include <stdlib.h> +#include <wchar.h> +#include <stdio.h> + +// Check varargs macros. These examples are taken from C99 6.10.3.5. +#define debug(...) fprintf (stderr, __VA_ARGS__) +#define showlist(...) puts (#__VA_ARGS__) +#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) +static void +test_varargs_macros (void) +{ + int x = 1234; + int y = 5678; + debug ("Flag"); + debug ("X = %d\n", x); + showlist (The first, second, and third items.); + report (x>y, "x is %d but y is %d", x, y); +} + +// Check long long types. +#define BIG64 18446744073709551615ull +#define BIG32 4294967295ul +#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) +#if !BIG_OK + your preprocessor is broken; +#endif +#if BIG_OK +#else + your preprocessor is broken; +#endif +static long long int bignum = -9223372036854775807LL; +static unsigned long long int ubignum = BIG64; + +struct incomplete_array +{ + int datasize; + double data[]; +}; + +struct named_init { + int number; + const wchar_t *name; + double average; +}; + +typedef const char *ccp; + +static inline int +test_restrict (ccp restrict text) +{ + // See if C++-style comments work. + // Iterate through items via the restricted pointer. + // Also check for declarations in for loops. + for (unsigned int i = 0; *(text+i) != '\0'; ++i) + continue; + return 0; +} + +// Check varargs and va_copy. +static void +test_varargs (const char *format, ...) +{ + va_list args; + va_start (args, format); + va_list args_copy; + va_copy (args_copy, args); + + const char *str; + int number; + float fnumber; + + while (*format) + { + switch (*format++) + { + case 's': // string + str = va_arg (args_copy, const char *); + break; + case 'd': // int + number = va_arg (args_copy, int); + break; + case 'f': // float + fnumber = va_arg (args_copy, double); + break; + default: + break; + } + } + va_end (args_copy); + va_end (args); +} + +int +main () +{ + + // Check bool. + _Bool success = false; + + // Check restrict. + if (test_restrict ("String literal") == 0) + success = true; + char *restrict newvar = "Another string"; + + // Check varargs. + test_varargs ("s, d' f .", "string", 65, 34.234); + test_varargs_macros (); + + // Check flexible array members. + struct incomplete_array *ia = + malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); + ia->datasize = 10; + for (int i = 0; i < ia->datasize; ++i) + ia->data[i] = i * 1.234; + + // Check named initializers. + struct named_init ni = { + .number = 34, + .name = L"Test wide string", + .average = 543.34343, + }; + + ni.number = 58; + + int dynamic_array[ni.number]; + dynamic_array[ni.number - 1] = 543; + + // work around unused variable warnings + return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' + || dynamic_array[ni.number - 1] != 543); + + ; + return 0; +} +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99 +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c99=$ac_arg +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c99" in + x) + { $as_echo "$as_me:$LINENO: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:$LINENO: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c99" + { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c99" >&5 +$as_echo "$ac_cv_prog_cc_c99" >&6; } ;; +esac + + + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi + +fi + if test "x$GCC" = xyes ; then CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ -Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ --Wbad-function-cast" - case `gcc -dumpversion` in +-Wbad-function-cast -Wformat=2" + case `$CC -dumpversion` in 3.4.* | 4.*) - CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement" + CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" ;; esac else @@ -20839,6 +21156,277 @@ fi +# Check whether --enable-strict-compilation was given. +if test "${enable_strict_compilation+set}" = set; then + enableval=$enable_strict_compilation; STRICT_COMPILE=$enableval +else + STRICT_COMPILE=no +fi + +if test "x$STRICT_COMPILE" = "xyes"; then + { $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5 +$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; } +if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef __SUNPRO_C + (void) __SUNPRO_C; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl___SUNPRO_C=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl___SUNPRO_C=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5 +$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; } +if test $ac_cv_have_decl___SUNPRO_C = yes; then + SUNCC="yes" +else + SUNCC="no" +fi + + { $as_echo "$as_me:$LINENO: checking whether __INTEL_COMPILER is declared" >&5 +$as_echo_n "checking whether __INTEL_COMPILER is declared... " >&6; } +if test "${ac_cv_have_decl___INTEL_COMPILER+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef __INTEL_COMPILER + (void) __INTEL_COMPILER; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl___INTEL_COMPILER=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl___INTEL_COMPILER=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___INTEL_COMPILER" >&5 +$as_echo "$ac_cv_have_decl___INTEL_COMPILER" >&6; } +if test $ac_cv_have_decl___INTEL_COMPILER = yes; then + INTELCC="yes" +else + INTELCC="no" +fi + + if test "x$GCC" = xyes ; then + STRICT_CFLAGS="-pedantic -Werror" + elif test "x$SUNCC" = "xyes"; then + STRICT_CFLAGS="-errwarn" + elif test "x$INTELCC" = "xyes"; then + STRICT_CFLAGS="-Werror" + fi +fi +CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" + + + + +# Check whether --with-release-version was given. +if test "${with_release_version+set}" = set; then + withval=$with_release_version; RELEASE_VERSION="$withval" +else + RELEASE_VERSION="" +fi + + if test "x$RELEASE_VERSION" != "x"; then + PACKAGE="$PACKAGE-$RELEASE_VERSION" + PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" + { $as_echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5 +$as_echo "$as_me: Building with package name set to $PACKAGE" >&6;} + fi + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1` +_ACEOF + + PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` + if test "x$PVM" = "x"; then + PVM="0" + fi + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION_MINOR $PVM +_ACEOF + + PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` + if test "x$PVP" = "x"; then + PVP="0" + fi + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION_PATCHLEVEL $PVP +_ACEOF + + + +CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ +mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ +|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ +echo 'git directory not found: installing possibly empty changelog.' >&2)" + + + + +macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` +INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ +mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ +|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ +echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" + + + + + +if test x$APP_MAN_SUFFIX = x ; then + APP_MAN_SUFFIX=1 +fi +if test x$APP_MAN_DIR = x ; then + APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' +fi + +if test x$LIB_MAN_SUFFIX = x ; then + LIB_MAN_SUFFIX=3 +fi +if test x$LIB_MAN_DIR = x ; then + LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' +fi + +if test x$FILE_MAN_SUFFIX = x ; then + case $host_os in + solaris*) FILE_MAN_SUFFIX=4 ;; + *) FILE_MAN_SUFFIX=5 ;; + esac +fi +if test x$FILE_MAN_DIR = x ; then + FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' +fi + +if test x$MISC_MAN_SUFFIX = x ; then + case $host_os in + solaris*) MISC_MAN_SUFFIX=5 ;; + *) MISC_MAN_SUFFIX=7 ;; + esac +fi +if test x$MISC_MAN_DIR = x ; then + MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' +fi + +if test x$DRIVER_MAN_SUFFIX = x ; then + case $host_os in + solaris*) DRIVER_MAN_SUFFIX=7 ;; + *) DRIVER_MAN_SUFFIX=4 ;; + esac +fi +if test x$DRIVER_MAN_DIR = x ; then + DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' +fi + +if test x$ADMIN_MAN_SUFFIX = x ; then + case $host_os in + solaris*) ADMIN_MAN_SUFFIX=1m ;; + *) ADMIN_MAN_SUFFIX=8 ;; + esac +fi +if test x$ADMIN_MAN_DIR = x ; then + ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' +fi + + + + + + + + + + + + + + + +AM_DEFAULT_VERBOSITY=1 + + + + + + + # Check whether --with-xorg-module-dir was given. if test "${with_xorg_module_dir+set}" = set; then withval=$with_xorg_module_dir; moduledir="$withval" @@ -20971,126 +21559,6 @@ $as_echo "$_EXT_CHECK" >&6; } # Checks for pkg-config packages - -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_path_PKG_CONFIG"; then - ac_pt_PKG_CONFIG=$PKG_CONFIG - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 -else - case $ac_pt_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - ;; -esac -fi -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - PKG_CONFIG=$ac_pt_PKG_CONFIG - fi -else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" -fi - -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.9.0 - { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG="" - fi - -fi - pkg_failed=no { $as_echo "$as_me:$LINENO: checking for XORG" >&5 $as_echo_n "checking for XORG... " >&6; } @@ -21100,12 +21568,12 @@ if test -n "$PKG_CONFIG"; then pkg_cv_XORG_CFLAGS="$XORG_CFLAGS" else if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xorg-server >= 1.0.99.901 xproto \$REQUIRED_MODULES\"") >&5 - ($PKG_CONFIG --exists --print-errors "xorg-server >= 1.0.99.901 xproto $REQUIRED_MODULES") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xorg-server >= 1.5.99.901 xproto \$REQUIRED_MODULES\"") >&5 + ($PKG_CONFIG --exists --print-errors "xorg-server >= 1.5.99.901 xproto $REQUIRED_MODULES") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_XORG_CFLAGS=`$PKG_CONFIG --cflags "xorg-server >= 1.0.99.901 xproto $REQUIRED_MODULES" 2>/dev/null` + pkg_cv_XORG_CFLAGS=`$PKG_CONFIG --cflags "xorg-server >= 1.5.99.901 xproto $REQUIRED_MODULES" 2>/dev/null` else pkg_failed=yes fi @@ -21118,12 +21586,12 @@ if test -n "$PKG_CONFIG"; then pkg_cv_XORG_LIBS="$XORG_LIBS" else if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xorg-server >= 1.0.99.901 xproto \$REQUIRED_MODULES\"") >&5 - ($PKG_CONFIG --exists --print-errors "xorg-server >= 1.0.99.901 xproto $REQUIRED_MODULES") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xorg-server >= 1.5.99.901 xproto \$REQUIRED_MODULES\"") >&5 + ($PKG_CONFIG --exists --print-errors "xorg-server >= 1.5.99.901 xproto $REQUIRED_MODULES") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_XORG_LIBS=`$PKG_CONFIG --libs "xorg-server >= 1.0.99.901 xproto $REQUIRED_MODULES" 2>/dev/null` + pkg_cv_XORG_LIBS=`$PKG_CONFIG --libs "xorg-server >= 1.5.99.901 xproto $REQUIRED_MODULES" 2>/dev/null` else pkg_failed=yes fi @@ -21142,14 +21610,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XORG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xorg-server >= 1.0.99.901 xproto $REQUIRED_MODULES"` + XORG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xorg-server >= 1.5.99.901 xproto $REQUIRED_MODULES"` else - XORG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xorg-server >= 1.0.99.901 xproto $REQUIRED_MODULES"` + XORG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xorg-server >= 1.5.99.901 xproto $REQUIRED_MODULES"` fi # Put the nasty error message in config.log where it belongs echo "$XORG_PKG_ERRORS" >&5 - { { $as_echo "$as_me:$LINENO: error: Package requirements (xorg-server >= 1.0.99.901 xproto $REQUIRED_MODULES) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements (xorg-server >= 1.5.99.901 xproto $REQUIRED_MODULES) were not met: $XORG_PKG_ERRORS @@ -21160,7 +21628,7 @@ Alternatively, you may set the environment variables XORG_CFLAGS and XORG_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 -$as_echo "$as_me: error: Package requirements (xorg-server >= 1.0.99.901 xproto $REQUIRED_MODULES) were not met: +$as_echo "$as_me: error: Package requirements (xorg-server >= 1.5.99.901 xproto $REQUIRED_MODULES) were not met: $XORG_PKG_ERRORS @@ -21201,7 +21669,7 @@ else $as_echo "yes" >&6; } : fi -sdkdir=$(pkg-config --variable=sdkdir xorg-server) +sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` # Checks for libraries. @@ -21445,137 +21913,21 @@ fi - - - -if test x$APP_MAN_SUFFIX = x ; then - APP_MAN_SUFFIX=1 -fi -if test x$APP_MAN_DIR = x ; then - APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' -fi - -if test x$LIB_MAN_SUFFIX = x ; then - LIB_MAN_SUFFIX=3 -fi -if test x$LIB_MAN_DIR = x ; then - LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' -fi - -if test x$FILE_MAN_SUFFIX = x ; then - case $host_os in - solaris*) FILE_MAN_SUFFIX=4 ;; - *) FILE_MAN_SUFFIX=5 ;; - esac -fi -if test x$FILE_MAN_DIR = x ; then - FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' -fi - -if test x$MISC_MAN_SUFFIX = x ; then - case $host_os in - solaris*) MISC_MAN_SUFFIX=5 ;; - *) MISC_MAN_SUFFIX=7 ;; - esac -fi -if test x$MISC_MAN_DIR = x ; then - MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' -fi - -if test x$DRIVER_MAN_SUFFIX = x ; then - case $host_os in - solaris*) DRIVER_MAN_SUFFIX=7 ;; - *) DRIVER_MAN_SUFFIX=4 ;; - esac -fi -if test x$DRIVER_MAN_DIR = x ; then - DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' -fi - -if test x$ADMIN_MAN_SUFFIX = x ; then - case $host_os in - solaris*) ADMIN_MAN_SUFFIX=1m ;; - *) ADMIN_MAN_SUFFIX=8 ;; - esac -fi -if test x$ADMIN_MAN_DIR = x ; then - ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' -fi - - - - - - - - - - - - - - - - - -# Check whether --with-release-version was given. -if test "${with_release_version+set}" = set; then - withval=$with_release_version; RELEASE_VERSION="$withval" -else - RELEASE_VERSION="" -fi - - if test "x$RELEASE_VERSION" != "x"; then - PACKAGE="$PACKAGE-$RELEASE_VERSION" - PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" - { $as_echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5 -$as_echo "$as_me: Building with package name set to $PACKAGE" >&6;} - fi - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1` -_ACEOF - - PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` - if test "x$PVM" = "x"; then - PVM="0" - fi - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION_MINOR $PVM -_ACEOF - - PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` - if test "x$PVP" = "x"; then - PVP="0" - fi - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION_PATCHLEVEL $PVP -_ACEOF - - - -CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ -mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ -echo 'git directory not found: installing possibly empty changelog.' >&2)" - -distcleancheck_listfiles='find . -type f ! -name ChangeLog -print' - - - - -if test x$XORG_SGML_PATH = x ; then - XORG_SGML_PATH=$prefix/share/sgml -fi -HAVE_DEFS_ENT= - -if test x"$cross_compiling" = x"yes" ; then - HAVE_DEFS_ENT=no +{ $as_echo "$as_me:$LINENO: checking for X.Org SGML entities" >&5 +$as_echo_n "checking for X.Org SGML entities... " >&6; } +XORG_SGML_PATH= +if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xorg-sgml-doctools\"") >&5 + ($PKG_CONFIG --exists --print-errors "xorg-sgml-doctools") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools` else - as_ac_File=`$as_echo "ac_cv_file_$XORG_SGML_PATH/X11/defs.ent" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $XORG_SGML_PATH/X11/defs.ent" >&5 -$as_echo_n "checking for $XORG_SGML_PATH/X11/defs.ent... " >&6; } + if test x"$cross_compiling" != x"yes" ; then + as_ac_File=`$as_echo "ac_cv_file_$prefix/share/sgml/X11/defs.ent" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $prefix/share/sgml/X11/defs.ent" >&5 +$as_echo_n "checking for $prefix/share/sgml/X11/defs.ent... " >&6; } if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else @@ -21583,7 +21935,7 @@ else { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 $as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } -if test -r "$XORG_SGML_PATH/X11/defs.ent"; then +if test -r "$prefix/share/sgml/X11/defs.ent"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" @@ -21595,11 +21947,25 @@ ac_res=`eval 'as_val=${'$as_ac_File'} $as_echo "$ac_res" >&6; } if test `eval 'as_val=${'$as_ac_File'} $as_echo "$as_val"'` = yes; then - HAVE_DEFS_ENT=yes + XORG_SGML_PATH=$prefix/share/sgml +fi + + fi fi +if test "x$XORG_SGML_PATH" != "x" ; then + { $as_echo "$as_me:$LINENO: result: $XORG_SGML_PATH" >&5 +$as_echo "$XORG_SGML_PATH" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + + + + + # Extract the first word of "linuxdoc", so it can be a program name with args. set dummy linuxdoc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 @@ -21681,10 +22047,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking Whether to build documentation" >&5 -$as_echo_n "checking Whether to build documentation... " >&6; } +{ $as_echo "$as_me:$LINENO: checking whether to build documentation" >&5 +$as_echo_n "checking whether to build documentation... " >&6; } -if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then +if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then BUILDDOC=yes else BUILDDOC=no @@ -21704,8 +22070,8 @@ fi { $as_echo "$as_me:$LINENO: result: $BUILDDOC" >&5 $as_echo "$BUILDDOC" >&6; } -{ $as_echo "$as_me:$LINENO: checking Whether to build pdf documentation" >&5 -$as_echo_n "checking Whether to build pdf documentation... " >&6; } +{ $as_echo "$as_me:$LINENO: checking whether to build pdf documentation" >&5 +$as_echo_n "checking whether to build pdf documentation... " >&6; } if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then BUILDPDFDOC=yes @@ -22215,7 +22581,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by xf86-input-mouse $as_me 1.4.0, which was +This file was extended by xf86-input-mouse $as_me 1.5.0, which was generated by GNU Autoconf 2.62. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -22268,7 +22634,7 @@ Report bugs to <bug-autoconf@gnu.org>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -xf86-input-mouse config.status 1.4.0 +xf86-input-mouse config.status 1.5.0 configured by $0, generated by GNU Autoconf 2.62, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/driver/xf86-input-mouse/configure.ac b/driver/xf86-input-mouse/configure.ac index 9c4f034cc..11c7cabcd 100644 --- a/driver/xf86-input-mouse/configure.ac +++ b/driver/xf86-input-mouse/configure.ac @@ -22,13 +22,13 @@ AC_PREREQ(2.57) AC_INIT([xf86-input-mouse], - 1.4.0, + 1.5.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xf86-input-mouse) -# Require xorg-macros version >= 1.2.0 for XORG_CWARNFLAGS & XORG_CHANGELOG -m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])]) -XORG_MACROS_VERSION(1.2) +# Require xorg-macros version >= 1.3.0 for XORG_DEFAULT_OPTIONS +m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.3 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.3) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_AUX_DIR(.) @@ -45,7 +45,7 @@ AM_CONFIG_HEADER([config.h]) AC_DISABLE_STATIC AC_PROG_LIBTOOL AC_PROG_CC -XORG_CWARNFLAGS +XORG_DEFAULT_OPTIONS AH_TOP([#include "xorg-server.h"]) @@ -62,8 +62,8 @@ XORG_DRIVER_CHECK_EXT(RANDR, randrproto) XORG_DRIVER_CHECK_EXT(XINPUT, inputproto) # Checks for pkg-config packages -PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901] xproto $REQUIRED_MODULES) -sdkdir=$(pkg-config --variable=sdkdir xorg-server) +PKG_CHECK_MODULES(XORG, [xorg-server >= 1.5.99.901] xproto $REQUIRED_MODULES) +sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` # Checks for libraries. @@ -89,11 +89,6 @@ AC_SUBST([OS_MOUSE_NAME]) dnl Allow checking code with lint, sparse, etc. XORG_WITH_LINT - -XORG_MANPAGE_SECTIONS -XORG_RELEASE_VERSION -XORG_CHANGELOG - XORG_CHECK_LINUXDOC AC_OUTPUT([Makefile src/Makefile man/Makefile]) diff --git a/driver/xf86-input-mouse/man/Makefile.in b/driver/xf86-input-mouse/man/Makefile.in index dfb716009..b5892a6ef 100644 --- a/driver/xf86-input-mouse/man/Makefile.in +++ b/driver/xf86-input-mouse/man/Makefile.in @@ -89,6 +89,7 @@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -129,6 +130,7 @@ FFLAGS = @FFLAGS@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ GREP = @GREP@ +INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -176,6 +178,7 @@ STRIP = @STRIP@ VERSION = @VERSION@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_LIBS = @XORG_LIBS@ +XORG_SGML_PATH = @XORG_SGML_PATH@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ @@ -196,7 +199,6 @@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ -distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ diff --git a/driver/xf86-input-mouse/man/mousedrv.man b/driver/xf86-input-mouse/man/mousedrv.man index bc6773fea..e80533520 100644 --- a/driver/xf86-input-mouse/man/mousedrv.man +++ b/driver/xf86-input-mouse/man/mousedrv.man @@ -155,7 +155,8 @@ press/release events as specified for the .B XAxisMapping and .B YAxisMapping -settings. Default: 4. +settings. If set to 0, no button is required and any motion of the device +is converted into wheel events. Default: 4. .TP 7 .BI "Option \*qEmulateWheelInertia\*q \*q" integer \*q Specifies how far (in pixels) the pointer must move to generate button diff --git a/driver/xf86-input-mouse/src/Makefile.in b/driver/xf86-input-mouse/src/Makefile.in index e0f73e894..e281f0df1 100644 --- a/driver/xf86-input-mouse/src/Makefile.in +++ b/driver/xf86-input-mouse/src/Makefile.in @@ -100,6 +100,7 @@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -140,6 +141,7 @@ FFLAGS = @FFLAGS@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ GREP = @GREP@ +INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -187,6 +189,7 @@ STRIP = @STRIP@ VERSION = @VERSION@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_LIBS = @XORG_LIBS@ +XORG_SGML_PATH = @XORG_SGML_PATH@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ @@ -207,7 +210,6 @@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ -distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ diff --git a/driver/xf86-input-mouse/src/mouse.c b/driver/xf86-input-mouse/src/mouse.c index 96919bdd1..427ab2c9f 100644 --- a/driver/xf86-input-mouse/src/mouse.c +++ b/driver/xf86-input-mouse/src/mouse.c @@ -123,8 +123,6 @@ typedef struct _DragLockRec { } DragLockRec, *DragLockPtr; - -static const OptionInfoRec *MouseAvailableOptions(void *unused); static InputInfoPtr MousePreInit(InputDriverPtr drv, IDevPtr dev, int flags); #if 0 static void MouseUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags); @@ -172,91 +170,6 @@ _X_EXPORT InputDriverRec MOUSE = { 0 }; -typedef enum { - OPTION_ALWAYS_CORE, - OPTION_SEND_CORE_EVENTS, - OPTION_CORE_POINTER, - OPTION_SEND_DRAG_EVENTS, - OPTION_HISTORY_SIZE, - OPTION_DEVICE, - OPTION_PROTOCOL, - OPTION_BUTTONS, - OPTION_EMULATE_3_BUTTONS, - OPTION_EMULATE_3_TIMEOUT, - OPTION_CHORD_MIDDLE, - OPTION_FLIP_XY, - OPTION_INV_X, - OPTION_INV_Y, - OPTION_ANGLE_OFFSET, - OPTION_Z_AXIS_MAPPING, - OPTION_SAMPLE_RATE, - OPTION_RESOLUTION, - OPTION_EMULATE_WHEEL, - OPTION_EMU_WHEEL_BUTTON, - OPTION_EMU_WHEEL_INERTIA, - OPTION_EMU_WHEEL_TIMEOUT, - OPTION_X_AXIS_MAPPING, - OPTION_Y_AXIS_MAPPING, - OPTION_AUTO_SOFT, - OPTION_CLEAR_DTR, - OPTION_CLEAR_RTS, - OPTION_BAUD_RATE, - OPTION_DATA_BITS, - OPTION_STOP_BITS, - OPTION_PARITY, - OPTION_FLOW_CONTROL, - OPTION_VTIME, - OPTION_VMIN, - OPTION_DRAGLOCKBUTTONS, - OPTION_DOUBLECLICK_BUTTONS, - OPTION_BUTTON_MAPPING, - OPTION_SENSITIVITY -} MouseOpts; - -static const OptionInfoRec mouseOptions[] = { - { OPTION_ALWAYS_CORE, "AlwaysCore", OPTV_BOOLEAN, {0}, FALSE }, - { OPTION_SEND_CORE_EVENTS, "SendCoreEvents", OPTV_BOOLEAN, {0}, FALSE }, - { OPTION_CORE_POINTER, "CorePointer", OPTV_BOOLEAN, {0}, FALSE }, - { OPTION_SEND_DRAG_EVENTS, "SendDragEvents", OPTV_BOOLEAN, {0}, FALSE }, - { OPTION_HISTORY_SIZE, "HistorySize", OPTV_INTEGER, {0}, FALSE }, - { OPTION_DEVICE, "Device", OPTV_STRING, {0}, FALSE }, - { OPTION_PROTOCOL, "Protocol", OPTV_STRING, {0}, FALSE }, - { OPTION_BUTTONS, "Buttons", OPTV_INTEGER, {0}, FALSE }, - { OPTION_EMULATE_3_BUTTONS, "Emulate3Buttons",OPTV_BOOLEAN, {0}, FALSE }, - { OPTION_EMULATE_3_TIMEOUT, "Emulate3Timeout",OPTV_INTEGER, {0}, FALSE }, - { OPTION_CHORD_MIDDLE, "ChordMiddle", OPTV_BOOLEAN, {0}, FALSE }, - { OPTION_FLIP_XY, "FlipXY", OPTV_BOOLEAN, {0}, FALSE }, - { OPTION_INV_X, "InvX", OPTV_BOOLEAN, {0}, FALSE }, - { OPTION_INV_Y, "InvY", OPTV_BOOLEAN, {0}, FALSE }, - { OPTION_ANGLE_OFFSET, "AngleOffset", OPTV_INTEGER, {0}, FALSE }, - { OPTION_Z_AXIS_MAPPING, "ZAxisMapping", OPTV_STRING, {0}, FALSE }, - { OPTION_SAMPLE_RATE, "SampleRate", OPTV_INTEGER, {0}, FALSE }, - { OPTION_RESOLUTION, "Resolution", OPTV_INTEGER, {0}, FALSE }, - { OPTION_EMULATE_WHEEL, "EmulateWheel", OPTV_BOOLEAN, {0}, FALSE }, - { OPTION_EMU_WHEEL_BUTTON, "EmulateWheelButton", OPTV_INTEGER, {0}, FALSE }, - { OPTION_EMU_WHEEL_INERTIA, "EmulateWheelInertia", OPTV_INTEGER, {0}, FALSE }, - { OPTION_EMU_WHEEL_TIMEOUT, "EmulateWheelTimeout", OPTV_INTEGER, {0}, FALSE }, - { OPTION_X_AXIS_MAPPING, "XAxisMapping", OPTV_STRING, {0}, FALSE }, - { OPTION_Y_AXIS_MAPPING, "YAxisMapping", OPTV_STRING, {0}, FALSE }, - { OPTION_AUTO_SOFT, "AutoSoft", OPTV_BOOLEAN, {0}, FALSE }, - /* serial options */ - { OPTION_CLEAR_DTR, "ClearDTR", OPTV_BOOLEAN, {0}, FALSE }, - { OPTION_CLEAR_RTS, "ClearRTS", OPTV_BOOLEAN, {0}, FALSE }, - { OPTION_BAUD_RATE, "BaudRate", OPTV_INTEGER, {0}, FALSE }, - { OPTION_DATA_BITS, "DataBits", OPTV_INTEGER, {0}, FALSE }, - { OPTION_STOP_BITS, "StopBits", OPTV_INTEGER, {0}, FALSE }, - { OPTION_PARITY, "Parity", OPTV_STRING, {0}, FALSE }, - { OPTION_FLOW_CONTROL, "FlowControl", OPTV_STRING, {0}, FALSE }, - { OPTION_VTIME, "VTime", OPTV_INTEGER, {0}, FALSE }, - { OPTION_VMIN, "VMin", OPTV_INTEGER, {0}, FALSE }, - /* end serial options */ - { OPTION_DRAGLOCKBUTTONS, "DragLockButtons",OPTV_STRING, {0}, FALSE }, - { OPTION_DOUBLECLICK_BUTTONS,"DoubleClickButtons", OPTV_STRING, {0}, FALSE }, - { OPTION_BUTTON_MAPPING, "ButtonMapping", OPTV_STRING, {0}, FALSE }, - { OPTION_SENSITIVITY, "Sensitivity", OPTV_REAL, {0}, FALSE }, - { -1, NULL, OPTV_NONE, {0}, FALSE } -}; - #define RETRY_COUNT 4 /* @@ -375,13 +288,6 @@ static MouseProtocolRec mouseProtocols[] = { static unsigned char proto[PROT_NUMPROTOS][8]; -/*ARGSUSED*/ -static const OptionInfoRec * -MouseAvailableOptions(void *unused) -{ - return (mouseOptions); -} - /* Process options common to all mouse types. */ static void MouseCommonOptions(InputInfoPtr pInfo) @@ -869,18 +775,6 @@ ProtocolIDToName(MouseProtocolID id) } } -_X_EXPORT const char * -xf86MouseProtocolIDToName(MouseProtocolID id) -{ - return ProtocolIDToName(id); -} - -MouseProtocolID -xf86MouseProtocolNameToID(const char *name) -{ - return ProtocolNameToID(name); -} - static int ProtocolIDToClass(MouseProtocolID id) { @@ -1116,10 +1010,6 @@ MousePreInit(InputDriverPtr drv, IDevPtr dev, int flags) xf86CollectInputOptions(pInfo, pProto->defaults, NULL); xf86ProcessCommonOptions(pInfo, pInfo->options); - /* XXX should handle this OS dependency elsewhere. */ -#ifndef __OS2ELF__ - /* OS/2 has a mouse handled by the OS - it cannot fail here */ - /* Check if the device can be opened. */ pInfo->fd = xf86OpenSerial(pInfo->options); if (pInfo->fd == -1) { @@ -1135,7 +1025,6 @@ MousePreInit(InputDriverPtr drv, IDevPtr dev, int flags) } } xf86CloseSerial(pInfo->fd); -#endif pInfo->fd = -1; if (!(mPriv = (pointer) xcalloc(sizeof(mousePrivRec), 1))) @@ -1423,8 +1312,8 @@ MouseReadInput(InputInfoPtr pInfo) buttons = (pMse->lastButtons & 2) | ((int)(pBuf[0] & 0x20) >> 3) | ((int)(pBuf[0] & 0x10) >> 4); - dx = (char)(((pBuf[0] & 0x03) << 6) | (pBuf[1] & 0x3F)); - dy = (char)(((pBuf[0] & 0x0C) << 4) | (pBuf[2] & 0x3F)); + dx = (signed char)(((pBuf[0] & 0x03) << 6) | (pBuf[1] & 0x3F)); + dy = (signed char)(((pBuf[0] & 0x0C) << 4) | (pBuf[2] & 0x3F)); break; case PROT_GLIDE: /* ALPS GlidePoint */ @@ -1433,15 +1322,15 @@ MouseReadInput(InputInfoPtr pInfo) buttons = (pMse->lastButtons & (8 + 2)) | ((int)(pBuf[0] & 0x20) >> 3) | ((int)(pBuf[0] & 0x10) >> 4); - dx = (char)(((pBuf[0] & 0x03) << 6) | (pBuf[1] & 0x3F)); - dy = (char)(((pBuf[0] & 0x0C) << 4) | (pBuf[2] & 0x3F)); + dx = (signed char)(((pBuf[0] & 0x03) << 6) | (pBuf[1] & 0x3F)); + dy = (signed char)(((pBuf[0] & 0x0C) << 4) | (pBuf[2] & 0x3F)); break; case PROT_MSC: /* Mouse Systems Corp */ case PROT_SUNMOUSE: buttons = (~pBuf[0]) & 0x07; - dx = (char)(pBuf[1]) + (char)(pBuf[3]); - dy = - ((char)(pBuf[2]) + (char)(pBuf[4])); + dx = (signed char)(pBuf[1]) + (char)(pBuf[3]); + dy = - ((signed char)(pBuf[2]) + (char)(pBuf[4])); break; case PROT_MMHIT: /* MM_HitTablet */ @@ -1469,8 +1358,8 @@ MouseReadInput(InputInfoPtr pInfo) case PROT_BM: /* BusMouse */ buttons = (~pBuf[0]) & 0x07; - dx = (char)pBuf[1]; - dy = - (char)pBuf[2]; + dx = (signed char)pBuf[1]; + dy = - (signed char)pBuf[2]; break; case PROT_PS2: /* PS/2 mouse */ @@ -1634,8 +1523,8 @@ MouseReadInput(InputInfoPtr pInfo) buttons = ((int)(pBuf[0] & 0x20) >> 3) | ((int)(pBuf[0] & 0x10) >> 4) | ((int)(pBuf[3] & 0x10) >> 3); - dx = (char)(((pBuf[0] & 0x03) << 6) | (pBuf[1] & 0x3F)); - dy = (char)(((pBuf[0] & 0x0C) << 4) | (pBuf[2] & 0x3F)); + dx = (signed char)(((pBuf[0] & 0x03) << 6) | (pBuf[1] & 0x3F)); + dy = (signed char)(((pBuf[0] & 0x0C) << 4) | (pBuf[2] & 0x3F)); dz = (pBuf[3] & 0x08) ? ((int)(pBuf[3] & 0x0F) - 0x10) : ((int)(pBuf[3] & 0x0F)); break; @@ -1711,7 +1600,11 @@ MouseProc(DeviceIntPtr device, int what) mousePrivPtr mPriv; unsigned char map[MSE_MAXBUTTONS + 1]; int i; - +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 + Atom btn_labels[MSE_MAXBUTTONS] = {0}; + Atom axes_labels[2] = { 0, 0 }; +#endif + pInfo = device->public.devicePrivate; pMse = pInfo->private; pMse->device = device; @@ -1727,8 +1620,13 @@ MouseProc(DeviceIntPtr device, int what) for (i = 0; i < MSE_MAXBUTTONS; i++) map[i + 1] = i + 1; + /* FIXME: we should probably set the labels here */ + InitPointerDeviceStruct((DevicePtr)device, map, min(pMse->buttons, MSE_MAXBUTTONS), +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 + btn_labels, +#endif #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0 miPointerGetMotionEvents, #elif GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3 @@ -1740,13 +1638,24 @@ MouseProc(DeviceIntPtr device, int what) #else GetMotionHistorySize(), 2 #endif +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 + , axes_labels +#endif ); /* X valuator */ - xf86InitValuatorAxisStruct(device, 0, -1, -1, 1, 0, 1); + xf86InitValuatorAxisStruct(device, 0, +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 + axes_labels[0], +#endif + -1, -1, 1, 0, 1); xf86InitValuatorDefaults(device, 0); /* Y valuator */ - xf86InitValuatorAxisStruct(device, 1, -1, -1, 1, 0, 1); + xf86InitValuatorAxisStruct(device, 1, +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 + axes_labels[1], +#endif + -1, -1, 1, 0, 1); xf86InitValuatorDefaults(device, 1); #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0 xf86MotionHistoryAllocate(pInfo); @@ -1794,6 +1703,11 @@ MouseProc(DeviceIntPtr device, int what) } xf86FlushInput(pInfo->fd); xf86AddEnabledDevice(pInfo); + if (pMse->emulate3Buttons || pMse->emulate3ButtonsSoft) { + RegisterBlockAndWakeupHandlers (MouseBlockHandler, + MouseWakeupHandler, + (pointer) pInfo); + } } } } @@ -1804,11 +1718,6 @@ MouseProc(DeviceIntPtr device, int what) pMse->wheelButtonExpires = GetTimeInMillis (); device->public.on = TRUE; FlushButtons(pMse); - if (pMse->emulate3Buttons || pMse->emulate3ButtonsSoft) - { - RegisterBlockAndWakeupHandlers (MouseBlockHandler, MouseWakeupHandler, - (pointer) pInfo); - } break; case DEVICE_OFF: @@ -1823,7 +1732,8 @@ MouseProc(DeviceIntPtr device, int what) pInfo->fd = -1; if (pMse->emulate3Buttons || pMse->emulate3ButtonsSoft) { - RemoveBlockAndWakeupHandlers (MouseBlockHandler, MouseWakeupHandler, + RemoveBlockAndWakeupHandlers (MouseBlockHandler, + MouseWakeupHandler, (pointer) pInfo); } } @@ -2070,7 +1980,10 @@ Emulate3ButtonsSoft(InputInfoPtr pInfo) buttonTimer(pInfo); xf86Msg(X_INFO,"3rd Button detected: disabling emulate3Button\n"); - + + RemoveBlockAndWakeupHandlers (MouseBlockHandler, MouseWakeupHandler, + (pointer) pInfo); + return FALSE; } @@ -2157,7 +2070,10 @@ MouseDoPostEvent(InputInfoPtr pInfo, int buttons, int dx, int dy) if (pMse->emulateWheel) { /* Emulate wheel button handling */ - wheelButtonMask = 1 << (pMse->wheelButton - 1); + if(pMse->wheelButton == 0) + wheelButtonMask = 0; + else + wheelButtonMask = 1 << (pMse->wheelButton - 1); if (change & wheelButtonMask) { if (buttons & wheelButtonMask) { @@ -2179,9 +2095,10 @@ MouseDoPostEvent(InputInfoPtr pInfo, int buttons, int dx, int dy) } else ms = pMse->wheelButtonExpires - GetTimeInMillis (); - /* Intercept wheel emulation. */ - if (buttons & wheelButtonMask) { - if (ms <= 0) { + /* Intercept wheel emulation if the necessary button is depressed or + if no button is necessary */ + if ((buttons & wheelButtonMask) || wheelButtonMask==0) { + if (ms <= 0 || wheelButtonMask==0) { /* Y axis movement */ if (pMse->negativeY != MSE_NOAXISMAP) { pMse->wheelYDistance += dy; @@ -2196,6 +2113,7 @@ MouseDoPostEvent(InputInfoPtr pInfo, int buttons, int dx, int dy) while (abs(pMse->wheelYDistance) > pMse->wheelInertia) { pMse->wheelYDistance -= emuWheelDelta; + pMse->wheelXDistance = 0; /* * Synthesize the press and release, but not when * the button to be synthesized is already pressed @@ -2223,6 +2141,7 @@ MouseDoPostEvent(InputInfoPtr pInfo, int buttons, int dx, int dy) while (abs(pMse->wheelXDistance) > pMse->wheelInertia) { pMse->wheelXDistance -= emuWheelDelta; + pMse->wheelYDistance = 0; /* * Synthesize the press and release, but not when * the button to be synthesized is already pressed @@ -3764,15 +3683,6 @@ collectData(MouseDevPtr pMse, unsigned char u) /**************** end of autoprobe stuff *****************/ - -ModuleInfoRec MouseInfo = { - 1, - "MOUSE", - NULL, - 0, - MouseAvailableOptions, -}; - static void xf86MouseUnplug(pointer p) { diff --git a/driver/xf86-input-mouse/src/mouse.h b/driver/xf86-input-mouse/src/mouse.h index 804a8f455..daefbc5dd 100644 --- a/driver/xf86-input-mouse/src/mouse.h +++ b/driver/xf86-input-mouse/src/mouse.h @@ -7,7 +7,4 @@ #include "xf86OSmouse.h" -_X_EXPORT const char * xf86MouseProtocolIDToName(MouseProtocolID id); -MouseProtocolID xf86MouseProtocolNameToID(const char *name); - #endif diff --git a/driver/xf86-input-mouse/src/sun_mouse.c b/driver/xf86-input-mouse/src/sun_mouse.c index ac40e072e..7194f4de8 100644 --- a/driver/xf86-input-mouse/src/sun_mouse.c +++ b/driver/xf86-input-mouse/src/sun_mouse.c @@ -23,7 +23,7 @@ * dealings in this Software without prior written authorization from the * XFree86 Project. */ -/* Copyright 2004-2005 Sun Microsystems, Inc. All rights reserved. +/* Copyright 2004-2005, 2008-2009 Sun Microsystems, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the @@ -204,60 +204,66 @@ vuidPreInit(InputInfoPtr pInfo, const char *protocol, int flags) xf86CollectInputOptions(pInfo, NULL, NULL); xf86ProcessCommonOptions(pInfo, pInfo->options); + pVuidMse->buffer = (unsigned char *)&pVuidMse->event; + pVuidMse->strmod = xf86SetStrOption(pInfo->options, "StreamsModule", NULL); + /* Check if the device can be opened. */ pInfo->fd = xf86OpenSerial(pInfo->options); if (pInfo->fd == -1) { - if (xf86GetAllowMouseOpenFail()) + if (xf86GetAllowMouseOpenFail()) { xf86Msg(X_WARNING, "%s: cannot open input device\n", pInfo->name); - else { + } else { xf86Msg(X_ERROR, "%s: cannot open input device\n", pInfo->name); + xfree(pVuidMse->strmod); xfree(pVuidMse); xfree(pMse); return FALSE; } - } - - pVuidMse->buffer = (unsigned char *)&pVuidMse->event; + } else { + if (pVuidMse->strmod) { + /* Check to see if module is already pushed */ + SYSCALL(i = ioctl(pInfo->fd, I_FIND, pVuidMse->strmod)); - pVuidMse->strmod = xf86SetStrOption(pInfo->options, "StreamsModule", NULL); - if (pVuidMse->strmod) { - SYSCALL(i = ioctl(pInfo->fd, I_PUSH, pVuidMse->strmod)); - if (i < 0) { - xf86Msg(X_ERROR, - "%s: cannot push module '%s' onto mouse device: %s\n", - pInfo->name, pVuidMse->strmod, strerror(errno)); - xf86CloseSerial(pInfo->fd); - pInfo->fd = -1; - xfree(pVuidMse->strmod); - xfree(pVuidMse); - xfree(pMse); - return FALSE; + if (i == 0) { /* Not already pushed */ + SYSCALL(i = ioctl(pInfo->fd, I_PUSH, pVuidMse->strmod)); + if (i < 0) { + xf86Msg(X_ERROR, + "%s: cannot push module '%s' onto mouse device: %s\n", + pInfo->name, pVuidMse->strmod, strerror(errno)); + xf86CloseSerial(pInfo->fd); + pInfo->fd = -1; + xfree(pVuidMse->strmod); + xfree(pVuidMse); + xfree(pMse); + return FALSE; + } + } } - } - buttons = xf86SetIntOption(pInfo->options, "Buttons", 0); - if (buttons == 0) { - SYSCALL(i = ioctl(pInfo->fd, MSIOBUTTONS, &buttons)); - if (i == 0) { - pInfo->conf_idev->commonOptions = - xf86ReplaceIntOption(pInfo->conf_idev->commonOptions, - "Buttons", buttons); - xf86Msg(X_INFO, "%s: Setting Buttons option to \"%d\"\n", - pInfo->name, buttons); + buttons = xf86SetIntOption(pInfo->options, "Buttons", 0); + if (buttons == 0) { + SYSCALL(i = ioctl(pInfo->fd, MSIOBUTTONS, &buttons)); + if (i == 0) { + pInfo->conf_idev->commonOptions = + xf86ReplaceIntOption(pInfo->conf_idev->commonOptions, + "Buttons", buttons); + xf86Msg(X_INFO, "%s: Setting Buttons option to \"%d\"\n", + pInfo->name, buttons); + } } - } - if (pVuidMse->strmod) { - SYSCALL(i = ioctl(pInfo->fd, I_POP, pVuidMse->strmod)); - if (i == -1) { - xf86Msg(X_WARNING, - "%s: cannot pop module '%s' off mouse device: %s\n", - pInfo->name, pVuidMse->strmod, strerror(errno)); + if (pVuidMse->strmod) { + SYSCALL(i = ioctl(pInfo->fd, I_POP, pVuidMse->strmod)); + if (i == -1) { + xf86Msg(X_WARNING, + "%s: cannot pop module '%s' off mouse device: %s\n", + pInfo->name, pVuidMse->strmod, strerror(errno)); + } } - } - xf86CloseSerial(pInfo->fd); - pInfo->fd = -1; + xf86CloseSerial(pInfo->fd); + pInfo->fd = -1; + } /* Process common mouse options (like Emulate3Buttons, etc). */ pMse->CommonOptions(pInfo); @@ -531,15 +537,21 @@ vuidMouseProc(DeviceIntPtr pPointer, int what) int fmt = VUID_FIRM_EVENT; if (pVuidMse->strmod) { - SYSCALL(i = ioctl(pInfo->fd, I_PUSH, pVuidMse->strmod)); - if (i < 0) { - xf86Msg(X_WARNING, - "%s: cannot push module '%s' onto mouse device: %s\n", - pInfo->name, pVuidMse->strmod, strerror(errno)); - xfree(pVuidMse->strmod); - pVuidMse->strmod = NULL; + /* Check to see if module is already pushed */ + SYSCALL(i = ioctl(pInfo->fd, I_FIND, pVuidMse->strmod)); + + if (i == 0) { /* Not already pushed */ + SYSCALL(i = ioctl(pInfo->fd, I_PUSH, pVuidMse->strmod)); + if (i < 0) { + xf86Msg(X_WARNING, "%s: cannot push module '%s' " + "onto mouse device: %s\n", pInfo->name, + pVuidMse->strmod, strerror(errno)); + xfree(pVuidMse->strmod); + pVuidMse->strmod = NULL; + } } } + SYSCALL(i = ioctl(pInfo->fd, VUIDSFORMAT, &fmt)); if (i < 0) { xf86Msg(X_WARNING, |