summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-02-05 16:52:26 +0100
committerNicolas George <nicolas.george@normalesup.org>2012-02-23 09:07:15 +0100
commit69a653cac38096299e0746fee95a6556576a34ce (patch)
treed27901344527cbafee4da17b8e1330f01bb59f34 /configure
parentb18c27def898e7499cf36b65b5debc4f303e7e5b (diff)
configure: add lavfi dependencies to .pc files.
lavfi have optional filters that depends on some components: it is necessary to test which one is enabled to set the correct dependencies. Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure36
1 files changed, 35 insertions, 1 deletions
diff --git a/configure b/configure
index 70fc01657c..bf832c2b15 100755
--- a/configure
+++ b/configure
@@ -3423,6 +3423,33 @@ fi
! enabled_any memalign posix_memalign malloc_aligned &&
enabled_any $need_memalign && enable memalign_hack
+# add_dep lib dep
+# -> enable ${lib}_deps_${dep}
+# -> add $dep to ${lib}_deps only once
+add_dep() {
+ lib=$1
+ dep=$2
+ enabled "${lib}_deps_${dep}" && return 0
+ enable "${lib}_deps_${dep}"
+ prepend "${lib}_deps" $dep
+}
+
+# merge deps lib components
+# merge all ${component}_deps into ${lib}_deps and ${lib}_deps_*
+merge_deps() {
+ lib=$1
+ shift
+ for comp in $*; do
+ enabled $comp || continue
+ eval "dep=\"\$${comp}_deps\""
+ for d in $dep; do
+ add_dep $lib $d
+ done
+ done
+}
+
+merge_deps libavfilter $FILTER_LIST
+
echo "install prefix $prefix"
echo "source path $source_path"
echo "C compiler $cc"
@@ -3778,11 +3805,18 @@ Cflags: -I\${includedir}
EOF
}
+libavfilter_pc_deps=""
+enabled libavfilter_deps_avcodec && prepend libavfilter_pc_deps "libavcodec = $LIBAVCODEC_VERSION,"
+enabled libavfilter_deps_avformat && prepend libavfilter_pc_deps "libavformat = $LIBAVFORMAT_VERSION,"
+enabled libavfilter_deps_swscale && prepend libavfilter_pc_deps "libswscale = $LIBSWSCALE_VERSION,"
+enabled libavfilter_deps_swresample && prepend libavfilter_pc_deps "libswresample = $LIBSWRESAMPLE_VERSION,"
+libavfilter_pc_deps=${libavfilter_pc_deps%, }
+
pkgconfig_generate libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION" "$LIBM"
pkgconfig_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "$extralibs" "libavutil = $LIBAVUTIL_VERSION"
pkgconfig_generate libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" "$extralibs" "libavcodec = $LIBAVCODEC_VERSION"
pkgconfig_generate libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" "libavformat = $LIBAVFORMAT_VERSION"
-pkgconfig_generate libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" "$extralibs"
+pkgconfig_generate libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" "$extralibs" "$libavfilter_pc_deps"
pkgconfig_generate libpostproc "FFmpeg postprocessing library" "$LIBPOSTPROC_VERSION" "" "libavutil = $LIBAVUTIL_VERSION"
pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "$LIBM" "libavutil = $LIBAVUTIL_VERSION"
pkgconfig_generate libswresample "FFmpeg audio rescaling library" "$LIBSWRESAMPLE_VERSION" "$LIBM" "libavutil = $LIBAVUTIL_VERSION"