summaryrefslogtreecommitdiff
path: root/README.SELF-CONTAINED-EXTENSIONS
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2000-05-22 22:33:51 +0000
committerSascha Schumann <sas@php.net>2000-05-22 22:33:51 +0000
commit8a3edf2cab84dacf4d87a4c01876bd78c4d81b71 (patch)
tree4b6157bed283ff49fd457b4b62855d4c478de2be /README.SELF-CONTAINED-EXTENSIONS
parentbd29009c311c764132535758d431519a89bd8501 (diff)
downloadphp-git-8a3edf2cab84dacf4d87a4c01876bd78c4d81b71.tar.gz
Add section about adding shared module support to an existing module.
Diffstat (limited to 'README.SELF-CONTAINED-EXTENSIONS')
-rw-r--r--README.SELF-CONTAINED-EXTENSIONS24
1 files changed, 23 insertions, 1 deletions
diff --git a/README.SELF-CONTAINED-EXTENSIONS b/README.SELF-CONTAINED-EXTENSIONS
index 9098e40af6..120e1b269c 100644
--- a/README.SELF-CONTAINED-EXTENSIONS
+++ b/README.SELF-CONTAINED-EXTENSIONS
@@ -126,4 +126,26 @@ INSTALLING A SELF-CONTAINED EXTENSION
$ ./configure \
[--with-php-config=/path/to/php-config]
$ make install
-
+
+ADDING SHARED MODULE SUPPORT TO A MODULE
+
+ In order to be useful, a self-contained extension must be loadable
+ as a shared module. I will explain now how you can shared module support
+ to an existing module called foo.
+
+ 1. In config.m4, use PHP_ARG_WITH/PHP_ARG_ENABLE. Then you will
+ automatically be able to use --with-foo=shared or
+ --enable-foo=shared.
+
+ 2. In config.m4, use PHP_EXTENSION(foo, $ext_shared) to enable
+ building the extension.
+
+ 3. Add the following line to Makefile.in:
+
+ LTLIBRARY_SHARED_NAME = foo.la
+
+ 4. Add the following lines to your C source file:
+
+ #if defined(COMPILE_DL) || defined(COMPILE_DL_FOO)
+ ZEND_GET_MODULE(foo)
+ #endif