The Linux Wacom Project Logo

Linux Wacom Project HOWTO

2.4 - Configuring the Package

This section describes how to configure the package. You can run the configure script now as the samples below demonstrate, or later when you reach the section of the document that explains what specifically needs to be configured and why. This page is provided largely as a reference.

By default, xidump, wacdump, xsetwacom, wacom_drv.o, and wacomcpl are built. Additional options include replacement of kernel drivers for hid, mousedev, evdev, and usbmouse as well as building the XFree86/Xorg driver from scratch. Lastly, remember that for every --enable option, there is also an equivalent --disable option.

The configuration options are listed on this page. You can also see the online list by issuing ./configure -help under linuxwacom's base directory.

Note: You should remove the existing linuxwacom package on your system before installing the drivers and utilities from this project.

Building Kernel Modules - USB Only

In order to build kernel modules, you will need the kernel source installed on your system. If you are running on Redhat or Mandrake, you can get it by installing the kernel-source RPM.

The kernel source directory is assumed to be in /usr/src/linux, /usr/src/linux-2.6, /usr/src/linux-`uname -r`, or /lib/modules/`uname -r`/source. If your kernel sources are elsewhere, you will need to specify the directory with the --with-kernel option described below.

For 2.6.16 and 2.6.17 kernels, you need to configure the kernel modules (wacom and hid) under your kernel source directory before configuring linuxwacom.

Note, for kernel 2.6.18 and later, no need to build hid any more. Refer to Testing Tablet Detection to see if you need to build hid or not.

Module Versioning - USB Only

The script attempts to discover if the kernel is using module versioning by detecting the presence of version numbers in the hid.o module of the currently active kernel. Recent package versions also check for hid.o.gz which exist on Mandrake systems. The configure script may not be able to determine if kernel module versioning should be enabled or not, in which case it will say "unknown, assuming no."

If module versioning is disabled when it should be enabled, depmod will complain about missing symbols but otherwise, things will probably work fine. If it is enabled when it should be disabled, the code may not compile, and it almost certainly will not load properly. If the configure script fails to determine the correct value, the default action of disabling module versioning is the better choice, and you can allows enable it manually and rebuild if depmod complains.

The XFree86/Xorg XInput Driver - USB and Serial

Generally, you will not need to build wacom_drv.o since it ships in binary form in the prebuilt directory. There are prebuilt binaries for XFree86 and Xorg corresponding to x86 and x86-64 systems, respectively. If no one works for you, building from source may be your only option. See the Building wacom_drv.o from Scratch page for more information.

Library Dependencies - ncurses and XLib

Various utilities in the linuxwacom package require not only specific libraries, but their development header files as well. The ncurses package is one such example. Most distributions install the ncurses libraries by default, but the header files are often located in a separate package. You will need both.

Similarly, if you wish to test your tablet using xidump to view XFree86/Xorg input events, you will need the XFree86/Xorg development headers. On Redhat/Fedore Core, they are contained in the XFree86-devel/xorg-sdk package.

If any packages are missing, the configuration will warn you and disable building any programs that depend on them.

Processor Type

The processor type is determined by the script and used to build the kernel modules. If it guesses incorrectly, or you would prefer a different setting, use the --with-arch option described below.

Linux Specific Features

The Linux wacom driver uses the Linux input subsystem, as does the USB portions of the XFree86/Xorg driver. Consequently, if you are building on a non-Linux system, the USB code will not work for you. This is detected, and a comment to that effect is added to the configuration summary. I recognize that FreeBSD and similar systems have USB support; however, until someone can bridge the gap between the FreeBSD kernel and the XFree86/ driver, the problem is largely unsolved. Contributions are of course welcome. The Linux-specific features can be enabled/disabled using the --with-linux argument.

Configuration Options

The following options are provided as reference. Normally, you will only need a few of these options. Some obscure systems or you want to build a driver for another platform may need all of them. Each section of the document identifies which options are needed and when.

OptionDefault Builds
--enable-wacomno wacom.o kernel driver
--enable-wacdumpyes wacdump LinuxInput event monitor
--enable-xidumpyes xidump XInput event monitor
--enable-libwacomcfgyes libwacomcfg Dynamic library for xsetwacom
--enable-libwacomxiyes libwacomxi Dynamic library for wacomcpl
--enable-xsetwacomyes xsetwacom XFree86 wacom driver configuration comannd
--enable-quirk-tablet-rescalebest guess Enable tablet to screen rescale code. Note: If you have TwinView setup running on a X server 1.4 and later, and your mappping doesn't work properly, enable this option may resolve the issue.
--enable-quirk-Uninit-calledbest guess Enable Uninit called
--enable-hidno hid.o replacement kernel driver (not normally needed)
--enable-wacomdrvyes wacom_drv.o XFree86/Xorg driver (binary is available in prebuilt directory)
--enable-modver=yes|nobest guess enables kernel module versioning; usually guesses correctly, but can be enabled or disabled if not
--with-kernel=dirbest guess Specifies the kernel source directory if configure cannot guess correctly.
--with-x-src=dirbest guess Specifies the X driver build source directory
--with-xorg-sdk=dirbest guess Specifies the Xorg SDK directory
--with-tcl=dir/usr Specifies the tcl directory. The tcl's include and lib directories should be under this directory. If tcl.h is not in dir/include, it will be searched under dir directly
--with-tk=dir/usr Specifies the tk directory. If tk is under the same directory as tcl, this option can be eliminated. Otherwise, the tk's include and lib directories should be under this directory. If tk.h is not in dir/include, it will be searched under dir directly
--with-arch=archbest guess Specifies the architecture if configure guesses incorrectly
--enable-xserver64=yes|nobest guess enables 64-bit X server. You probably need to define xlib directory by adding option --with-xlib=xlib-dir so compiler can link with the right Xlib.
--with-linux=yes|nobest guess Specifies if compiled on a Linux system; USB code is Linux specific
--with-xlib=yes|nobest guess Specifies if building xlib-based programs; xidump uses XInput headers
--enable-dlloader=yes|nobest guess Enable dlloader build option and built instead of wacom_drv.o
--with-xmoduledir=dirbest guess Specify wacom_drv path explicitly. Implies --enable-dlloader

Configuration Samples

Here is a sample output of the script on a Fedora Core 5 system:

[jej@ayukawa linuxwacom]$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arch type... i386-redhat-linux
checking for kernel type... Linux
checking for linux-based kernel... yes
checking for kernel sources... /lib/modules/2.6.20-1.2320.fc5/source
checking for kernel module support... yes
checking for kernel module versioning... yes
checking for valid Xorg SDK... ok
checking for X... libraries , headers
checking for X lib directory... found
checking for tclsh... /usr/bin/tclsh
checking for tcl version... 8.4
checking for tcl header files... /usr/include/
checking for tk header files... found
checking ncurses.h usability... yes
checking ncurses.h presence... yes
checking for ncurses.h... yes
       architecture - i386-redhat-linux
       linux kernel - yes 2.6.18
  module versioning - yes -DCONFIG_MODVERSIONS -DMODVERSIONS -include /lib/modules/2.6.20-1.2320.fc5/source/include/linux/modversions.h
      kernel source - yes /lib/modules/2.6.20-1.2320.fc5/source
           Xorg SDK - yes /usr/include/xorg
          XSERVER64 - no 
           dlloader - yes 
               XLib - yes /usr/lib
                TCL - yes /usr/include
                 TK - yes /usr/include
            ncurses - yes

            wacom.o - no
            wacdump - yes
             xidump - yes
        libwacomcfg - yes
         libwacomxi - yes
          xsetwacom - yes
              hid.o - no
         usbmouse.o - no
            evdev.o - no
         mousedev.o - no
            input.o - no
        tabletdev.o - no - yes /usr/lib/xorg/modules/input
        wacom_drv.o - no
  wacom*_drv quirks - libc-wrapper key-events dixScreenOrigins

If the configure script fails to find something that it is looking for, it may disable some options that you previously enabled on the command-line. If this happens, check the output for a warning like the following:

checking for valid XFree86/ build environment... xf86Version.h missing
Tried /usr/programs/Xserver/hw/xfree86 and /usr/xc/programs/Xserver/hw/xfree86
*** Unable to compile wacom_drv.{o,so}
*** without Xorg SDK or XFree86 build environment
*** wacom_drv.o will not be built

In this particular case, the X driver was enabled. The --with-x-src option was not specified. And the configure can not find the header file, xf86Version.h, under any of the predefined paths. Without the build environment, the module cannot be compiled and was consequently disabled.

The following sample command-line will build everything but wacdump while disabling module versioning. It also has a user-specified kernel source directory:

[jej@ayukawa linuxwacom]$ ./configure --enable-wacom --disable-wacdump

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for HAL... yes
checking for arch type... i586-suse-linux
checking for kernel type... Linux
checking for linux-based kernel... yes
checking for kernel source/headers... /lib/modules/
checking kernel version...
checking for kernel module support... yes
checking for Xlib... yes
checking for XSERVER... yes
checking for xserver libc-wrapper header-files... yes
checking if scaling tablet to screen size is needed... yes
checking if Xorg server is version 1.4 or later... yes
checking if Xorg is 7.3 or earlier... no
checking if Xorg server is version 1.5.2 or later... no
checking if Xorg server is version 1.6 or later... no
checking if Xorg SDK defined IsXExtensionPointer... yes
checking if Xorg SDK defines dixScreenOrigins... yes
       architecture - i686
       linux kernel - yes 2.6.24
  module versioning - no
      kernel source - yes /lib/modules/
            XFree86 - no
           Xorg SDK - yes /usr/include/xorg
          XSERVER64 - no
           dlloader - yes
         xf86config - no
               XLib - yes /usr/X11R6/lib
                TCL - yes /usr/local/ActiveTcl
                 TK - yes /usr/local/ActiveTcl
            ncurses - yes

            wacom.o - yes
            wacdump - no
             xidump - yes
        libwacomcfg - yes
         libwacomxi - yes
          xsetwacom - yes - yes
        wacom_drv.o - no
  wacom*_drv quirks - hal libc-wrapper tablet-screen-scaling IsXExtensionPointer key-events dixScreenOrigins Uninit-called

Notice that the configure script guessed module versioning was enabled by default, but was disabled by the command-line option --disable-modver. Similarly, the wacdump program which is enabled by default was also disabled. All the kernel modules and the XFree86 wacom driver are enabled.

Copyright (C) 2002-2011 - LinuxWacom -Last updated July 23, 2012
This website and its contents are licensed under the GNU GENERAL PUBLIC LICENSE.