[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-input-mouse: Changes to 'upstream-experimental'



 COPYING          |   93 +++++++++++++++++++++++++++++++++++++++++++++
 ChangeLog        |  112 -------------------------------------------------------
 Makefile.am      |   15 +++++++
 configure.ac     |   14 ++++--
 man/mousedrv.man |   12 ++++-
 src/Makefile.am  |   10 ++++
 src/mouse.c      |   27 ++++---------
 src/pnp.c        |   22 ++++------
 src/sun_mouse.c  |    8 ++-
 9 files changed, 162 insertions(+), 151 deletions(-)

New commits:
commit 5058dc340278f2498dd1b4db129dc6dd6b0e0964
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Fri Jan 9 18:38:57 2009 -0800

    Version 1.4.0

diff --git a/configure.ac b/configure.ac
index 4b54604..9c4f034 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-input-mouse],
-        1.3.0,
+        1.4.0,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-input-mouse)
 

commit 194fed98fee47801f1ca8eb926bc10a57b7582cb
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Fri Jan 9 14:41:26 2009 -0800

    Add note on hal-based configuration to man page

diff --git a/man/mousedrv.man b/man/mousedrv.man
index 3bab562..bc6773f 100644
--- a/man/mousedrv.man
+++ b/man/mousedrv.man
@@ -43,7 +43,7 @@ two or three button mouse.
 .TP
 Serial mouse
 There have been numerous serial mouse models from a number of
-manufactures.
+manufacturers.
 Despite the wide range of variations, there have been relatively
 few protocols (data format) with which the serial mouse talks
 to the host computer.
@@ -72,6 +72,11 @@ be converted to another.  If you are to use such an adapter,
 remember that the connector at the very end of the mouse/adapter pair is 
 what matters.
 .SH CONFIGURATION DETAILS
+.PP
+Depending on the X server version in use, input device options may be set
+in either a __xconfigfile__ file, or in the configuration files read by the
+Hardware Abstraction Layer (HAL) daemon, hald(1).
+.PP
 Please refer to __xconfigfile__(__filemansuffix__) for general configuration
 details and for options that can be used with all input drivers.  This
 section only covers configuration details specific to this driver.
@@ -293,5 +298,8 @@ There are some other options that may be used to control various parameters
 for serial port communication, but they are not documented here because
 the driver sets them correctly for each mouse protocol type.
 .SH "SEE ALSO"
-__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__),
+__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__),
+Xserver(__appmansuffix__), X(__miscmansuffix__),
 README.mouse.
+
+hal(__miscmansuffix__), hald(__adminmansuffix__), fdi(__filemansuffix__).

commit 299bd6c164e4e91cf69c41b3c7b97879cfcc0d32
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Fri Jan 9 08:45:38 2009 -0800

    Add copyright notices for OS mouse code to COPYING file

diff --git a/COPYING b/COPYING
index 17ba88f..1fddcfc 100644
--- a/COPYING
+++ b/COPYING
@@ -43,3 +43,96 @@ CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
 DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
 TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 PERFORMANCE OF THIS SOFTWARE.
+
+Copyright (c) 1999-2003 by The XFree86 Project, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the copyright holder(s)
+and author(s) shall not be used in advertising or otherwise to promote
+the sale, use or other dealings in this Software without prior written
+authorization from the copyright holder(s) and author(s).
+
+Copyright 1997,1998 by UCHIYAMA Yasushi
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the name of UCHIYAMA Yasushi not be used in
+advertising or publicity pertaining to distribution of the software without
+specific, written prior permission.  UCHIYAMA Yasushi makes no representations
+about the suitability of this software for any purpose.  It is provided
+"as is" without express or implied warranty.
+
+UCHIYAMA YASUSHI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL UCHIYAMA YASUSHI BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+Copyright 2001 by J. Kean Johnston <jkj@sco.com>
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the name J. Kean Johnston not be used in
+advertising or publicity pertaining to distribution of the software without
+specific, written prior permission.  J. Kean Johnston makes no
+representations about the suitability of this software for any purpose.
+It is provided "as is" without express or implied warranty.
+
+J. KEAN JOHNSTON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL J. KEAN JOHNSTON BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+Copyright 2004-2005 Sun Microsystems, Inc.  All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, and/or sell copies of the Software, and to permit persons
+to whom the Software is furnished to do so, provided that the above
+copyright notice(s) and this permission notice appear in all copies of
+the Software and that both the above copyright notice(s) and this
+permission notice appear in supporting documentation.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder
+shall not be used in advertising or otherwise to promote the sale, use
+or other dealings in this Software without prior written authorization
+of the copyright holder.
+

commit 0968d56233804515d347b2001bf817d0fa3611ea
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Thu Jan 8 21:48:13 2009 -0800

    Unifdef XFree86LOADER

diff --git a/src/mouse.c b/src/mouse.c
index 3f0eb86..347afc6 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -124,9 +124,7 @@ typedef struct _DragLockRec {
 
 
 
-#ifdef XFree86LOADER
 static const OptionInfoRec *MouseAvailableOptions(void *unused);
-#endif
 static InputInfoPtr MousePreInit(InputDriverPtr drv, IDevPtr dev, int flags);
 #if 0
 static void MouseUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags);
@@ -215,7 +213,6 @@ typedef enum {
     OPTION_SENSITIVITY
 } MouseOpts;
 
-#ifdef XFree86LOADER
 static const OptionInfoRec mouseOptions[] = {
     { OPTION_ALWAYS_CORE,	"AlwaysCore",	  OPTV_BOOLEAN,	{0}, FALSE },
     { OPTION_SEND_CORE_EVENTS,	"SendCoreEvents", OPTV_BOOLEAN,	{0}, FALSE },
@@ -259,7 +256,6 @@ static const OptionInfoRec mouseOptions[] = {
     { OPTION_SENSITIVITY,      "Sensitivity",     OPTV_REAL,    {0}, FALSE },
     { -1,			NULL,		  OPTV_NONE,	{0}, FALSE }
 };
-#endif
 
 #define RETRY_COUNT 4
 
@@ -376,14 +372,12 @@ static MouseProtocolRec mouseProtocols[] = {
     { NULL,			MSE_NONE,	NULL,		PROT_UNKNOWN }
 };
 
-#ifdef XFree86LOADER
 /*ARGSUSED*/
 static const OptionInfoRec *
 MouseAvailableOptions(void *unused)
 {
     return (mouseOptions);
 }
-#endif
 
 /* Process options common to all mouse types. */
 static void
@@ -3757,7 +3751,6 @@ collectData(MouseDevPtr pMse, unsigned char u)
 
 
 
-#ifdef XFree86LOADER
 ModuleInfoRec MouseInfo = {
     1,
     "MOUSE",
@@ -3810,6 +3803,3 @@ _X_EXPORT XF86ModuleData mouseModuleData = {
 /*
   Look at hitachi device stuff.
 */
-#endif /* XFree86LOADER */
-
-

commit 47c5e3a368a2922c4cc5e3a9769501fe399287ae
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Thu Jan 8 21:43:58 2009 -0800

    Remove some #if 1 statements

diff --git a/src/mouse.c b/src/mouse.c
index 5e52dd0..3f0eb86 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -1190,12 +1190,11 @@ MouseReadInput(InputInfoPtr pInfo)
 	ErrorF("mouse byte: %2.2x\n",u);
 #endif
 
-#if 1
 	/* if we do autoprobing collect the data */
 	if (pMse->collectData && pMse->autoProbe)
 	    if (pMse->collectData(pMse,u))
 		continue;
-#endif
+
 #ifdef SUPPORT_MOUSE_RESET
 	if (mouseReset(pInfo,u)) {
 	    pBufP = 0;
@@ -3675,10 +3674,10 @@ checkForErraticMovements(InputInfoPtr pInfo, int dx, int dy)
 {
     MouseDevPtr pMse = pInfo->private;
     mousePrivPtr mPriv = (mousePrivPtr)pMse->mousePriv;
-#if 1
+
     if (!mPriv->goodCount)
 	return;
-#endif
+
 #if 0
     if (abs(dx - mPriv->prevDx) > 300 
 	|| abs(dy - mPriv->prevDy) > 300)
diff --git a/src/pnp.c b/src/pnp.c
index a45cb52..0e95ac3 100644
--- a/src/pnp.c
+++ b/src/pnp.c
@@ -187,7 +187,6 @@ MouseGetPnpProtocol(InputInfoPtr pInfo)
 	    return val;
     }
 
-#if 1
     last = mPriv->pnpLast;
     mPriv->pnpLast = currentTime.milliseconds;
 
@@ -213,9 +212,6 @@ MouseGetPnpProtocol(InputInfoPtr pInfo)
 	return getPs2ProtocolPnP(pInfo);
     else
 	return probePs2ProtocolPnP(pInfo);
-#else
-    return PROT_UNKNOWN;
-#endif
 }
 
 /*

commit 7039165d70079f2e8573ada9323fbc582c825248
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Thu Jan 8 21:38:54 2009 -0800

    Comment typo fixes

diff --git a/src/mouse.c b/src/mouse.c
index 45d7b85..5e52dd0 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -3050,7 +3050,7 @@ mouseReset(InputInfoPtr pInfo, unsigned char val)
     ErrorF("Mouse Current: %i 0x%x\n",mousepriv->current, val);
 #endif
     
-    /* here we put the mouse specific reset detction */
+    /* here we put the mouse specific reset detection */
     /* They need to do three things:                 */
     /*  Check if byte may be a reset byte            */
     /*  If so: Set expectReset TRUE                  */
diff --git a/src/pnp.c b/src/pnp.c
index 70d68ef..a45cb52 100644
--- a/src/pnp.c
+++ b/src/pnp.c
@@ -68,7 +68,7 @@ typedef struct {
 
 /* PnP EISA/product IDs */
 static symtab_t pnpprod[] = {
-    { "KML0001",  PROT_THINKING },	/* Kensignton ThinkingMouse */
+    { "KML0001",  PROT_THINKING },	/* Kensington ThinkingMouse */
     { "MSH0001",  PROT_IMSERIAL },	/* MS IntelliMouse */
     { "MSH0004",  PROT_IMSERIAL },	/* MS IntelliMouse TrackBall */
     { "KYEEZ00",  PROT_MS },		/* Genius EZScroll */
@@ -101,14 +101,14 @@ static symtab_t pnpprod[] = {
     { "PNP0F09",  PROT_MS },		/* MS BallPoint serial */
     { "PNP0F0A",  PROT_MS },		/* MS PnP serial */
     { "PNP0F0B",  PROT_MS },		/* MS PnP BallPoint serial */
-    { "PNP0F0C",  PROT_MS },		/* MS serial comatible */
-    { "PNP0F0D",  PROT_BM },		/* MS InPort comatible */
-    { "PNP0F0E",  PROT_PS2 },		/* MS PS/2 comatible */
-    { "PNP0F0F",  PROT_MS },		/* MS BallPoint comatible */
+    { "PNP0F0C",  PROT_MS },		/* MS serial compatible */
+    { "PNP0F0D",  PROT_BM },		/* MS InPort compatible */
+    { "PNP0F0E",  PROT_PS2 },		/* MS PS/2 compatible */
+    { "PNP0F0F",  PROT_MS },		/* MS BallPoint compatible */
 #ifdef notyet
     { "PNP0F10",  PROT_??? },		/* TI QuickPort */
 #endif
-    { "PNP0F11",  PROT_BM },		/* MS bus comatible */
+    { "PNP0F11",  PROT_BM },		/* MS bus compatible */
     { "PNP0F12",  PROT_PS2 },		/* Logitech PS/2 */
     { "PNP0F13",  PROT_PS2 },		/* PS/2 */
 #ifdef notyet
@@ -244,7 +244,7 @@ pnpgets(InputInfoPtr pInfo, char *buf, Bool *prePNP)
 #if 0
     /* 
      * This is the procedure described in rev 1.0 of PnP COM device spec.
-     * Unfortunately, some devices which comform to earlier revisions of
+     * Unfortunately, some devices which conform to earlier revisions of
      * the spec gets confused and do not return the ID string...
      */
 
@@ -283,7 +283,7 @@ pnpgets(InputInfoPtr pInfo, char *buf, Bool *prePNP)
 	xf86SerialModemClearBits(pInfo->fd, i);
         usleep(200000);
 
-	/* wait for respose, 2nd phase (2.1.6) */
+	/* wait for response, 2nd phase (2.1.6) */
 	xf86FlushInput(pInfo->fd);
         i = TIOCM_DTR | TIOCM_RTS;	/* DTR = 1, RTS = 1 */
 	xf86SerialModemSetBits(pInfo->fd, i);
@@ -308,7 +308,7 @@ pnpgets(InputInfoPtr pInfo, char *buf, Bool *prePNP)
     pnpOpts = xf86OptionListCreate(pnpSerial, -1, 1);
     xf86SetSerial(pInfo->fd, pnpOpts);
 
-    /* wait for respose */
+    /* wait for response */
     xf86FlushInput(pInfo->fd);
     i = XF86_M_DTR | XF86_M_RTS;	/* DTR = 1, RTS = 1 */
     xf86SerialModemSetBits(pInfo->fd, i);

commit a61f0f92299037fe818a54c2cd9a2d3836698b43
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Thu Jan 8 21:29:00 2009 -0800

    sun_mouse: fallback to commonOptions for StreamsModule too

diff --git a/src/sun_mouse.c b/src/sun_mouse.c
index 1f01f17..ac40e07 100644
--- a/src/sun_mouse.c
+++ b/src/sun_mouse.c
@@ -630,6 +630,10 @@ solarisMouseAutoProbe(InputInfoPtr pInfo, const char **protocol,
 
     if (*device != NULL) {
 	strmod = xf86CheckStrOption(pInfo->options, "StreamsModule", NULL);
+	if (strmod == NULL) {
+	    strmod = xf86CheckStrOption(pInfo->conf_idev->commonOptions,
+					"StreamsModule", NULL);
+	}
 	if (strmod) {
 	    /* if a device name is already known, and a StreamsModule is
 	       specified to convert events to VUID, then we don't need to

commit 4623258b48f01306309ff9d39a85565bce57946e
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Thu Jan 8 21:21:18 2009 -0800

    Clear assorted compiler, sparse & lint warnings
    
    mouse.c:1004:35: warning: Using plain integer as NULL pointer
    sun_mouse.c:325: warning: 'absX' might be used uninitialized in this function
    sun_mouse.c:325: warning: 'absY' might be used uninitialized in this function
    sun_mouse.c: (158) warning: constant truncated by assignment
    
    declared global, could be static:
        hardProtocolList    mouse.c(3151)
        softProtocolList    mouse.c(3163)
        serialDefaultsList  mouse.c(3366)

diff --git a/src/mouse.c b/src/mouse.c
index 8adfba4..45d7b85 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -1001,7 +1001,7 @@ MousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
     pInfo->fd = -1;
     pInfo->dev = NULL;
     pInfo->private_flags = 0;
-    pInfo->always_core_feedback = 0;
+    pInfo->always_core_feedback = NULL;
     pInfo->conf_idev = dev;
 
     /* Check if SendDragEvents has been disabled. */
@@ -3148,6 +3148,7 @@ ps2WakeupHandler(pointer data, int i, pointer LastSelectMask)
 #  define AP_DBGC(x)
 #endif
 
+static
 MouseProtocolID hardProtocolList[] = { 	PROT_MSC, PROT_MM, PROT_LOGI, 
 					PROT_LOGIMAN, PROT_MMHIT,
 					PROT_GLIDE, PROT_IMSERIAL,
@@ -3160,6 +3161,7 @@ MouseProtocolID hardProtocolList[] = { 	PROT_MSC, PROT_MM, PROT_LOGI,
 					PROT_UNKNOWN
 };
 
+static
 MouseProtocolID softProtocolList[] = { 	PROT_MSC, PROT_MM, PROT_LOGI, 
 					PROT_LOGIMAN, PROT_MMHIT,
 					PROT_GLIDE, PROT_IMSERIAL,
@@ -3287,7 +3289,7 @@ createProtoList(MouseDevPtr pMse, MouseProtocolID *protoList)
 		    break;
 		} else {
 		    /* 
-		     * Bail ot if number of bytes per package have
+		     * Bail out if number of bytes per package have
 		     * been tested for header.
 		     * Take bytes per package of leading garbage into
 		     * account.
@@ -3363,7 +3365,7 @@ createProtoList(MouseDevPtr pMse, MouseProtocolID *protoList)
 
 
 /* This only needs to be done once */
-void **serialDefaultsList = NULL;
+static void **serialDefaultsList = NULL;
 
 /*
  * createSerialDefaultsLists() - create a list of the different default
diff --git a/src/sun_mouse.c b/src/sun_mouse.c
index 827af34..1f01f17 100644
--- a/src/sun_mouse.c
+++ b/src/sun_mouse.c
@@ -155,7 +155,7 @@ vuidMouseWheelInit(InputInfoPtr pInfo)
 
     wstate.vers = VUID_WHEEL_STATE_VERS;
     wstate.id = 0;
-    wstate.stateflags = -1;
+    wstate.stateflags = (uint32_t) -1;
 
     SYSCALL(i = ioctl(pInfo->fd, VUIDGWHEELCOUNT, &nwheel));
     if (i != 0)
@@ -322,7 +322,7 @@ vuidReadInput(InputInfoPtr pInfo)
     unsigned int n;
     int c; 
     unsigned char *pBuf;
-    int absX, absY;
+    int absX = 0, absY = 0;
     Bool absXset = FALSE, absYset = FALSE;
 
     pMse = pInfo->private;

commit 6f14e8569150b0d6fac7186968cde8b031a1fefc
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Thu Jan 8 21:20:58 2009 -0800

    Add XORG_CWARNFLAGS & XORG_WITH_LINT for more compiler checking

diff --git a/Makefile.am b/Makefile.am
index bc61af6..6acb949 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -36,3 +36,9 @@ ChangeLog:
 	$(CHANGELOG_CMD)
 
 dist-hook: ChangeLog
+
+if LINT
+# Check source code with tools like lint & sparse
+lint:
+	(cd src && $(MAKE) $(MAKEFLAGS) lint)
+endif LINT
diff --git a/configure.ac b/configure.ac
index f929468..4b54604 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,6 +45,7 @@ AM_CONFIG_HEADER([config.h])
 AC_DISABLE_STATIC
 AC_PROG_LIBTOOL
 AC_PROG_CC
+XORG_CWARNFLAGS
 
 AH_TOP([#include "xorg-server.h"])
 
@@ -64,9 +65,6 @@ XORG_DRIVER_CHECK_EXT(XINPUT, inputproto)
 PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901] xproto $REQUIRED_MODULES)
 sdkdir=$(pkg-config --variable=sdkdir xorg-server)
 
-CFLAGS="$CFLAGS $XORG_CFLAGS "' -I$(top_srcdir)/src'
-AC_SUBST([CFLAGS])
-
 # Checks for libraries.
 
 # Checks for header files.
@@ -89,6 +87,9 @@ case $host_os in
 esac
 AC_SUBST([OS_MOUSE_NAME])
 
+dnl Allow checking code with lint, sparse, etc.
+XORG_WITH_LINT
+
 XORG_MANPAGE_SECTIONS
 XORG_RELEASE_VERSION
 XORG_CHANGELOG
diff --git a/src/Makefile.am b/src/Makefile.am
index 9f42679..da0dba5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -18,6 +18,8 @@
 #  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 #  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
+AM_CFLAGS = $(CWARNFLAGS) 
+AM_CPPFLAGS = $(XORG_CFLAGS) -I$(top_srcdir)/src
 
 # this is obnoxious:
 # -module lets us name the module exactly how we want
@@ -41,3 +43,11 @@ OS_SRCS = bsd_mouse.c hurd_mouse.c lnx_mouse.c sun_mouse.c
 	@OS_MOUSE_NAME@_mouse.c
 
 EXTRA_DIST = $(OS_SRCS)
+
+if LINT
+ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+                $(AM_CPPFLAGS) $(CPPFLAGS)
+
+lint:
+	$(LINT) $(ALL_LINT_FLAGS) $(@DRIVER_NAME@_drv_la_SOURCES)
+endif LINT

commit 24d9306546d325089c5fb6b78b90c24b38c86338
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Thu Jan 8 20:40:10 2009 -0800

    Replace static changelog with one generated via XORG_CHANGELOG

diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index b0ff392..0000000
--- a/ChangeLog
+++ /dev/null
@@ -1,112 +0,0 @@
-2006-05-15  Matthias Hopf  <mhopf@suse.de>
-
-	* configure.ac,src/mouse.c:
-	Bump to 1.1.1.
-
-2006-04-21  Matthias Hopf  <mhopf@suse.de>
-
-	* man/mouse.man:
-	Fixed default for YAxisMapping.
-	Changed default for ZAxisMapping. Added short explanation.
-	* src/mouse.c: (MouseCommonOptions), (MouseReadInput):
-	Autodetect (one way only) single wheel only for EXPS2.
-	Use singlebit protocol for multiwheel EXPS2 mice.
-
-2006-04-20  Matthias Hopf  <mhopf@suse.de>
-
-	* src/mouse.c: (MousePostEvent):
-	Overhaul of wheel processing. Does work correctly with multibit
-	zaxis events now.
-
-2006-04-06  Adam Jackson  <ajax@freedesktop.org>
-
-	* configure.ac:
-	* src/mouse.c:
-	* src/pnp.c:
-	Unlibcwrap.  Bump server version requirement.  Bump to 1.1.0.
-
-2006-03-09  Eric Anholt  <anholt@FreeBSD.org>
-
-	* src/mouse.c: (MouseCommonOptions):
-	Coverity #875: Correct several memory leaks in options parsing.
-
-2006-02-28  Adam Jackson  <ajax@freedesktop.org>
-
-	* configure.ac:
-	* src/mouse.c:
-	Bump to 1.0.4.
-
-2006-02-02  Matthias Hopf  <mhopf@suse.de>
-
-	* man/mouse.man:
-	Fixed ButtonMapping default.
-
-2006-01-17  Matthias Hopf  <mhopf@suse.de>
-
-	* src/mouse.c: (MouseDoPostEvent):
-	Bug #5071: EmulateWheelTimeout didn't work as anticipated.
-
-2006-01-09  Daniel Stone  <daniel@freedesktop.org>
-
-	* src/mouse.c:
-	Remove #ifdef PNP_MOUSE blocks, as it was always defined in the
-	monolith.
-
-2005-12-20  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-	* configure.ac:
-	Update package version for X11R7 release.
-
-2005-12-19  Alan Coopersmith  <alan.coopersmith@sun.com>
-
-	* man/mouse.man:
-	Update URL for mouse docs online.
-	Add VUID to supported protocols (used on Solaris).
-
-	* README.sgml:
-	Update docs for X11R6.9 & 7.0 releases.
-	Add note about new ButtonMapping option.
-	Explain changes due to "virtual mouse" support in Solaris 10.
-	Change "mices" to "mice".
-
-2005-12-14  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-	* configure.ac:
-	* src/mouse.c:
-	Update package version number for final X11R7 release candidate.
-	Bump driver version number.
-
-2005-12-06  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-	* man/Makefile.am:
-	Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
-
-2005-12-03  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-	* configure.ac:
-	Update package version number for X11R7 RC3 release.
-
-2005-12-01  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-	* configure.ac:
-	Remove extraneous AC_MSG_RESULT.
-
-2005-11-29  Adam Jackson  <ajax@freedesktop.org>
-
-	* configure.ac:
-	Only build dlloader modules by default.
-
-2005-11-22  Daniel Stone  <daniel@freedesktop.org>
-
-	* configure.ac:
-	Update dependency on xorg-server to >= 0.99.3, for MouseDriverRec changes.
-
-2005-11-09  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-	* configure.ac:
-	Update package version number for X11R7 RC2 release.
-
-2005-11-01  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-	* configure.ac:
-	Update pkgcheck dependencies to work with separate build roots.
diff --git a/Makefile.am b/Makefile.am
index 2b6c46a..bc61af6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,3 +27,12 @@ README: README.sgml
 endif
 
 EXTRA_DIST = README.sgml
+
+MAINTAINERCLEANFILES=ChangeLog
+
+.PHONY: ChangeLog
+
+ChangeLog:
+	$(CHANGELOG_CMD)
+
+dist-hook: ChangeLog
diff --git a/configure.ac b/configure.ac
index 80ab886..f929468 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,6 +26,10 @@ AC_INIT([xf86-input-mouse],
         [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)
+
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_AUX_DIR(.)
 AM_INIT_AUTOMAKE([dist-bzip2])
@@ -87,6 +91,7 @@ AC_SUBST([OS_MOUSE_NAME])
 
 XORG_MANPAGE_SECTIONS
 XORG_RELEASE_VERSION
+XORG_CHANGELOG
 
 XORG_CHECK_LINUXDOC
 


Reply to: