Can't find system FFMpeg when building 2.2.2 on Ubuntu 18

Apologies, I hadn’t completed the post yet and couldn’t delete it before it was approved. Here’s more information:

I’m attempting to build Audacity 2.2.2 from source, following the instructions here in order to enable mod-script-pipe (which, as far as I can tell, isn’t available for any of the repository versions). I have ffmpeg 3.4.4 installed from the Ubuntu repository (libavcodec.so.57 is located in /usr/lib/x86_64-linux-gnu);

pkg-config --libs libavcodec

returns

-lavcodec



pkg-config --variable pc_path pkg-config

returns

/usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig

so it’s searching in the correct directory, as far as I can tell.