The first few times I tried building MacVim, it kept linking with the system Python. I wanted it to use my Python 2.7 install. I finally found the right incantation:
./configure --enable-rubyinterp=yes --enable-pythoninterp=dynamic --with-python-config-dir=/usr/local/lib/python2.7/config
--enable-pythoninterp=dynamic was the magic that I needed to make it work.