To be able to compile BDB XML with clang, there are some code changes to be implemented first - see the accompanying patch file.
patch -p2 < ~/bdbxml-clang.patch
./buildall.sh -m 'make -j6' \
--with-configure-env="CC=clang CXX=clang++ CXXFLAGS='-std=c++11 -stdlib=libc++ -lc++ -mmacosx-version-min=10.7 -Wno-c++11-narrowing' LDFLAGS='-stdlib=libc++ -lc++ -mmacosx-version-min=10.7'" \