Re: cvs: php-gtk-doc / Makefile.in configure.in

From: Date: Mon, 27 Mar 2006 17:48:54 +0000
Subject: Re: cvs: php-gtk-doc / Makefile.in configure.in
References: 1 2 3 4  Groups: php.gtk.doc 
Request: Send a blank email to php-gtk-doc+get-2006@lists.php.net to get a copy of this message
Andrei, I think it's fairly obvious I know how to write an argument check. The question is more, why? We don't care about the version, anything this side of 4.0.6 will work fine. Why can't we just dump out if PHP doesn't exist in the environment? Do you want me to write configure path options for every executable in the environment while I'm at it? Why is it suddenly a problem to use AC_PATH_PROG? If something autoconf needs isn't in the path or set as an environment variable, it won't work. Full stop. Didn't before, doesn't now. - Steph and ps, AC_DEFUN means entering the world of macros and introducing yet another build file...
You should "discover" PHP executable the same way that PHP-GTK does. Here's excerpt from config.m4: AC_DEFUN(PHP_WITH_PHP_CONFIG,[ AC_ARG_WITH(php-config, [ --with-php-config=PATH],[ PHP_CONFIG=$withval ],[ PHP_CONFIG=php-config ]) PHP_PREFIX=$PHP_CONFIG --prefix AC_MSG_CHECKING(for PHP executable in $PHP_PREFIX/bin) if test -x $PHP_PREFIX/bin/php; then
    PHP_VERSION=$PHP_CONFIG --version
    AC_MSG_RESULT(found version $PHP_VERSION)
    case $PHP_VERSION in
      4*|5.0*|5.1.0)
        AC_MSG_ERROR([
Could not locate PHP 5.1.1 or higher version executable. Please use the --with-php-config option to specify the location of php-config for the required version.])
        ;;
    esac
    PHP=$PHP_PREFIX/bin/php
else
    AC_MSG_ERROR(Could not locate PHP executable)
fi PHP_SAPI=$PHP --version | sed -n 's/.*(\(...\)).*/\1/p' if test "$PHP_SAPI" != "cli" ; then
    AC_MSG_ERROR(PHP CLI version is required[,] $PHP_SAPI found)
fi On Mar 27, 2006, at 5:10 AM, Steph Fox wrote:
autoconf should just 'find' it... and all the other executables it needs. (I should put in checks for sed, grep and test maybe.) I'm not sure it's a good idea, can you wait til Andrei wakes up and we'll discuss it? ----- Original Message ----- From: "Christian Weiske" <cweiske@cweiske.de> To: "Steph Fox" <steph@zend.com> Cc: <php-gtk-doc@lists.php.net> Sent: Monday, March 27, 2006 3:08 PM Subject: Re: [PHP-GTK-DOC] cvs: php-gtk-doc / Makefile.in configure.in
Steph,
I spent my head in an autoconf manual today. - Introducing --disable-output
Could you add a parameter to specify the php executable location? I have a weird php config here, and "php" itself doesn't link to anything. -- Regards/MfG, Christian Weiske -- PHP-GTK Documentation Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __________ NOD32 1.1380 (20060125) Information __________ This message was checked by NOD32 antivirus system. http://www.eset.com
-- PHP-GTK Documentation Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
__________ NOD32 1.1380 (20060125) Information __________ This message was checked by NOD32 antivirus system. http://www.eset.com


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