If you are running Redhat, you might want to try to make a rpm file instead of just compiling it.
Download and install the source rpm <name>.src.rpm, then go into /usr/src/RPM/SPECS/ and check out the <name>.spec file to make sure if has all of the options (--with-mysql=/usr/local/mysql --with-apache=../apache-x --enable-track-vars in this case) you want, then just run:
rpm -ba <name>.spec
It will compile it and give you a nice new rpm file (source file too) that you can install on your box, and have it to share/reload/whatever.
Getting a source file means that someone else has already compiled it, so any compile bugs have hopefully been worked out.
Oh, what is the error you're getting, btw?