MFCobol extension is compatible with PECL extension system ( http://pecl.php.net). So the compilation and installation process is really simple.
First, you must have phpize utility in your system. Tipically you can found it in package php5-dev (in most debian based systems).
To compile and install extension type into terminal:
$ tar xzf mfcobol_0.103.0b.tar.gz $ cd MFCobol $ phpize $ ./configure $ make $ sudo make install
Now your extension is installed in php extensions dir. To test extension create a test.php file with this code:
<?php $br = (php_sapi_name() == "cli")? "":"<br>"; if(!extension_loaded('mfcobol')) { dl('mfcobol.' . PHP_SHLIB_SUFFIX); } $module = 'mfcobol'; $functions = get_extension_funcs($module); echo "Functions available in the test extension:$br\n"; foreach($functions as $func) { echo $func."$br\n"; } echo "$br\n"; $function = 'confirm_' . $module . '_compiled'; if (extension_loaded($module)) { $str = $function($module); } else { $str = "Module $module is not compiled into PHP"; } echo "$str\n"; ?>
And type:
$ php -q test.php