diff options
author | anssih <anssih@svn> | 2010-07-12 01:04:17 +0000 |
---|---|---|
committer | anssih <anssih@svn> | 2010-07-12 01:04:17 +0000 |
commit | 1806534ac5d39b9e6d68aef18e74217369eb6292 (patch) | |
tree | 278dec6155605f1ffd7293370ee4d9de6a325d8d /configure.in | |
parent | ac556b4034ea538f4fe06b7a83535dd7608c8acc (diff) |
changed: use pkgconfig to find ffmpeg libs (fixes ticket #9340)
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@31746 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/configure.in b/configure.in index 6b01dbceff..1e07bd5cae 100644 --- a/configure.in +++ b/configure.in @@ -727,11 +727,9 @@ use_librtmp=no;AC_MSG_RESULT($librtmp_not_found)) ### External libraries checks # External FFmpeg if test "$use_external_ffmpeg" = "yes"; then - AC_CHECK_LIB([avcodec], [main],, AC_MSG_ERROR($missing_library)) - AC_CHECK_LIB([avformat], [main],, AC_MSG_ERROR($missing_library)) - AC_CHECK_LIB([avutil], [main],, AC_MSG_ERROR($missing_library)) - AC_CHECK_LIB([postproc], [main],, AC_MSG_ERROR($missing_library)) - AC_CHECK_LIB([swscale], [main],, AC_MSG_ERROR($missing_library)) + PKG_CHECK_MODULES([FFMPEG], [libavcodec libavformat libavutil libpostproc libswscale], + [INCLUDES="$INCLUDES $FFMPEG_CFLAGS"; LIBS="$LIBS $FFMPEG_LIBS"], + AC_MSG_ERROR($missing_library)) # Determine whether AVPacket and relevant functions are defined in libavformat # or libavcodec @@ -740,6 +738,10 @@ if test "$use_external_ffmpeg" = "yes"; then [AC_MSG_NOTICE(== AVPacket and relevant functions defined in libavformat. ==) AC_DEFINE([AVPACKET_IN_AVFORMAT], [1], [Whether AVPacket is in libavformat.])]) + # in case the headers are in a custom directory + SAVE_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $FFMPEG_CFLAGS" + # Possible places the ffmpeg headers may be AC_CHECK_HEADERS([libavcodec/avcodec.h libavformat/avformat.h libavutil/avutil.h libpostproc/postprocess.h libswscale/swscale.h],, [AC_CHECK_HEADERS([ffmpeg/avcodec.h ffmpeg/avformat.h ffmpeg/avutil.h postproc/postprocess.h ffmpeg/swscale.h],, @@ -772,6 +774,7 @@ if test "$use_external_ffmpeg" = "yes"; then [Whether AVUtil defines PIX_FMT_VDPAU_MPEG4.])],) AC_LANG_POP([C++]) fi + CPPFLAGS="$SAVE_CPPFLAGS" else AC_MSG_NOTICE($external_ffmpeg_disabled) USE_EXTERNAL_FFMPEG=0 |