Hi,
Debian has begun the transition to xorg7, which brings a little
of both good and bad news. As some have already pointed out,
the wacom_drv module appears to no longer be part of the upstream
distribution, but that is offset somewhat by there now being a
driver sdk package making it much easier to build separately.
I plan to have a xserver-xorg-input-wacom package in place to
fill that gap shortly, but there seem to be a few things we
need to account for first.
What I know so far: (the patch below is shorter, perhaps read
that first, then if you still need the 'why', it may be here ;-)
The Debian xserver-xorg-dev package installs the SDK headers
in /usr/include/xorg. This is not compatible with the current
AC_WCM_CHECK_XORG_SDK macro tests, there is no param that can
be passed to --with-xorg-sdk=sdkdir to specify that correctly.
The first two hunks of the following patch add a check for
'sdkdir' before checking sdkdir/include and sdkdir/xc/include,
fixes a typo in the assignment in the 'xc' case ($WCM_XORGSDK=...)
and pads WCM_XORGSDK with any suffix as required so DRIVER_INCLUDES
need not assume it will be '/include'.
That is sufficient to locate the xorg sdk, if not by default,
at least with an explicit param. We can probably improve on
that, but I'm trying to keep changes minimal, initially at least.
The next two hunks address the problem of the include path to
the xlib headers not being correctly added. Since I'm testing
this one a transitional system with the xorg7 sdk, but xorg6
xlibs, they are currently in /usr/X11R6/include/X11/ -- however
with the release of xorg7 xlib this becomes a bit simpler, as
the headers are moved to /usr/include/X11.
In this case, rather than modify AC_WCM_CHECK_XLIB to add the
include path, it seemed simpler and safer to use the AC_PATH_XTRA
macro from autoconf to define X_CFLAGS and add them to the
DRIVER_INCLUDES.
That left one final problem, the xlib keysym.h include in xf86Wacom.h.
A slightly more backward compatible option might have been to append
/X11 to the X_CFLAGS, but I think the patch below is the more correct
thing to do to avoid future pain. #include <X11/somexlib.h> would seem
to be the standard documented idiom previously, and in future if the
headers are in /usr/include/X11/, it means no special path for Xlib
will need to be detected at all.
I'm not sure what will need to be tweaked on other platforms to keep
that working for them, as I can't see anywhere that Xlib headers from
the system install were searched for previously. I assume that was
all expected to be found in the XFree source dir or so.
Anyway, with the following patch, I am able to build wacom_drv in a
form we can distribute as a part of the Debian xorg release. I hope
there shouldn't be too many problems applying it or something like it.
cheers,
Ron
diff -ruN linuxwacom-0.7.3-1.bootstrapped/acinclude.m4
linuxwacom-0.7.3-1/acinclude.m4
--- linuxwacom-0.7.3-1.bootstrapped/acinclude.m4 2006-04-07
04:35:03.000000000 +0930
+++ linuxwacom-0.7.3-1/acinclude.m4 2006-04-16 19:19:47.000000000 +0930
@@ -224,12 +224,16 @@
if test -n "$WCM_XORGSDK"; then
AC_MSG_CHECKING(for valid Xorg SDK)
- if test -f $WCM_XORGSDK/include/xf86Version.h; then
+ if test -f $WCM_XORGSDK/xf86Version.h; then
WCM_ENV_XORGSDK=yes
AC_MSG_RESULT(ok)
+ elif test -f $WCM_XORGSDK/include/xf86Version.h; then
+ WCM_ENV_XORGSDK=yes
+ WCM_XORGSDK=$WCM_XORGSDK/include
+ AC_MSG_RESULT(ok)
elif test -f $WCM_XORGSDK/xc/include/xf86Version.h; then
WCM_ENV_XORGSDK=yes
- $WCM_XORGSDK=$WCM_XORGSDK/xc
+ WCM_XORGSDK=$WCM_XORGSDK/xc/include
AC_MSG_RESULT(ok)
else
AC_MSG_RESULT("xf86Version.h missing")
diff -ruN linuxwacom-0.7.3-1.bootstrapped/src/Makefile.am
linuxwacom-0.7.3-1/src/Makefile.am
--- linuxwacom-0.7.3-1.bootstrapped/src/Makefile.am 2005-10-26
10:06:47.000000000 +0930
+++ linuxwacom-0.7.3-1/src/Makefile.am 2006-04-16 20:05:15.000000000 +0930
@@ -52,7 +52,7 @@
XSERVER64 [EMAIL PROTECTED]@
if WCM_ENV_XORGSDK
-DRIVER_INCLUDES = -I$(XORGSDK_DIR)/include
+DRIVER_INCLUDES = -I$(XORGSDK_DIR) $(X_CFLAGS)
endif
if WCM_ENV_XF86
diff -ruN linuxwacom-0.7.3-1.bootstrapped/configure.in
linuxwacom-0.7.3-1/configure.in
--- linuxwacom-0.7.3-1.bootstrapped/configure.in 2006-04-07
04:35:03.000000000 +0930
+++ linuxwacom-0.7.3-1/configure.in 2006-04-16 19:31:14.000000000 +0930
@@ -43,6 +43,10 @@
fi
AC_WCM_CHECK_XORG_SDK
+# Define X_CFLAGS, X_LIBS, X_EXTRA_LIBS and X_PRELIBS as required if X
+# is found, else defines X_DISPLAY_MISSING. We need at least X_CFLAGS.
+AC_PATH_XTRA
+
dnl Check for TCL, TK, and XLib
AC_WCM_CHECK_XLIB
AC_WCM_CHECK_TCL
diff -ruN linuxwacom-0.7.3-1.bootstrapped/src/xf86Wacom.h
linuxwacom-0.7.3-1/src/xf86Wacom.h
--- linuxwacom-0.7.3-1.bootstrapped/src/xf86Wacom.h 2006-04-07
04:35:03.000000000 +0930
+++ linuxwacom-0.7.3-1/src/xf86Wacom.h 2006-04-16 20:05:08.000000000 +0930
@@ -69,7 +69,7 @@
#include <xf86_OSproc.h>
#include <xf86Xinput.h>
#include <exevents.h> /* Needed for InitValuator/Proximity stuff */
-#include <keysym.h>
+#include <X11/keysym.h>
#include <mipointer.h>
#ifdef XFree86LOADER
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Linuxwacom-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss