diff options
Diffstat (limited to 'www/mod_php5/scripts/configure.php')
-rw-r--r-- | www/mod_php5/scripts/configure.php | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/www/mod_php5/scripts/configure.php b/www/mod_php5/scripts/configure.php new file mode 100644 index 000000000000..9bf8e6600213 --- /dev/null +++ b/www/mod_php5/scripts/configure.php @@ -0,0 +1,62 @@ +#!/bin/sh + +if [ -f ${CURDIR}/Makefile.inc ]; then + exit +fi + +/usr/bin/dialog --title "PHP configuration options" --clear \ + --checklist "\n\ +Please select desired options:" -1 -1 9 \ +GD "GD library support" ON \ +zlib "zlib library support" ON \ +MySQL "MySQL database support" ON \ +PostgresSQL "PostgresSQL database support" OFF \ +mSQL "mSQL database support" OFF \ +dBase "dBase database support" OFF 2> /tmp/checklist.tmp.$$ + +retval=$? + +if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` +fi +rm -f /tmp/checklist.tmp.$$ + +case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + exit 1 + ;; +esac + +> ${CURDIR}/Makefile.inc + +while [ "$1" ]; do + case $1 in + \"GD\") + echo "BUILD_DEPENDS+= \${PREFIX}/lib/libgd.a:\${PORTSDIR}/graphics/gd" >> ${CURDIR}/Makefile.inc + echo "PHP3_CONF_ARGS+= --with-gd" >> ${CURDIR}/Makefile.inc + ;; + \"zlib\") + echo "PHP3_CONF_ARGS+= --with-zlib" >> ${CURDIR}/Makefile.inc + ;; + \"MySQL\") + echo "BUILD_DEPENDS+= mysql:\${PORTSDIR}/databases/mysql" >> ${CURDIR}/Makefile.inc + echo "PHP3_CONF_ARGS+= --with-mysql=\${PREFIX}" >> ${CURDIR}/Makefile.inc + ;; + \"PostgresSQL\") + echo "BUILD_DEPENDS+= \${PREFIX}/pgsql/bin/psql:\${PORTSDIR}/databases/postgresql" >> ${CURDIR}/Makefile.inc + echo "PHP3_CONF_ARGS+= --with-pgsql=\${PREFIX}/pgsql" >> ${CURDIR}/Makefile.inc + ;; + \"mSQL\") + echo "BUILD_DEPENDS+= msql:\${PORTSDIR}/databases/msql" >> ${CURDIR}/Makefile.inc + echo "PHP3_CONF_ARGS+= --with-msql=\${PREFIX}" >> ${CURDIR}/Makefile.inc + ;; + \"dBase\") + echo "PHP3_CONF_ARGS+= --with-dbase" >> ${CURDIR}/Makefile.inc + ;; + esac + shift +done |