note 1757 deleted from phpdevel by nlopess
| From: | nlopess@php.net | Date: | Mon, 25 Jun 2007 14:05:57 +0000 |
| Subject: | note 1757 deleted from phpdevel by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-127948@lists.php.net to get a copy of this message | ||
Note Submitter: befletch at yahoo dot com
----
Something about the PHP build process is needed here; perhaps an example showing how to make your
own "Hello, World" extension. Since that doesn't exist yet...
<p>
If you want to create an extension, you will need reasonably current versions of the tools m4,
autoconf, libtool, and (I think) automake. All of these are available at ftp://ftp.gnu.org.
<p>
Once these are installed, go into the 'ext' directory of your php install and run the
'ext_skel' script to create your extension directory with some skeleton contents. You
will need to edit at least the config.m4 file, and of course add your own code. Other extensions
are useful models, and the GNU documentation for autoconf is useful for understanding macros used in
config.m4.
<p>
The final step required to insert your code into the PHP build process is to go to the php root
directory and run the 'buildconf' script. You should now find references to your
extension in the 'configure' script, and if you designed your config.m4 to make your
extension conditional, 'configure' should have command-line switches for you.
<p>
After running 'configure', your extension should now be part of PHP's build process.
(You may want to verify that php_config.h has properly set any
'HAVE_<your-extension-here>' macros properly defined.) If this all goes well, you
should be ready to concentrate on the C code for your extension.