123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- HOW TO CREATE A SELF-CONTAINED PHP EXTENSION
- A self-contained extension can be distributed independently of
- the PHP source. To create such an extension, two things are
- required:
- - Configuration file (config.m4)
- - Source code for your module
- We will describe now how to create these and how to put things
- together.
- PREPARING YOUR SYSTEM
- While the result will run on any system, a developer's setup needs these
- tools:
- GNU autoconf
- GNU automake
- GNU libtool
- GNU m4
- All of these are available from
- ftp:
- CONVERTING AN EXISTING EXTENSION
- Just to show you how easy it is to create a self-contained
- extension, we will convert an embedded extension into a
- self-contained one. Install PHP and execute the following
- commands.
- $ mkdir /tmp/newext
- $ cd /tmp/newext
- You now have an empty directory. We will copy the files from
- the mysql extension:
- $ cp -rp php-4.0.X/ext/mysql
|