It will depend on the Apache you're running, the libs you have install, and if you're using MySQL or another database. Here's the config string for my Apache 2.2.4 with MySQL as an example (config.nice file actually). The paths will probably need adjusting (such as X11 install base).
Code:
#! /bin/sh
#
# Created by configure
CFLAGS='-pipe -O2 -march=i686 ' \
CXXFLAGS='-pipe -O2 -march=i686 ' \
CC='gcc' \
CXX='g++' \
'./configure' \
'--cache-file=php-build.cache' \
'--prefix=/usr' \
'--sysconfdir=/etc' \
'--sharedstatedir=/var/log' \
'--localstatedir=/var/run' \
'--x-includes=/usr/X11R7/include' \
'--x-libraries=/usr/X11R7/lib' \
'--with-apxs2filter=/usr/bin/apxs' \
'--enable-force-cgi-redirect' \
'--enable-discard-path' \
'--enable-fastcgi' \
'--disable-path-info-check' \
'--disable-debug' \
'--with-config-file-path=/etc' \
'--with-config-file-scan-dir=/etc:/usr/etc:/usr/local/etc' \
'--with-exec-dir=/usr/libexec/php-sm-exec' \
'--enable-sigchild' \
'--enable-magic-quotes' \
'--disable-rpath' \
'--disable-ipv6' \
'--with-libxml-dir=/usr' \
'--with-openssl=/usr' \
'--with-pcre-regex=/usr' \
'--with-zlib' \
'--enable-bcmath' \
'--with-bz2' \
'--enable-calendar' \
'--with-curl' \
'--with-curlwrappers' \
'--enable-dba' \
'--with-gdbm' \
'--with-db4' \
'--with-inifile' \
'--with-flatfile' \
'--enable-dbase' \
'--enable-exif' \
'--enable-ftp' \
'--with-openssl-dir=/usr' \
'--with-gd=/usr/local' \
'--with-jpeg-dir=/usr' \
'--with-png-dir=/usr' \
'--with-zlib-dir=/usr' \
'--with-xpm-dir=/usr/X11R7' \
'--with-ttf=/usr' \
'--with-freetype-dir=/usr' \
'--with-t1lib=/usr' \
'--enable-gd-native-ttf' \
'--enable-gd-jis-conv' \
'--with-gettext=/usr' \
'--with-gmp' \
'--enable-mbstring' \
'--with-libmbfl' \
'--with-mhash' \
'--with-mime-magic=/etc/apache2/magic' \
'--with-mysql=/usr' \
'--with-mysql-sock=/var/run/mysql/mysqlsock' \
'--with-zlib-dir=/usr' \
'--with-ncurses' \
'--enable-pcntl' \
'--with-pspell=/usr' \
'--with-readline=/usr' \
'--enable-shmop' \
'--with-libxml-dir=/usr' \
'--with-snmp=/usr' \
'--with-openssl-dir=/usr' \
'--enable-soap' \
'--with-libxml-dir=/usr' \
'--enable-sockets' \
'--enable-sqlite-utf8' \
'--enable-sysvmsg' \
'--enable-sysvsem' \
'--enable-sysvshm' \
'--with-libxml-dir=/usr' \
'--with-xmlrpc' \
'--with-xmlreader' \
'--with-xsl=/usr' \
'--enable-zip' \
'--with-zlib-dir=/usr' \
'--with-pear=/usr/lib/php' \
'--enable-zend-multibyte' \
'--with-tsrm-pth' \
'--enable-shared' \
'--enable-static' \
'--with-gnu-ld' \
'--with-gnu-ld' \
"$@"
After that, I just make all check install, strip the binaries, chgrp bin them, make a /usr/doc/php-whatever-version-it-is directory, and restart Apache. The install should add the libphp5.so module into Apache's config file.