What is the source directory? In the website http://gfs.sourceforge.net/wiki/index.php/Mac_OSX_Installation 

In this line:  


  type from the source directory

./autogen.sh
./configure --enable-osmesa --prefix=$HOME/soft
make
make install



What is the source directory referring to here ?
It's the directory that contains the source. In the example given in the link, it's ~/soft, but it really depends where you unpacked the tarball containing the source.

./autogen.sh runs autogen.sh in the current folder. However, autogen.sh and the source files won't be in every folder. It's asking you do go to the folder that contains the app source to run the commands. cd &lt;path&gt; to go there, then run the commands.