Make the directory produced by unpacking the distribution file your working directory, and type ./configure. If no error messages are produced, type make, and you should then be able to run the game by typing ./cpsokoban. (When you do this, a directory called .cpsokoban will be created in your home directory to record your scores.) If this does not work, or you want to use make install, or to change some of CPSokoban's defaults, read on. If you are using Cygwin, see the section Installing under Cygwin below.
If configure gives an error message, it probably means that some required piece of software is missing (in which case you will need to install it), or that Python has not been configured to work with Tkinter (in which case you will need to reconfigure it). There are a couple of situations where configure may fail to find some file that is actually present, and running it again with suitable arguments will fix the problem.
First, configure may be unable to find the Python library. Probably this is because it was unable to guess the name of the library. In this case, running ./configure LIBS=-llibrary should fix the problem. Here library follows the conventions for -l options to cc; for instance, if the library is called libpython2.3.so, you would type ./configure LIBS=-lpython2.3. Alternatively, the library may be in some directory that is not normally searched for libraries; in that case, use ./configure LDFLAGS=-Ldirectory.
Secondly, configure may be unable to find the header file Python.h. Typically, this is because it is in a subdirectory of a directory on the search path, and configure was unable to guess the subdirectory. For instance, it may be in /usr/include/python2.3/, which is not searched although /usr/include/ is. In this case use ./configure INCLUDES=-I/usr/include/python2.3.
Configure will give a warning if the Python module optparse is not found. You can go ahead anyway; it simply means that CPSokoban will ignore any arguments you give it. You should consider updating Python.
The default values for the following arguments to configure are given in brackets.
The above are options common to all configure scripts produced by autoconf, though the default value for BINDIR differs from the usual EPREFIX/bin. What make install does is to copy a single executable, cpsokoban, to BINDIR, and create, if it does not already exist, a directory into which it copies Python scripts, pixmap files, and other things. The name of this directory can be specified by giving configure an argument like this:
Running make uninstall will remove cpsokoban from BINDIR, and the entire directory CPSDIR.
Here are two problems I have noticed with Cygwin; they may or may not occur with your Cygwin installation. First, the Python library is in /bin, for some reason unknown to me, so you need to give the argument LDFLAGS=-L/bin to configure. Secondly, after you do this it is likely that the program will build, but fail to run because Tkinter cannot find the Tcl/Tk libraries. Probably they are in /usr/share, which is not searched, but /share, which would be searched, does not exist. The fix is to create /share as a link to /usr/share.