Skip to content

config: pkg-config: default to lowercase file.pc

acolinisi requested to merge acolinisi/petsc:MR--config-lowercase-pkgname into master

Prior to this patch, when --with-*-pkg-config directory path is given, configure script looks for pkgname.pc file, where pkgname defaults to the mixed-case package name, e.g. PaStix, unless overridden by a particular package (e.g. eigen3). However, the convention for .pc filenames followed by libraries that do ship them, and by distributions that add .pc files for libraries that don't ship them, is lower case (e.g. pastix.pc). As a result, most of the time, configure script fails to find the library, rendering --with-*-pkg-config useless. This patch changes the default to lowercase.

This patch helps a lot to keep the ebuild package for Gentoo simpler.

In a minor way, this changes prior behavior (potentially breaking the build for someone who created oddly-named .pc files on their system), but it's so minor that I don't think it's worth to change the logic to check both old_filename.pc and new_lowercase_filename.pc.

Merge request reports