So after my last attempt to compile Qt4 on my Mac, and getting the same error repeatedly, I decided to submit a bug report. One of the guys at Trolltech replied to my bug report, and asked me a number of questions, including "Have you completely removed your previous installation of Qt4?"
Of course I have, I thought, but I decided to go and double check everywhere. Lo and behold I found some files I'd forgotten about. So then I decided to recompile Qt4 again, and was very glad to see that it worked! A make and sudo make install later, I had Qt4 installed.