GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
config

Config: Expand the shared zstd configure macro

AC_ZSTD macro enhanced to support installation prefixes and custom paths.

The AC_ZSTD Autoconf macro has been expanded to better handle zstd detection. It now supports custom installation prefixes, include, and library paths, and prioritizes pkg-config while falling back to compiler searches. The macro also enforces a minimum zstd version of 1.4.0 for usability.

In Details

The AC_ZSTD macro in config/zstd.m4 is enhanced to provide more robust zstd detection. It supports installation prefixes, custom CFLAGS/LIBS, and prioritizes pkg-config. For 'auto' and 'yes' modes, it falls back to compiler searches if pkg-config fails. A minimum version check (>= 1.4.0) is enforced, ensuring a usable zstd installation.

For Context
AC_ZSTD
An Autoconf macro used to detect zstd library presence and export compiler and linker flags.
pkg-config
A helper tool used to provide information about installed libraries in the system, such as compiler and linker flags.
installation prefix
The base directory where software is installed, affecting where libraries and headers are found.
Filed Under: buildzstdconfigure