HOWTO compile apache and php on osx
From Chaos
Summary
I've included steps below on how to compile Apache 1.3.33 + mod_php-4.3.9 on OS X 10.3.5. Please note this does not include Apache SSL support. Please also take note that this will install config files to '/etc/apache', and the new binary to '/usr/sbin/apache'.
Details
1. Get the latest distributions of Apache and PHP.
2. Uncompress the Apache source and run the following configure command (copy + paste into your terminal should be safe):
./configure --exec-prefix=/usr \ --localstatedir=/var \ --mandir=/usr/share/man \ --libexecdir=/System/Library/Apache/Modules \ --iconsdir=/System/Library/Apache/Icons \ --includedir=/System/Library/Frameworks/Apache.framework/Versions/1.3/Headers \ --enable-shared=max \ --enable-module=most \ --target=apache
3. Run 'make && make install'.
4. Next, uncompress the PHP 4 source and run configure like so (should be safe to copy + paste to your terminal):
./configure --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/share/man \ --with-xml \ --with-ctype \ --with-curl \ --with-ftp \ --with-gd \ --with-mysql \ --with-openssl \ --with-overload \ --with-pcre \ --with-posix \ --with-pgsql \ --with-session \ --with-tokenizer \ --with-ldap \ --with-zlib \ --with-apxs
5. Run 'make && make install'.
6. That should be it!
