7

I installed a library via apt but it added no .pc file to the pkg-config dir. When I built another manually it got added. Is there a convention for libs automatically creating a .pc file and if so when and how is it done?

user1561108
  • 1,041
  • 2
  • 14
  • 26

2 Answers2

8

Like .so symlinks and .h header files, the .pc files are not be shipped in libXXX debian packages, but in the accompanying libXXX-dev packages as they are only useful when developing against that library.

Dennis Kaarsemaker
  • 8,420
  • 3
  • 29
  • 31
1

Yes you should always do that.

For users who use your library, pkg-config --libs --cflags libmtp is always easier than appending these flags manually, and they don't need to guess the dependency of your library.

And I don't think there's a way automating it.

daisy
  • 53,527
  • 78
  • 236
  • 383