mkdir /tmp/libgd
cd /tmp/libgd
wget 'https://github.com/libgd/libgd/archive/gd-2.1.1.tar.gz'
tar xvzf tar xvzf gd-2.1.1.tar.gz
cd libgd-gd-2.1.1
mkdir build 
cd build
cmake ..  -DCMAKE_INSTALL_PREFIX=/cvmfs/oasis.opensciencegrid.org/osg/modules/gd/2.1.1
make
make install

mkdir /tmp/libgd
cd /tmp/libgd
wget 'https://github.com/libgd/libgd/archive/gd-2.1.1.tar.gz'
tar xvzf tar xvzf gd-2.1.1.tar.gz
cd libgd-gd-2.1.1
./bootstrap.sh
./configure --prefix=/cvmfs/oasis.opensciencegrid.org/osg/modules/gd/2.1.1
make
make install

Use bootstrap/configure/make instead of cmake
Use bootstrap/configure/make instead of cmake
