# zlib compile

- Thread: https://externals.io/message/49953
- Original archive: https://news-web.php.net/php.internals/49953
- Started by lonnyk@gmail.com on 2010-10-21T15:09:39+00:00
- Messages: 4
- 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

---

## #49953 — lonnyk@gmail.com — 2010-10-21T15:09:39+00:00

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

PHP 5.2.14

Docs say to compile w/ zlib you need to use the --with-zlib[=DIR] flag.

This does not work. You need to use --with-zlib --with-zlib-dir=[DIR]

Is this a documentation error or a ./configure error?

---

## #49956 — Enrico Weigelt — 2010-10-22T04:57:39+00:00

URL: https://externals.io/message/49953#49956 · In reply to: #49953

* lonnyk@gmail.com <lonnyk@gmail.com> wrote:
> PHP 5.2.14
> 
> Docs say to compile w/ zlib you need to use the --with-zlib[=DIR] flag.
> 
> This does not work. You need to use --with-zlib --with-zlib-dir=[DIR]
> 
> Is this a documentation error or a ./configure error?

BTW: recent zlib provides an proper pkg-config descriptor, which
should be used.


cu
-- 
----------------------------------------------------------------------
 Enrico Weigelt, metux IT service -- http://www.metux.de/

 phone:  +49 36207 519931  email: weigelt@metux.de
 mobile: +49 151 27565287  icq:   210169427         skype: nekrad666
----------------------------------------------------------------------
 Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme

---

## #49969 — Enrico Weigelt — 2010-10-26T00:11:51+00:00

URL: https://externals.io/message/49953#49969

* Lonny K <lonnyk@gmail.com> wrote:
> > […]
> 
> I do not understand how to use this to have it compile correctly with
> --with-zlib[=DIR]
> Can you please elaborate?

configure.ac has to be changed properly. it's a bit tricky, since
the zlib importing code is distributed over many places ...


cu
-- 
----------------------------------------------------------------------
 Enrico Weigelt, metux IT service -- http://www.metux.de/

 phone:  +49 36207 519931  email: weigelt@metux.de
 mobile: +49 151 27565287  icq:   210169427         skype: nekrad666
----------------------------------------------------------------------
 Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme

---

## #49970 — Antony Dovgal — 2010-10-26T07:58:42+00:00

URL: https://externals.io/message/49953#49970 · In reply to: #49953

> PHP 5.2.14
> 
> Docs say to compile w/ zlib you need to use the --with-zlib[=DIR] flag.
> 
> This does not work. You need to use --with-zlib --with-zlib-dir=[DIR]

No, you don't have to use it, --with-zlib works just fine:

# ./configure --with-zlib=/no/zlib/there
...
checking for OpenSSL support... no
checking for Kerberos support... no
checking for PCRE support... no
checking for ZLIB support... yes
checking if the location of ZLIB install directory is defined... no
configure: error: Cannot find libz

You can open ext/zlib/config0.m4 and check the logic behind both options.

-- 
Wbr,
Antony Dovgal
---
http://pinba.org - realtime statistics for PHP
