On OS X, I recently grabbed the latest development copy of Mutt (1.5.16) and configured it w/ header caching like so:

./configure --prefix=$HOME/sys --enable-imap --enable-hcache

Unfortunately I got this error upon 'make':

hcache.c:997:12: error: invalid suffix "x" on integer constant
make[2]: *** [hcache.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Here's the fix:

rm hcversion.h
make hcversion.h

Now 'make' should work.