--- soxr/CMakeLists.txt.orig	2018-10-15 12:15:01.620074074 +0200
+++ soxr/CMakeLists.txt	2018-10-15 12:16:27.269662032 +0200
@@ -126,19 +126,21 @@
   set (WITH_CR64S ${SIMD64_FOUND})
 endif ()
 
+find_package(PkgConfig)
+
 if (WITH_AVFFT)
-  find_package (LibAVCodec REQUIRED)
+  pkg_check_modules(AVCODEC REQUIRED libavcodec)
   if (AVCODEC_FOUND)
     include_directories (${AVCODEC_INCLUDE_DIRS})
-    set (LIBS ${LIBS} ${AVCODEC_LIBRARIES})
+    set (LIBS ${LIBS} ${AVCODEC_LDFLAGS})
   endif ()
 endif ()
 
 if (WITH_AVFFT OR (CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" AND SIMD32_FOUND AND WITH_CR32))
-  find_package (LibAVUtil)
+  pkg_check_modules(AVUTIL REQUIRED libavutil)
   if (AVUTIL_FOUND)
     include_directories (${AVUTIL_INCLUDE_DIRS})
-    set (LIBS ${LIBS} ${AVUTIL_LIBRARIES})
+    set (LIBS ${LIBS} ${AVUTIL_LDFLAGS})
   endif ()
 endif ()
 
