Re: [PHP-DEV] PHP 4.0 Zend API

2001-03-08 Thread Viktors Krebss


Thanks Marc,
It really helped in that sense that it become more obvious what is
happening at
all.
The trouble with zend API examples from zend.com was that somehow they
bring
into configure script \r characters. Pretty dumb reason but sometimes it
can
cause
a lot of troubles. Now I can compile and build dynamic modules , but a
task goes
far
beyond that. My module has to be linked with some external libraries
such as
OpenSSL.
What I need is a static link (I guess). Things like --enable-static or
--disable-shared
does not make any difference somehow.

On the mentioned zend.com I found following:

Note: Compiling and linking manually as a static module into the PHP
binary
involves
very long instructions and thus is not discussed here. (It's not very
efficient
to type all those commands.)
-
Any ideas where such instructions could be found, or how to force
"configure"
make a static module ?
Help appreciated.

Marc Boeren wrote:

 I had a couple of problems as well, but managed it after a while.
 Please read the README.SELF-CONTAINED-EXTENSIONS in the php-folder, as it
 helps.

 In short, create a config.m4 like this

 PHP_ARG_ENABLE(dbx,whether to enable dbx,
 [ --enable-dbxEnable dbx])

 if test "$PHP_DBX" != "no"; then
   PHP_EXTENSION(dbx, $ext_shared)
 fi

 and replace dbx with whatever your module is called.
 Create a Makefile.in like this

 LTLIBRARY_SHARED_NAME = dbx.la
 LTLIBRARY_SOURCES = dbx.c dbx_mysql.c dbx_odbc.c

 include $(top_srcdir)/build/dynlib.mk

 where you include all your c source files.

 I then found that the phpize-script returned an error for some AC_WHATEVER
 thing it couldn't find, so I ran (from my modules src folder)

 phpize
 /usr/local/bin/aclocal
 /usr/local/bin/autoconf
 /usr/local/bin/autoheader
 /usr/local/bin/libtoolize -f -c

 phpize generates this AC_ error, but by running the next four commands (that
 are at the end of phpize) by hand I got it to work...
 Then it's simply

 ./configure --with-php-config=/usr/local/bin/php-config
 make
 make install

 And voila!

 Hope this helps!

 Cheerio, Marc.

--

Viktors Krebss, [EMAIL PROTECTED]
DELFI Interactive, http://www.delfi.lv/
tel: +371-748, mob: +371-9243923, fax: +371-701

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DEV] PHP 4.0 Zend API

2001-03-08 Thread Marc Boeren


My module has to be linked with some external libraries such as
OpenSSL. 
What I need is a static link (I guess). 

Note: Compiling and linking manually as a static module into the PHP binary
involves very long instructions and thus is not discussed here. (It's not
very 
efficient to type all those commands.)

This is for statically compiling your module into php, not for linking
another library (static or dynamic) in your own module. 

Anyway, I don't have a lot of experience with autoconf and automake and
those tools, but perhaps you can check out how e.g. the mysql php-module
(/etc/mysql/) is built, as the libmysqlclient is linked into that. This
sounds like a similar situation to yours...

Cheerio, Marc.

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] PHP 4.0 Zend API

2001-03-08 Thread Sascha Schumann

 Any ideas where such instructions could be found, or how to force
 "configure"
 make a static module ?

We have an extension generator which creates the basic
"infrastructure" for a new extension.  The result can be
build as a static module or as a shared module.

Try php4/ext/ext_skel --help

Also note that we already have support for building against
OpenSSL.  Please see ext/snmp/config.m4 for an example on how
to use that support in your extension.

- Sascha


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]