This should build on OS X. Use homebrew to install deps & this command:

Within src directory:

    make USE_UPNP=1 -j $(sysctl -n hw.ncpu) -f Makefile.osx all
SetupEnvironment() commit
Tweak name_list a little bit.

Remove unused variable and create other variable later (where it is
needed).  This "fixes" some oversights from the latest name_list
optimisations.
Merge branch 'namecoinq' into macosx
Macro guards to make it compile on non-clang compilers.
Switched to Berkeley DB 4. Other changes (see details below!!!)

- got rid of gthread
+ removed a bunch of unused and irrelevant-to-osx stuff from Makefile
+ no need to specify `USE_UPNP=1`, it is done for you (make sure to install it!)

Instructions:

1. `brew install openssl berkeley-db4 boost miniupnpc`
2. cd src && make -f Makefile.osx -j $(sysctl -n hw.ncpu) all
Bloody MSG_NOSIGNAL defines for linux/mac/win compat.

Thanks for pointing it out @luke-jr!
Fix last breaking change on linux. Now compiles (at least with clang :P)
Merge pull request #176 from itoffshore/namecoinq

SetupEnvironment() commit **(revised)**
Merge pull request #177 from domob1812/namelist-tweak

Tweak name_list a little bit.
fix util.cpp
Merge pull request #179 from itoffshore/namecoinq

fix util.cpp
Merge pull request #136 from okTurtles/macosx

Minimal changes to get building on OS X with clang and Homebrew
Add CTxIndex::GetHeight routine.

Split the old code of CTxIndex::GetDepthInMainChain to allow also
GetHeight() and GetContainingBlock() to be used.
Add IsUnspendable method, blocking dust spam outputs.

Implement IsUnspendable() as additional check when verifying
transactions.  This method checks for provably unspendable outputs (will
be useful later on for the UTXO set), and it also blocks dust spam
outputs created between blocks 39k and 41k from being spent in the
future.  This enables them to be removed from the UTXO set.