[x264-devel] configure: include dependency libs in the Libs pkg-config

Martin Storsjo git at videolan.org
Wed Oct 30 21:18:32 CET 2013


x264 | branch: master | Martin Storsjo <martin at martin.st> | Tue Sep  3 14:56:18 2013 -0700| [a4179405870732e679f42dbf6e37539e5126da15] | committer: Jason Garrett-Glaser

configure: include dependency libs in the Libs pkg-config

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.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=a4179405870732e679f42dbf6e37539e5126da15
---

 configure |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 3d714a5..d35561c 100755
--- 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
 



More information about the x264-devel mailing list