pkg-config provides the option of having multiple modules per package. One can check for the existence of a module (% pkg-config --exists libsecp256k1; echo $?
). If secp256k1 provided pkg-config modules for its optional modules like ECDH, one could check conveniently whether libsecp256k1 was built with ECDH, if one requires this.
I can make a patch for this if you think it is a good idea, please provide feedback.
Currently, libsecp256k1 provides just a single module:
0$ pkg-config --print-provides libsecp256k1
1libsecp256k1 = 0.1