[vlc-devel] [PATCH] Check libavcodec and libavutil for existence of struct and function when enabling vdpau
Maarten Vergouwe
mvergouwe at telenet.be
Tue Apr 2 11:26:06 CEST 2013
---
configure.ac | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/configure.ac b/configure.ac
index 6b44139..4d0841d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3037,16 +3037,19 @@ dnl AM_CONDITIONAL([HAVE_VDPAU], [test "${have_vdpau}" = "yes"])
have_avcodec_vdpau="no"
AS_IF([test "${have_vdpau}" = "yes"], [
- PKG_CHECK_EXISTS([libavutil >= 0.52.4 libavcodec >= 54.36.0], [
- have_avcodec_vdpau="yes"
+ AC_CHECK_DECL(av_freep, [
+ AC_CHECK_MEMBER( [struct AVVDPAUContext.decoder], [ have_avcodec_vdpau="yes" ], [], [[#include <libavcodec/vdpau.h>]])
+ ], [], [[#include <libavutil/mem.h>]])
+])
+
+AS_IF([test "${have_avcodec_vdpau}" = "no"], [
+ AS_IF([test -n "${enable_vdpau}"], [
+ AC_MSG_ERROR([libavutil >= 0.52.4 (with av_freep) and libavcodec >= 54.87.0 (with struct AVVDPAUContext) are required for VDPAU decoding.])
], [
- AS_IF([test -n "${enable_vdpau}"], [
- AC_MSG_ERROR([libavutil >= 0.52.4 and libavcodec >= 54.36.0 are required for VDPAU decoding.])
- ], [
- AC_MSG_WARN([libavutil >= 0.52.4 and libavcodec >= 54.36.0 are required for VDPAU decoding.])
- ])
+ AC_MSG_WARN([libavutil >= 0.52.4 (with av_freep) and libavcodec >= 54.87.0 (with struct AVVDPAUContext) are required for VDPAU decoding.])
])
])
+
AM_CONDITIONAL([HAVE_AVCODEC_VDPAU], [test "${have_avcodec_vdpau}" = "yes"])
--
1.8.2
More information about the vlc-devel
mailing list