diff options
| author | Xavier Del Campo Romero <xavi92@disroot.org> | 2026-02-12 22:51:53 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi92@disroot.org> | 2026-02-13 07:55:08 +0100 |
| commit | d45666cc5bc7fb325f38e139032b799bd942ec7b (patch) | |
| tree | 0688869d2ea37a5b7f59f277c861df435069f560 | |
| parent | b93ad6183ee5479178296ff9ec2db23774e6db03 (diff) | |
configure: Test zlib
Otherwise, compilation could fail because zlib's header files and/or
library cannot be found on the system.
Additionally, since fdzipstream depends on zlib, zlib's ldflags must be
appended to those from fdzipstream, rather than hardcoding -lz.
| -rwxr-xr-x | configure | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -107,7 +107,16 @@ else echo "Info: fdzipstream not found. Using in-tree copy" >&2 in_tree_fdzipstream=1 CFLAGS="$CFLAGS -Ifdzipstream/fdzipstream" - LDFLAGS="$LDFLAGS -Lfdzipstream -lfdzipstream -lz" + LDFLAGS="$LDFLAGS -Lfdzipstream -lfdzipstream" +fi + +if pkg-config zlib +then + CFLAGS="$CFLAGS $(pkg-config --cflags zlib)" + LDFLAGS="$LDFLAGS $(pkg-config --libs zlib)" +else + echo "Error: zlib not found." >&2 + exit 1 fi cleanup() |
