cvs: docweb / acinclude.m4 aclocal.m4 build-ops.in build-ops.php.in configure configure.in
| From: | Sean Coates | Date: | Sun, 28 Nov 2004 23:07:41 +0000 |
| Subject: | cvs: docweb / acinclude.m4 aclocal.m4 build-ops.in build-ops.php.in configure configure.in | ||
| Groups: | php.doc.web | ||
| Request: | Send a blank email to doc-web+get-447@lists.php.net to get a copy of this message | ||
sean Sun Nov 28 18:07:41 2004 EDT
Added files:
/docweb aclocal.m4 acinclude.m4
Modified files:
/docweb build-ops.in build-ops.php.in configure.in configure
Log:
re-worked configure
- new vars: filesdir, www-user, www-group
- generates config.nice
http://cvs.php.net/diff.php/docweb/build-ops.in?r1=1.1&r2=1.2&ty=u Index: docweb/build-ops.in diff -u docweb/build-ops.in:1.1 docweb/build-ops.in:1.2 --- docweb/build-ops.in:1.1 Tue Nov 23 17:53:40 2004 +++ docweb/build-ops.in Sun Nov 28 18:07:38 2004 @@ -6,4 +6,7 @@ SCRIPTSDIR=@SCRIPTSDIR@ SQLDIR=@SQLDIR@ SQLITEDIR=@SQLITEDIR@ +FILESDIR=@FILESDIR@ +WWWUSER=@WWWUSER@ +WWWGROUP=@WWWGROUP@ http://cvs.php.net/diff.php/docweb/build-ops.php.in?r1=1.1&r2=1.2&ty=u Index: docweb/build-ops.php.in diff -u docweb/build-ops.php.in:1.1 docweb/build-ops.php.in:1.2 --- docweb/build-ops.php.in:1.1 Tue Nov 23 17:53:40 2004 +++ docweb/build-ops.php.in Sun Nov 28 18:07:38 2004 @@ -1,5 +1,5 @@ <?php -// $Id: build-ops.php.in,v 1.1 2004/11/23 22:53:40 sean Exp $ +// $Id: build-ops.php.in,v 1.2 2004/11/28 23:07:38 sean Exp $ // autoconf-generated file for docweb define('CRON_DIR', '@CRONDIR@'); @@ -8,5 +8,8 @@ define('SCRIPTS_DIR', '@SCRIPTSDIR@'); define('SQL_DIR', '@SQLDIR@'); define('SQLITE_DIR', '@SQLITEDIR@'); +define('FILES_DIR', '@FILESDIR@'); +define('WWW_USER', '@WWWUSER@'); +define('WWW_GROUP', '@WWWGROUP@'); ?> http://cvs.php.net/diff.php/docweb/configure.in?r1=1.2&r2=1.3&ty=u Index: docweb/configure.in diff -u docweb/configure.in:1.2 docweb/configure.in:1.3 --- docweb/configure.in:1.2 Sun Nov 28 16:21:49 2004 +++ docweb/configure.in Sun Nov 28 18:07:38 2004 @@ -1,8 +1,9 @@ ## A configure script -## $Id: configure.in,v 1.2 2004/11/28 21:21:49 vincent Exp $ +## $Id: configure.in,v 1.3 2004/11/28 23:07:38 sean Exp $ AC_PREREQ(2.13) AC_INIT() +DOCWEB_CONFIG_NICE(config.nice) dnl "stolen" from livedocs: AC_ARG_WITH(php,[ --with-php[=PATH] Look for PHP executable needed for docweb scripts], @@ -68,6 +69,19 @@ [SQLITEDIR="$withval"], [SQLITEDIR="`pwd`/sqlite/"]) +AC_ARG_WITH(files-dir,[ --with-files-dir[=DIR] 'files' location (for RFC, etc) [default=`pwd`/files]], + [FILESDIR="$withval"], + [FILESDIR="`pwd`/files/"]) + + +AC_ARG_WITH(www-user,[ --with-www-user[=USER] Web Server user [default=`whoami`]], + [WWWUSER="$withval"], + [WWWUSER="`whoami`"]) + +AC_ARG_WITH(www-group,[ --with-www-group[=GROUP] Web Server group [default=`groups | cut -d" " -f1`]], + [WWWGROUP="$withval"], + [WWWGROUP="`groups | cut -d" " -f1`"]) + DOCWEB=`pwd` AC_SUBST(CRONDIR) @@ -76,6 +90,9 @@ AC_SUBST(SCRIPTSDIR) AC_SUBST(SQLDIR) AC_SUBST(SQLITEDIR) +AC_SUBST(FILESDIR) +AC_SUBST(WWWUSER) +AC_SUBST(WWWGROUP) AC_OUTPUT(build-ops.php build-ops) http://cvs.php.net/diff.php/docweb/configure?r1=1.1&r2=1.2&ty=u Index: docweb/configure diff -u docweb/configure:1.1 docweb/configure:1.2 --- docweb/configure:1.1 Thu Nov 25 12:02:28 2004 +++ docweb/configure Sun Nov 28 18:07:38 2004 @@ -23,6 +23,12 @@ --with-sql-dir[=DIR] SQL source location [default=`pwd`/sql]" ac_help="$ac_help --with-sqlite-dir[=DIR] SQLite repository location [default=`pwd`/sqlite]" +ac_help="$ac_help + --with-files-dir[=DIR] 'files' location (for RFC, etc) [default=`pwd`/files]" +ac_help="$ac_help + --with-www-user[=USER] Web Server user [default=`whoami`]" +ac_help="$ac_help + --with-www-group[=GROUP] Web Server group [default=`groups | cut -d" " -f1`]" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -534,13 +540,36 @@ + test -f config.nice && mv config.nice config.nice.old + rm -f config.nice.old + cat >config.nice<<EOF +#! /bin/sh +# +# Created by configure + +EOF + + for var in CFLAGS CXXFLAGS CPPFLAGS LDFLAGS LIBS CC CXX; do + eval val=\$$var + if test -n "$val"; then + echo "$var='$val' \\" >> config.nice + fi + done + + for arg in $0 "$@"; do + echo "'$arg' \\" >> config.nice + done + echo '"$@"' >> config.nice + chmod +x config.nice + + # Check whether --with-php or --without-php was given. if test "${with_php+set}" = set; then withval="$with_php" if test $withval != "yes"; then echo $ac_n "checking for php""... $ac_c" 1>&6 -echo "configure:544: checking for php" >&5 +echo "configure:573: checking for php" >&5 if test -x $withval; then PHP=$withval echo "$ac_t""$PHP" 1>&6 @@ -552,14 +581,14 @@ else if test -e ../phpdoc-tools/php.bat ; then echo $ac_n "checking for php""... $ac_c" 1>&6 -echo "configure:556: checking for php" >&5 +echo "configure:585: checking for php" >&5 PHP=../phpdoc-tools/php.bat echo "$ac_t""$PHP" 1>&6 else # Extract the first word of ""php"", so it can be a program name with args. set dummy "php"; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:563: checking for $ac_word" >&5 +echo "configure:592: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PHP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -596,7 +625,7 @@ # Extract the first word of ""php4"", so it can be a program name with args. set dummy "php4"; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:600: checking for $ac_word" >&5 +echo "configure:629: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PHP4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -638,14 +667,14 @@ if test -e ../phpdoc-tools/php.bat ; then echo $ac_n "checking for php""... $ac_c" 1>&6 -echo "configure:642: checking for php" >&5 +echo "configure:671: checking for php" >&5 PHP=../phpdoc-tools/php.bat echo "$ac_t""$PHP" 1>&6 else # Extract the first word of ""php"", so it can be a program name with args. set dummy "php"; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:649: checking for $ac_word" >&5 +echo "configure:678: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PHP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -682,7 +711,7 @@ # Extract the first word of ""php4"", so it can be a program name with args. set dummy "php4"; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:686: checking for $ac_word" >&5 +echo "configure:715: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PHP4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -731,7 +760,7 @@ withval="$with_cron_dir" CRONDIR="$withval" else - CRONDIR="`pwd`/cron" + CRONDIR="`pwd`/cron/" fi @@ -740,7 +769,7 @@ withval="$with_cvs_dir" CVSDIR="$withval" else - CVSDIR="`pwd`/cvs" + CVSDIR="`pwd`/cvs/" fi @@ -749,7 +778,7 @@ withval="$with_scripts_dir" SCRIPTSDIR="$withval" else - SCRIPTSDIR="`pwd`/scripts" + SCRIPTSDIR="`pwd`/scripts/" fi @@ -758,7 +787,7 @@ withval="$with_sql_dir" SQLDIR="$withval" else - SQLDIR="`pwd`/sql" + SQLDIR="`pwd`/sql/" fi @@ -767,7 +796,35 @@ withval="$with_sqlite_dir" SQLITEDIR="$withval" else - SQLITEDIR="`pwd`/sqlite" + SQLITEDIR="`pwd`/sqlite/" +fi + + +# Check whether --with-files-dir or --without-files-dir was given. +if test "${with_files_dir+set}" = set; then + withval="$with_files_dir" + FILESDIR="$withval" +else + FILESDIR="`pwd`/files/" +fi + + + +# Check whether --with-www-user or --without-www-user was given. +if test "${with_www_user+set}" = set; then + withval="$with_www_user" + WWWUSER="$withval" +else + WWWUSER="`whoami`" +fi + + +# Check whether --with-www-group or --without-www-group was given. +if test "${with_www_group+set}" = set; then + withval="$with_www_group" + WWWGROUP="$withval" +else + WWWGROUP="`groups | cut -d" " -f1`" fi @@ -780,6 +837,9 @@ + + + trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure @@ -932,6 +992,9 @@ s%@SCRIPTSDIR@%$SCRIPTSDIR%g s%@SQLDIR@%$SQLDIR%g s%@SQLITEDIR@%$SQLITEDIR%g +s%@FILESDIR@%$FILESDIR%g +s%@WWWUSER@%$WWWUSER%g +s%@WWWGROUP@%$WWWGROUP%g CEOF EOF http://cvs.php.net/co.php/docweb/aclocal.m4?r=1.1&p=1 Index: docweb/aclocal.m4 +++ docweb/aclocal.m4 dnl aclocal.m4 generated automatically by aclocal 1.4-p4 dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A dnl PARTICULAR PURPOSE. dnl ripped from php-src: AC_DEFUN([DOCWEB_CONFIG_NICE],[ test -f $1 && mv $1 $1.old rm -f $1.old cat >$1<<EOF #! /bin/sh # # Created by configure EOF for var in CFLAGS CXXFLAGS CPPFLAGS LDFLAGS LIBS CC CXX; do eval val=\$$var if test -n "$val"; then echo "$var='$val' \\" >> $1 fi done for arg in [$]0 "[$]@"; do echo "'[$]arg' \\" >> $1 done echo '"[$]@"' >> $1 chmod +x $1 ]) http://cvs.php.net/co.php/docweb/acinclude.m4?r=1.1&p=1 Index: docweb/acinclude.m4 +++ docweb/acinclude.m4 dnl ripped from php-src: AC_DEFUN([DOCWEB_CONFIG_NICE],[ test -f $1 && mv $1 $1.old rm -f $1.old cat >$1<<EOF #! /bin/sh # # Created by configure EOF for var in CFLAGS CXXFLAGS CPPFLAGS LDFLAGS LIBS CC CXX; do eval val=\$$var if test -n "$val"; then echo "$var='$val' \\" >> $1 fi done for arg in [$]0 "[$]@"; do echo "'[$]arg' \\" >> $1 done echo '"[$]@"' >> $1 chmod +x $1 ])
http://cvs.php.net/diff.php/docweb/build-ops.in?r1=1.1&r2=1.2&ty=u Index: docweb/build-ops.in diff -u docweb/build-ops.in:1.1 docweb/build-ops.in:1.2 --- docweb/build-ops.in:1.1 Tue Nov 23 17:53:40 2004 +++ docweb/build-ops.in Sun Nov 28 18:07:38 2004 @@ -6,4 +6,7 @@ SCRIPTSDIR=@SCRIPTSDIR@ SQLDIR=@SQLDIR@ SQLITEDIR=@SQLITEDIR@ +FILESDIR=@FILESDIR@ +WWWUSER=@WWWUSER@ +WWWGROUP=@WWWGROUP@ http://cvs.php.net/diff.php/docweb/build-ops.php.in?r1=1.1&r2=1.2&ty=u Index: docweb/build-ops.php.in diff -u docweb/build-ops.php.in:1.1 docweb/build-ops.php.in:1.2 --- docweb/build-ops.php.in:1.1 Tue Nov 23 17:53:40 2004 +++ docweb/build-ops.php.in Sun Nov 28 18:07:38 2004 @@ -1,5 +1,5 @@ <?php -// $Id: build-ops.php.in,v 1.1 2004/11/23 22:53:40 sean Exp $ +// $Id: build-ops.php.in,v 1.2 2004/11/28 23:07:38 sean Exp $ // autoconf-generated file for docweb define('CRON_DIR', '@CRONDIR@'); @@ -8,5 +8,8 @@ define('SCRIPTS_DIR', '@SCRIPTSDIR@'); define('SQL_DIR', '@SQLDIR@'); define('SQLITE_DIR', '@SQLITEDIR@'); +define('FILES_DIR', '@FILESDIR@'); +define('WWW_USER', '@WWWUSER@'); +define('WWW_GROUP', '@WWWGROUP@'); ?> http://cvs.php.net/diff.php/docweb/configure.in?r1=1.2&r2=1.3&ty=u Index: docweb/configure.in diff -u docweb/configure.in:1.2 docweb/configure.in:1.3 --- docweb/configure.in:1.2 Sun Nov 28 16:21:49 2004 +++ docweb/configure.in Sun Nov 28 18:07:38 2004 @@ -1,8 +1,9 @@ ## A configure script -## $Id: configure.in,v 1.2 2004/11/28 21:21:49 vincent Exp $ +## $Id: configure.in,v 1.3 2004/11/28 23:07:38 sean Exp $ AC_PREREQ(2.13) AC_INIT() +DOCWEB_CONFIG_NICE(config.nice) dnl "stolen" from livedocs: AC_ARG_WITH(php,[ --with-php[=PATH] Look for PHP executable needed for docweb scripts], @@ -68,6 +69,19 @@ [SQLITEDIR="$withval"], [SQLITEDIR="`pwd`/sqlite/"]) +AC_ARG_WITH(files-dir,[ --with-files-dir[=DIR] 'files' location (for RFC, etc) [default=`pwd`/files]], + [FILESDIR="$withval"], + [FILESDIR="`pwd`/files/"]) + + +AC_ARG_WITH(www-user,[ --with-www-user[=USER] Web Server user [default=`whoami`]], + [WWWUSER="$withval"], + [WWWUSER="`whoami`"]) + +AC_ARG_WITH(www-group,[ --with-www-group[=GROUP] Web Server group [default=`groups | cut -d" " -f1`]], + [WWWGROUP="$withval"], + [WWWGROUP="`groups | cut -d" " -f1`"]) + DOCWEB=`pwd` AC_SUBST(CRONDIR) @@ -76,6 +90,9 @@ AC_SUBST(SCRIPTSDIR) AC_SUBST(SQLDIR) AC_SUBST(SQLITEDIR) +AC_SUBST(FILESDIR) +AC_SUBST(WWWUSER) +AC_SUBST(WWWGROUP) AC_OUTPUT(build-ops.php build-ops) http://cvs.php.net/diff.php/docweb/configure?r1=1.1&r2=1.2&ty=u Index: docweb/configure diff -u docweb/configure:1.1 docweb/configure:1.2 --- docweb/configure:1.1 Thu Nov 25 12:02:28 2004 +++ docweb/configure Sun Nov 28 18:07:38 2004 @@ -23,6 +23,12 @@ --with-sql-dir[=DIR] SQL source location [default=`pwd`/sql]" ac_help="$ac_help --with-sqlite-dir[=DIR] SQLite repository location [default=`pwd`/sqlite]" +ac_help="$ac_help + --with-files-dir[=DIR] 'files' location (for RFC, etc) [default=`pwd`/files]" +ac_help="$ac_help + --with-www-user[=USER] Web Server user [default=`whoami`]" +ac_help="$ac_help + --with-www-group[=GROUP] Web Server group [default=`groups | cut -d" " -f1`]" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -534,13 +540,36 @@ + test -f config.nice && mv config.nice config.nice.old + rm -f config.nice.old + cat >config.nice<<EOF +#! /bin/sh +# +# Created by configure + +EOF + + for var in CFLAGS CXXFLAGS CPPFLAGS LDFLAGS LIBS CC CXX; do + eval val=\$$var + if test -n "$val"; then + echo "$var='$val' \\" >> config.nice + fi + done + + for arg in $0 "$@"; do + echo "'$arg' \\" >> config.nice + done + echo '"$@"' >> config.nice + chmod +x config.nice + + # Check whether --with-php or --without-php was given. if test "${with_php+set}" = set; then withval="$with_php" if test $withval != "yes"; then echo $ac_n "checking for php""... $ac_c" 1>&6 -echo "configure:544: checking for php" >&5 +echo "configure:573: checking for php" >&5 if test -x $withval; then PHP=$withval echo "$ac_t""$PHP" 1>&6 @@ -552,14 +581,14 @@ else if test -e ../phpdoc-tools/php.bat ; then echo $ac_n "checking for php""... $ac_c" 1>&6 -echo "configure:556: checking for php" >&5 +echo "configure:585: checking for php" >&5 PHP=../phpdoc-tools/php.bat echo "$ac_t""$PHP" 1>&6 else # Extract the first word of ""php"", so it can be a program name with args. set dummy "php"; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:563: checking for $ac_word" >&5 +echo "configure:592: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PHP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -596,7 +625,7 @@ # Extract the first word of ""php4"", so it can be a program name with args. set dummy "php4"; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:600: checking for $ac_word" >&5 +echo "configure:629: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PHP4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -638,14 +667,14 @@ if test -e ../phpdoc-tools/php.bat ; then echo $ac_n "checking for php""... $ac_c" 1>&6 -echo "configure:642: checking for php" >&5 +echo "configure:671: checking for php" >&5 PHP=../phpdoc-tools/php.bat echo "$ac_t""$PHP" 1>&6 else # Extract the first word of ""php"", so it can be a program name with args. set dummy "php"; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:649: checking for $ac_word" >&5 +echo "configure:678: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PHP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -682,7 +711,7 @@ # Extract the first word of ""php4"", so it can be a program name with args. set dummy "php4"; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:686: checking for $ac_word" >&5 +echo "configure:715: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PHP4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -731,7 +760,7 @@ withval="$with_cron_dir" CRONDIR="$withval" else - CRONDIR="`pwd`/cron" + CRONDIR="`pwd`/cron/" fi @@ -740,7 +769,7 @@ withval="$with_cvs_dir" CVSDIR="$withval" else - CVSDIR="`pwd`/cvs" + CVSDIR="`pwd`/cvs/" fi @@ -749,7 +778,7 @@ withval="$with_scripts_dir" SCRIPTSDIR="$withval" else - SCRIPTSDIR="`pwd`/scripts" + SCRIPTSDIR="`pwd`/scripts/" fi @@ -758,7 +787,7 @@ withval="$with_sql_dir" SQLDIR="$withval" else - SQLDIR="`pwd`/sql" + SQLDIR="`pwd`/sql/" fi @@ -767,7 +796,35 @@ withval="$with_sqlite_dir" SQLITEDIR="$withval" else - SQLITEDIR="`pwd`/sqlite" + SQLITEDIR="`pwd`/sqlite/" +fi + + +# Check whether --with-files-dir or --without-files-dir was given. +if test "${with_files_dir+set}" = set; then + withval="$with_files_dir" + FILESDIR="$withval" +else + FILESDIR="`pwd`/files/" +fi + + + +# Check whether --with-www-user or --without-www-user was given. +if test "${with_www_user+set}" = set; then + withval="$with_www_user" + WWWUSER="$withval" +else + WWWUSER="`whoami`" +fi + + +# Check whether --with-www-group or --without-www-group was given. +if test "${with_www_group+set}" = set; then + withval="$with_www_group" + WWWGROUP="$withval" +else + WWWGROUP="`groups | cut -d" " -f1`" fi @@ -780,6 +837,9 @@ + + + trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure @@ -932,6 +992,9 @@ s%@SCRIPTSDIR@%$SCRIPTSDIR%g s%@SQLDIR@%$SQLDIR%g s%@SQLITEDIR@%$SQLITEDIR%g +s%@FILESDIR@%$FILESDIR%g +s%@WWWUSER@%$WWWUSER%g +s%@WWWGROUP@%$WWWGROUP%g CEOF EOF http://cvs.php.net/co.php/docweb/aclocal.m4?r=1.1&p=1 Index: docweb/aclocal.m4 +++ docweb/aclocal.m4 dnl aclocal.m4 generated automatically by aclocal 1.4-p4 dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A dnl PARTICULAR PURPOSE. dnl ripped from php-src: AC_DEFUN([DOCWEB_CONFIG_NICE],[ test -f $1 && mv $1 $1.old rm -f $1.old cat >$1<<EOF #! /bin/sh # # Created by configure EOF for var in CFLAGS CXXFLAGS CPPFLAGS LDFLAGS LIBS CC CXX; do eval val=\$$var if test -n "$val"; then echo "$var='$val' \\" >> $1 fi done for arg in [$]0 "[$]@"; do echo "'[$]arg' \\" >> $1 done echo '"[$]@"' >> $1 chmod +x $1 ]) http://cvs.php.net/co.php/docweb/acinclude.m4?r=1.1&p=1 Index: docweb/acinclude.m4 +++ docweb/acinclude.m4 dnl ripped from php-src: AC_DEFUN([DOCWEB_CONFIG_NICE],[ test -f $1 && mv $1 $1.old rm -f $1.old cat >$1<<EOF #! /bin/sh # # Created by configure EOF for var in CFLAGS CXXFLAGS CPPFLAGS LDFLAGS LIBS CC CXX; do eval val=\$$var if test -n "$val"; then echo "$var='$val' \\" >> $1 fi done for arg in [$]0 "[$]@"; do echo "'[$]arg' \\" >> $1 done echo '"[$]@"' >> $1 chmod +x $1 ])