The pkgconfig tool determines compilation options. For each required library, it reads the configuration file and outputs the necessary compiler and linker flags.