Code cleanup.
- separated hotplug functionality from device driver for USB devices
- factored out common code to minimize redundancy for different platforms (linux/freebsd)
- created an internal "device" data type to allow handling both USB and serial devices
  transparently without conditions everywhere.

Also fixed a minor performance bug. If there is no device plugged in, the repeat interval is ignored.


git-svn-id: svn://svn.code.sf.net/p/spacenav/code/trunk@139 ef983eb1-d774-4af8-acfd-baaf7b16a646
now spacenavd should compile and be completely usable for serial devices on any platform


git-svn-id: svn://svn.code.sf.net/p/spacenav/code/trunk@140 ef983eb1-d774-4af8-acfd-baaf7b16a646
Abort running if another spacenavd instance is already running. The detection
is robust even in the case of a stale pidfile.



git-svn-id: svn://svn.code.sf.net/p/spacenav/code/trunk@141 ef983eb1-d774-4af8-acfd-baaf7b16a646
Fixed bug #3512076 by placing #include "proto_x11.h" inside a USE_X11 ifdef block


git-svn-id: svn://svn.code.sf.net/p/spacenav/code/trunk@142 ef983eb1-d774-4af8-acfd-baaf7b16a646
Added DESTDIR to the makefile, see bug #3512087


git-svn-id: svn://svn.code.sf.net/p/spacenav/code/trunk@143 ef983eb1-d774-4af8-acfd-baaf7b16a646
Added DESTDIR to the makefile by applying Anthoine Bourgeois' patch. See bug #3512087


git-svn-id: svn://svn.code.sf.net/p/spacenav/code/trunk@144 ef983eb1-d774-4af8-acfd-baaf7b16a646
- added -L/usr/X11/lib to the generated X link line in configure
- fixed a couple of annoying warnings in dummy_usb.c
- in spnavd.c I forgot to include string.h
- fixed a typo in xdetect_freebsd.c and made it compile on MacOSX too


git-svn-id: svn://svn.code.sf.net/p/spacenav/code/trunk@145 ef983eb1-d774-4af8-acfd-baaf7b16a646
starting preliminary work on macosx port


git-svn-id: svn://svn.code.sf.net/p/spacenav/code/trunk@146 ef983eb1-d774-4af8-acfd-baaf7b16a646
fixed a bug in libspnav which made it impossible to close and reopen the
connection to spacenavd. Reported by Andreas Hermann.



git-svn-id: svn://svn.code.sf.net/p/spacenav/code/trunk@147 ef983eb1-d774-4af8-acfd-baaf7b16a646
forgot a close call


git-svn-id: svn://svn.code.sf.net/p/spacenav/code/trunk@148 ef983eb1-d774-4af8-acfd-baaf7b16a646
started merging the serial magellan code


git-svn-id: svn://svn.code.sf.net/p/spacenav/code/trunk@149 ef983eb1-d774-4af8-acfd-baaf7b16a646
added contrib directory for unmaintained 3rd party contributions, starting with
Richard Shaw's and John Morris' systemd unit file from Fedora.



git-svn-id: svn://svn.code.sf.net/p/spacenav/code/trunk@150 ef983eb1-d774-4af8-acfd-baaf7b16a646
added spnavcfg.desktop file along with the icons


git-svn-id: svn://svn.code.sf.net/p/spacenav/code/trunk@151 ef983eb1-d774-4af8-acfd-baaf7b16a646
merged Ralf Morel's patch for multiple device support



git-svn-id: svn://svn.code.sf.net/p/spacenav/code/trunk@152 ef983eb1-d774-4af8-acfd-baaf7b16a646
beefed up the error handling and logging around the XAUTHORITY setup, and added the possibility of using the HOME env var as a fallback


git-svn-id: svn://svn.code.sf.net/p/spacenav/code/trunk@153 ef983eb1-d774-4af8-acfd-baaf7b16a646
added missing include in smag_comm.c


git-svn-id: svn://svn.code.sf.net/p/spacenav/code/trunk@154 ef983eb1-d774-4af8-acfd-baaf7b16a646