php4-beta | 199912

Re: [PHP4BETA] Shared modules From: Sascha Schumann (sascha <email protected>)
Date: 12/28/99

On Mon, Dec 27, 1999 at 10:13:06AM -0500, rasmus <email protected> wrote:
> > Ok, uploaded. Fixes the special case where LIBTOOL ==
> > SHLIBTOOL and two small Solaris issues.
> >
> > Btw, the deps target is called depend now.
>
> I think the holy grail here is the ability to build a shared extension by
> itself without actually building all of PHP and also being able to build a
> small framework that can be exported to an external package such that an
> extension can be distributed separately and have the ability to build as a
> standalone shared extension outside of the PHP tree. This same external
> package if placed in the PHP source tree in a dir under ext/ should be
> buildable as a static extension. Once we have that along with a somewhat
> complete API reference I think the number of third-party extensions will
> start to explode.

    Ok, the concept goes this way: A module author provides

    - Makefile.in (simple as usual)
    - config.m4 (can access all PHP m4 macros)
    - source files (of course)

    These can be either put into the PHP source tree or can be
    used separately.

    Both scenarios work now. There are still some cosmetical
    issues, but we can clean it up later.

    I've uploaded php4-ng8 which includes the framework for
    building external modules. => http://va.php.net/~sas/php4-ng/

    Sample session:

    Install PHP
    
        $ bunzip2 -c php4-ng8.tar.bz2|tar xf -
        $ cd php4-ng8
        $ ./configure --prefix=/tmp/php
        $ make install
        $ cd ..

    Create sample MySQL module (self-contained)

        $ mkdir mymod
        $ cd mymod
        $ cp ../php4-ng8/ext/mysql/* .
        $ sed 's#\.\./\.\.#.#' <Makefile.in>tmp&&mv tmp Makefile.in
        $ /tmp/php/lib/php/build/pear
   
    You could stop here. The contents of the directory can be
    distributed and can live on their own. To test it:
    
        $ ./configure --with-mysql=shared,/opt/mysql
        $ make shared
        $ ls -l modules
       
    (Insert note about s/shared// and adding install target)
       

-- 

Regards,

Sascha Schumann Consultant

-- PHP 4.0 Beta Mailing List <http://www.php.net/version4/> To unsubscribe, e-mail: php4beta-unsubscribe <email protected> For additional commands, e-mail: php4beta-help <email protected> To contact the list administrators, e-mail: php4beta-admin <email protected>