Basically:
 ./configure
 make
 make install

Try ./configure --help for some options.

Important options to ./configure are:
 --prefix=...       to install in a custom directory (default is /usr/local)
 --enable-debug=no  to compile with all optimization (default is debug)

You won't get the PhotoJPEG plug-in compiled unless you have libjpeg installed.
