Re: How to write an extension for PHP4

From: Date: Wed, 29 Sep 1999 10:13:19 +0000
Subject: Re: How to write an extension for PHP4
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-11378@lists.php.net to get a copy of this message
If you have used the ext_skel script I assume you have a dir under ext/ with the files config.m4, config.h.in and Makefile.am. If you want your extension to be optional (so you can specify with configure whether it should be included), you need to add an AC_ARG_WITH macro to config.m4 (see other extensions for examples). If you want to always include it, just call PHP_EXTENSION(yourext) and add libraries and header files as needed with AC_ADD_INCLUDE and AC_ADD_LIBRARY. Then check Makefile.am to make sure you have all the source files listed. That's it for static extensions. The final step is to go to the top-level dir and run "sh buildconf", and you're ready to configure. - Stig On Tue, 28 Sep 1999, Bruce Fletcher wrote: | I can't figure out how to create a new extension for php (version 4). | | I'm aware of apidoc.txt, and I found the script ext_skel in the ext | directory, but I can't figure out how to include my new extension in | the php build process. I'm running OpenBSD 2.5, with GNU m4 v1.4, | autoconf v2.13, and automake v1.4, but I have no experience with these | utilities; my previous projects have all used hand-built makefiles. | | Any help would be greatly appreciated, as I am currently stalled on my | web project. | | Thanks, | - Bruce | | __________________________________________________ | Do You Yahoo!? | Bid and sell for free at http://auctions.yahoo.com | |

« previous php.dev (#11378) next »