bitcoin/bitcoin — pull request #2241 by luke-jr (2013-01-30 14:44:06+00:00)
Title: Support for building against system LevelDB

This is necessary for proper downstream distro packaging, and useful for people who have LevelDB installed for other reasons anyway. Undocumented to infer an unsupported status, but I could add a brief blurb if that's desirable. Only implemented for Linux (ie, not makefile.) for now - I assume OSX and Windows won't be packaging LevelDB/Bitcoin themselves anytime soon.

To test:
1) Optional: Delete or move src/leveldb so any attempt to use it errors explicitly
2) Install LevelDB on your system as a shared library
3) qmake bitcoin-qt.pro USE_SYSTEM_LEVELDB=1
4) cd src
5) make -f makefile.unix USE_SYSTEM_LEVELDB=1 bitcoind
6) make -f makefile.unix USE_SYSTEM_LEVELDB=1 test_bitcoin

Step 6 (test_bitcoin) will fail if your system LevelDB does not support memenv. This is expected behaviour.