Skip to content

Commit 4bea10d

Browse files
committed
Use PKG_CHECK_MODULES to link libavutil
Without this, when I was building ffms2 and when ffmpeg wasn't installed on the system on ubuntu (in /usr/lib), it was failing to build.
1 parent 6601f8c commit 4bea10d

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ src_index_ffmsindex_SOURCES = src/index/ffmsindex.cpp
5959
if WINDOWS
6060
src_index_ffmsindex_LDFLAGS = -municode
6161
endif
62-
src_index_ffmsindex_LDADD = -lavutil src/core/libffms2.la
62+
src_index_ffmsindex_LDADD = @AVUTIL_LIBS@ src/core/libffms2.la
6363

6464
.PHONY: test test-build test-clean test-sync test-run
6565
clean-local: test-clean

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ pkgconfigdir="\$(libdir)/pkgconfig"
9191
AC_SUBST(pkgconfigdir)
9292

9393
PKG_CHECK_MODULES(FFMPEG, [libavformat >= 61.7.0 libavcodec >= 61.19.0 libswscale >= 8.3.0 libavutil >= 59.39.0 libswresample >= 5.3.0])
94+
PKG_CHECK_MODULES([AVUTIL], [libavutil >= 59.39.0])
9495

9596
dnl As of 0eec06ed8747923faa6a98e474f224d922dc487d ffmpeg only adds -lrt to lavc's
9697
dnl LIBS, but lavu needs it, so move it to the end if it's present

0 commit comments

Comments
 (0)