sudo apt-get update
sudo apt-get install libdb4.8-dev
sudo apt-get install libdb4.8++-dev
git clone --branch v0.9.3-gap https://github.com/gjhiggins/gapcoin
cd gapcoin
git submodule init
git submodule update
./autogen.sh
./configure --with-incompatible-bdb --without-miniupnpc
make
If you're going to the effort of installing libdb4.8, then you can omit the --with-incompatible-bdb, as libdb4.8 is the compatibility standard.
Compatibility is for when a user migrates from a client linked against libdb4.8 to a client linked against a later version, say libdb5.3. On running the libdb5.3-linked client, the wallet is automatically upgraded to use the later version. If the user then decides to revert to the client linked against 4.8, that client can't load that upgraded wallet.
Trivial solutions: save the wallet before trying a new version of the client or don't revert. Complex solution: always link against libdb4.8 unless --with-incompatible-bdb is specified in the compilation instructions. Practical solution: always build binaries for proprietary OS linked against libdb4.8 or make it SCREAMINGLY CLEAR that the binary uses the latest-and-greatest, faster, more robust version of libdb and to SAVE THE FECKING WALLET before continuing.
Cheers
Graham