./configure

disable gnome: ./configure --disable-gnome
disable kde:   ./configure --disable-kde 

change the directory of the version you want to install and do:

make
make install
