1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

configure: add LIBDRM to extralibs_avutil

When static linking programs using ffmpeg libraries, if linking against
libavutil, -ldrm is listed before -lavutil. This leads to linking failure
due to undefined reference of drmGetVersion() and drmFreeVersion().
This is why when pkg-config create libavutil.pc doesn't append -ldrm
after -lavutil.

Create LIBDRM=-ldrm in case libdrm is enabled and add $LIBDRM to
extralibs_avutil.

Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
Giulio Benetti 2018-09-11 22:29:32 +02:00 committed by James Almer
parent bc2301429e
commit c50dc77ac7

4
configure vendored
View File

@ -5919,7 +5919,7 @@ enabled libcelt && require libcelt celt/celt.h celt_decode -lcelt0 &&
die "ERROR: libcelt must be installed and version must be >= 0.11.0."; }
enabled libcaca && require_pkg_config libcaca caca caca.h caca_create_canvas
enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 dc1394/dc1394.h dc1394_new
enabled libdrm && require_pkg_config libdrm libdrm xf86drm.h drmGetVersion
enabled libdrm && require_pkg_config libdrm libdrm xf86drm.h drmGetVersion && LIBDRM="-ldrm"
enabled libfdk_aac && { use_pkg_config libfdk_aac fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen ||
{ require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac &&
warn "using libfdk without pkg-config"; } }
@ -7096,7 +7096,7 @@ source_path=${source_path}
LIBPREF=${LIBPREF}
LIBSUF=${LIBSUF}
extralibs_avutil="$LIBRT $LIBM"
extralibs_avutil="$LIBRT $LIBDRM $LIBM"
extralibs_avcodec="$extralibs"
extralibs_avformat="$extralibs"
extralibs_avdevice="$extralibs"