On 9/15/24 12:37 PM, Junio C Hamano wrote: > Looking at configure.ac, pkg-config is not used for any package. > Specifically for curl, it seems that "curl-config --libs" is used. > > Presumably the reason behind the current behaviour is combination of > (1) ./configure is an after-thought in the build infrastructure for > this project, (2) pkg-config was not ubiquitous back when autoconf > support was written for this project, and (3) nobody considered > "upgrading" our use of "curl-config" and our manual detection of > dependency detection for other libraries to just use "pkg-config". > > Patches welcome ;-) As an aside: I am skeptical of this explanation. pkg-config's first git commit in 2005 is an import of a 2001 commit from another version control system (probably GNU Arch -- author "Arch Librarian"). The changelog it includes starts a year earlier, in 2000. Wikipedia agrees, claiming the initial release of pkg-config was in 2000 and citing gtk-devel mailing list discussions from June of that year. git added a configure.ac script 6 years later. Curl itself had installed a .pc file for 7 months at that time, and OpenSSL had installed one for nearly 4 years. But git's configure script looked -- and still looks -- for -lcurl only to set NO_CURL for the Makefile. In 2018, ./configure started using curl-config, in order to set CURL_LDFLAGS. I suppose it was copied by rote from the Makefile, which has less flexibility to try pkg-config and fall back to curl-config. Part 1 of the explanation is valid: ./configure was an after-thought. :) -- Eli Schwartz Gentoo Developer and Meson Build maintainer
Attachment:
OpenPGP_signature.asc
Description: OpenPGP digital signature