How to port cqcam to new platforms
----------------------------------

This document discusses what steps are required to port cqcam to a new
platform.  If you're trying to port cqcam to a supported OS on an
unsupported architecture (e.g., Linux on the PowerPC), try just compiling
it.  This document discusses only unsupported OSes.


Step 1: libcqcam/port.C
-----------------------

Find out how your OS allows access to hardware I/O ports.  Some OSes
require the program to enable ports.  Some require the superuser to enable
ports separately.  Some require the process to have superuser privileges. 
And some, like Solaris, don't allow port access from user space.

If you have to write a kernel module because your OS obnoxiously allows no
port access at all from user space, do it now. 

Once you know how your OS enables ports, hack that code into port.C.  Also
hack the appropriate #include files into port.C. 


Step 2: libcqcam/port.h
-----------------------

Check the order of the arguments for inb and outb.  Add the appropriate
#define in port.h if your OS uses Linux order (data,port) or BSD order
(port,data).  Add the appropriate #include files in port.h.  If your OS
uses something other than inb/outb (e.g., Linux/ARM uses lseek, read, and
write on /dev/ports), put that in port.h instead.


Step 3: configure.in
--------------------

Add a section for your OS at the end of configure.in and run autoconf.  
(Get autoconf if you don't already have it.)


Step 4: docs/INSTALL
--------------------

(optional) Add information about your OS, if there's anything special to
say, in docs/INSTALL.


Step 5: send me diffs
---------------------

(optional) Bundle your changes as a unified diff (diff -u) and send them
to me: patrick@cs.virginia.edu.
