configure: Support --with-zstd=PATH
Adds support to the configure scripts for specifying a custom path for zstd library installation.
This patch updates the configure scripts to allow users to specify a PATH for the zstd library using the —with-zstd=PATH option. It ensures that the specified zstd version is 1.4.0 or newer and includes necessary changes in various binutils sub-projects’ configure scripts and Makefiles. This addresses the issue where the path provided to —with-zstd was not being utilized, unlike in GCC.
In Details
This patch enhances the configure scripts across several binutils components (bfd, gas, gdb, gold, ld) to correctly interpret the PATH argument for the --with-zstd option. Previously, the provided path was ignored, causing the build system to fall back to system defaults or fail if zstd was not in a standard location. This change aligns binutils' behavior with GCC's handling of this option, ensuring that zstd libraries and headers from a specified prefix are used.
- configure
- A build script that automatically adapts software to a specific operating system or environment by checking for necessary components and setting up build parameters.
- zstd
- A fast lossless compression algorithm, often used for compressing data streams or files. In this context, it's used for compressing debug sections.
- PATH
- In this context, it refers to a file system path specifying the directory where the zstd library and its headers are installed.
- Makefile.am
- A file used by Automake to generate Makefiles, defining build rules and dependencies.
- Makefile.in
- A template file used by the configure script to generate a Makefile.