Hi!

Following little script does quick conversion of all modules' sources
to new configuration header file for self-contained-extensions (config.h
instead of php_config.h). It is not optimized but does its work fine:
after that all modules that supposed to be compiled in SCE mode, compile
and get loaded into PHP without errors.

#!/bin/bash
PHP4_ROOT=php4
EXTENSIONS=`find $PHP4_ROOT/ext -type d -maxdepth 1 -print`
PWD_X=`pwd`
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
-- History repeats itself only if one does not listen the first time.

-- 
PHP Development 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