[FFmpeg-devel] build: add global extralibs to pkg-config file generation

Submitted by James Almer on Oct. 14, 2017, 4:55 p.m.

Details

Message ID 20171014165514.360-1-jamrial@gmail.com
State New
Headers show

Commit Message

James Almer Oct. 14, 2017, 4:55 p.m.
Dependencies like libm and pthreads are now global again, so handle
that while generating our pkg-config files.

Signed-off-by: James Almer <jamrial@gmail.com>
---
The pkg-config file generation nonetheless needs some more thought.
Much like how we're dealing with external libs not properly listing
all their dependencies for static builds, it's likely we're also
doing something wrong in that regard.

 configure                     | 1 +
 ffbuild/pkgconfig_generate.sh | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/configure b/configure
index 09f8ed305b..56e9b906f8 100755
--- a/configure
+++ b/configure
@@ -7158,6 +7158,7 @@  rpath=$(enabled rpath && echo "-Wl,-rpath,\${libdir}")
 source_path=${source_path}
 LIBPREF=${LIBPREF}
 LIBSUF=${LIBSUF}
+extralibs="$extralibs"
 extralibs_avutil="$avutil_extralibs"
 extralibs_avcodec="$avcodec_extralibs"
 extralibs_avformat="$avformat_extralibs"
diff --git a/ffbuild/pkgconfig_generate.sh b/ffbuild/pkgconfig_generate.sh
index e5de6716d2..ed1cbb3635 100755
--- a/ffbuild/pkgconfig_generate.sh
+++ b/ffbuild/pkgconfig_generate.sh
@@ -12,7 +12,7 @@  shortname=$1
 name=lib${shortname}
 fullname=${name}${build_suffix}
 comment=$2
-libs=$(eval echo \$extralibs_${shortname})
+libs=$(eval echo \$extralibs_${shortname} \$extralibs)
 deps=$(eval echo \$${shortname}_deps)
 
 for dep in $deps; do