I had to #ifdef out all the references to gpm. I gather gpm has to do with console mouse tracking?
Do you have any suggestions as to how I might implement these gpm functions?
GPM is only necessary if you run a program in the bare-bones linux-console; if you run programs in a terminal emulator under X (aterm, xterm), mouse functionality should be handled by ncurses-functions (see ncurses.h).
If the program uses for example 'getmouse()' somewhere, it probably utilizes the mouse via ncurses.
I compiled
w3m, which also uses ncurses, and the mouse works as expected.
I don't know it GPM supports the touchscreen-driver (without X) at all.