On Tue, Mar 13, 2001 at 10:45:45PM +0100, Stig Sæther Bakken wrote:
> This is not different from the way it works in PHP.  The problem is
> that if you have an extension that uses "phpize" to make its own
> configure script etc, and you want to define your own variables there,
> configure will make a file called "php_config.h".  Unless you
> explicitly put "." in your include path in Makefile.in that is not the
> file you get with #include "php_config.h".  That include statement
> will by default read $prefix/include/php/php_config.h.  So to include
> your module's config header file, you must do #include
> "./php_config.h", which is kinda silly.
> 
> This patch renames the _extension local_ config header to "config.h"
> to clear up this confusion.
And extensions themselves should be updated to use config.h after including
php.h, for example, using following script:

#!/bin/bash
PHP4_ROOT=php4
PWD_X=`pwd`
EXTENSIONS=`find $PHP4_ROOT/ext -type d -maxdepth 1 -print`
for i in $EXTENSIONS ; do
    cd $i
    for j in `ls *.c` ; do
        perl -pi -e "s/#include \"php.h\"/#include \"php.h\"\n#include \"config.h\"/" 
$j
    done
    cd $PWD_X
done

-- 
Sincerely yours, Alexander Bokovoy 
  The Midgard Project   | www.midgard-project.org |    Aurora R&D team 
Minsk Linux Users Group |    www.minsk-lug.net    |  www.aurora-linux.com  
    ALT Linux Team      |    www.alt-linux.org    | Architecte Open Source
-- Man invented language to satisfy his deep need to complain.
                -- Lily Tomlin

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to