cvs: php-gtk-doc / configure.in

From: Date: Wed, 05 Apr 2006 21:06:41 +0000
Subject: cvs: php-gtk-doc / configure.in
Groups: php.gtk.doc 
Request: Send a blank email to php-gtk-doc+get-2136@lists.php.net to get a copy of this message
sfox Wed Apr 5 21:06:41 2006 UTC Modified files: /php-gtk-doc configure.in Log: - Introducing new configure option --with-php=PATH - Check for the existence of the php-gtk module in the chosen php executable - Also adding Scott's -C switch for all those CGI fans out there http://cvs.php.net/viewcvs.cgi/php-gtk-doc/configure.in?r1=1.31&r2=1.32&diff_format=u Index: php-gtk-doc/configure.in diff -u php-gtk-doc/configure.in:1.31 php-gtk-doc/configure.in:1.32 --- php-gtk-doc/configure.in:1.31 Tue Mar 28 17:08:40 2006 +++ php-gtk-doc/configure.in Wed Apr 5 21:06:41 2006 @@ -14,7 +14,7 @@ # +----------------------------------------------------------------------+ # -# $Id: configure.in,v 1.31 2006/03/28 17:08:40 sfox Exp $ +# $Id: configure.in,v 1.32 2006/04/05 21:06:41 sfox Exp $ AC_INIT([manual/global.ent]) @@ -36,9 +36,26 @@ AC_MSG_ERROR(cannot find xsltproc) fi -AC_PATH_PROG(PHP, php, no) +# need to offer a way to set a PHP path, thanks to PHP-GTK fans +AC_ARG_WITH(php, +[ --with-php=PATH path to PHP binary], +[ +if ! (sh -c "$withval -v" 2>/dev/null | grep PHP >/dev/null); then + AC_MSG_ERROR($withval is not a PHP executable) +fi +PHP=$withval +], +[PHP="no"] +) + +AC_PATH_PROG(PHP, php, $PHP) if [ test "$PHP" = "no" ]; then - AC_MSG_ERROR(unable to locate php executable) + AC_MSG_ERROR(unable to locate PHP executable) +fi + +if (sh -c "$PHP -m" 2>/dev/null | grep gtk >/dev/null); then + AC_MSG_NOTICE($PHP has the php-gtk module loaded) + AC_MSG_ERROR(Please use --with-php=PATH to set an alternative) fi DOCBOOK_DOCTYPE="-//PHP Group//DTD DocBk XML V3.1.7-Based Extension//EN" @@ -130,7 +147,7 @@ $SCRIPT_DIR/genchapterents.php ]) echo creating chapters.ent -$PHP -q $SCRIPT_DIR/genchapterents.php > $MANUAL/chapters.ent +$PHP -q -C $SCRIPT_DIR/genchapterents.php > $MANUAL/chapters.ent echo creating name_to_id.xsl $XSLTPROC $SCRIPT_DIR/gen_name_to_id.xsl $SCRIPT_DIR/manual.xml > $STYLESHEET_DIR/name_to_id.xsl

« previous php.gtk.doc (#2136) next »