It generates files tailoring for the host system – the environment on which the codebase is built and run.
Obtaining a software package as source code and compiling it locally is a common scenario on Unix and Unix-like environments.
[2] These tools query the host system for environment settings, platform architecture, and the existence and location of required build and runtime dependencies.
Before pkg-config gained popularity, separate m4 macros were created to locate files known to be included in the distribution of libraries depended upon.
[3] Since then, an ecosystem of tools have been developed to automate the creation of configure scripts, of which the most common is Autoconf.