]> git.sesse.net Git - x264/commitdiff
configure: include dependency libs in the Libs pkg-config
authorMartin Storsjo <martin@martin.st>
Tue, 3 Sep 2013 21:56:18 +0000 (14:56 -0700)
committerFiona Glaser <fiona@x264.com>
Thu, 24 Oct 2013 19:15:58 +0000 (12:15 -0700)
If only a static library is built, the user of the library that just
tries to link to the lib using the flags provided by pkg-config
might not know that only a static lib exists and that he'd have to
pass --static to pkg-config to get the internal dependencies to
be able to link the library.

For a shared build, the internal dependencies are kept in Libs.private
as before.

This matches how libav's pkg-config files are generated.

configure

index 3d714a5febd27c4b2ef3e89d0e7174c81f9f0bff..d35561cfad93311e668d11b79a5886a660f3bba5 100755 (executable)
--- a/configure
+++ b/configure
@@ -1237,8 +1237,8 @@ includedir=$includedir
 Name: x264
 Description: H.264 (MPEG4 AVC) encoder library
 Version: $(grep POINTVER < x264_config.h | sed -e 's/.* "//; s/".*//')
-Libs: -L$libdir -lx264
-Libs.private: $libpthread $libm $libdl
+Libs: -L$libdir -lx264 $([ "$shared" = "yes" ] || echo $libpthread $libm $libdl)
+Libs.private: $([ "$shared" = "yes" ] && echo $libpthread $libm $libdl)
 Cflags: -I$includedir
 EOF