You can either choose to use a complete Mozilla build (on Debian/Ubuntu, you can just install the mozilla-dev package), or build a standalone XPCOM/XPConnect.
Because I am using a standalone XPConnect build, I will give a few instructions on how to build it in addition to Mozilla's Standalone XPCOM information. The Mozilla project uses its build system for checking out the required parts of the CVS repository:
export CVSROOT=":pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot" cvs -z 3 co mozilla/client.mk cd mozilla make -f client.mk pull_all BUILD_MODULES=xpconnect MOZ_CO_TAG=MOZILLA_1_0_BRANCH
On a Windows platform you would instead use:
set CVSROOT=":pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot" cvs -z 3 co mozilla/client.mak cd mozilla nmake -f client.mak pull_xpconnect MOZ_CO_TAG=MOZILLA_1_0_BRANCH
If you only want to use XPCOM/XPConnect (and not debug the code yourself), it is a good idea to disable debugging and enable optimisations:
./configure --enable-modules=xpconnect --disable-debug --enable-optimizemake BUILD_MODULES=xpconnect
Again, the build system works a bit differently on a Windows platform:
nmake -f client.mak build_xpconnect
