Installing zlib

Is there a port or shorthand way of installing the zlib library on FreeBSD? I currently use the following:

wget http://zlib.net/zlib-1.2.5.tar.gz
tar zxf zlib*.gz
cd zlib*\.[0-9]
./configure --libdir=/usr/lib --includedir=/usr/include
make install clean

This is somewhat contrived code and for a library as common as zlib I would guess there is an easier way to install it.

Isn't zlib included in the base system?

I don't have a FreeBSD system available right now, and I'm not certain how to find out officially otherwise, but I noticed these two lines in kernels/generic.mtree of the release notes:

    zlib.ko         size=44040 md5digest=c97349aa57182bfa8af8323d4ddc7d5a
    zlib.ko.symbols size=125040 md5digest=1b4e2145fe9a6f3a0863c518ef4d73ef

I think that mean zlib is included.

See Installing Applications: Packages and Ports and Updating and Upgrading FreeBSD in the FreeBSD handbook.

Hey pludi,

I quickly searched the online list of ports packages and zlib isn't there--which surprised me. That, plus the fact that I did find several packages that require zlib, made me wonder if it's part of the base system.

I think it is.

Thats actually a good point and I will check it on a clean FreeBSD system and get back with any issues.