# Writing extension: aditional library

- Thread: https://externals.io/message/38166
- Original archive: https://news-web.php.net/php.internals/38166
- Started by Adam Klobukowski on 2008-06-11T19:50:29+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #38166 — Adam Klobukowski — 2008-06-11T19:50:29+00:00

URL: https://externals.io/message/38166#38166

Hi

I'm writing my custom extension, and I want to use library in it.

Atm. I'm just compiling library files statically in extension, but thats 
not very nice.

I've tried to modify config.m4 to include it but even with all other 
extensions, I miserably failed.

This library is simple library in /lib (/lib/libsomething.a). It does 
not have fancy autotools macros and stuff. Plese, help me with including it.

Adam Klobukowski

---

## #38168 — Antony Dovgal — 2008-06-11T20:04:18+00:00

URL: https://externals.io/message/38166#38168 · In reply to: #38166

> Hi
> 
> I'm writing my custom extension, and I want to use library in it.
> 
> Atm. I'm just compiling library files statically in extension, but thats 
> not very nice.
> 
> I've tried to modify config.m4 to include it but even with all other 
> extensions, I miserably failed.
> 
> This library is simple library in /lib (/lib/libsomething.a). It does 
> not have fancy autotools macros and stuff. Plese, help me with including it.

There are tons of PECL extensions wrapping external libraries - pick whichever 
you like most and use as an example.

Btw, pecl-dev@lists.php.net is a special list dedicated to PECL and writing PHP 
extensions, so I guess you might want to use it instead of internals@.

-- 
Wbr, 
Antony Dovgal
