summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac36
1 files changed, 33 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index dde1cb81..900d8342 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1425,9 +1425,39 @@ AG_GST_CHECK_FEATURE(ACM, [Windows ACM library], acm, [
dnl *** vdpau ***
translit(dnm, m, l) AM_CONDITIONAL(USE_VDPAU, true)
AG_GST_CHECK_FEATURE(VDPAU, [VDPAU], vdpau, [
- AC_MSG_CHECKING([Checking for up to date vdpau installation])
- AC_CHECK_HEADERS([vdpau/vdpau.h vdpau/vdpau_x11.h],
- [HAVE_VDPAU="yes"], [HAVE_VDPAU="no"])
+ VDPAU_CFLAGS=
+ VDPAU_LIBS=-lvdpau
+ HAVE_VDPAU=no
+
+ saved_CPPFLAGS="$CPPFLAGS"
+ AC_CHECK_HEADER([vdpau/vdpau.h], [HAVE_VDPAU_H=yes])
+ if test -z "$HAVE_VDPAU_H"; then
+ dnl Didn't find VDPAU header straight away.
+ dnl Try /usr/include/nvidia. Need to clear caching vars first
+ AC_MSG_NOTICE([VDPAU header not in standard path. Checking /usr/include/nvidia])
+ unset ac_cv_header_vdpau_vdpau_h
+ unset ac_cv_header_vdpau_vdpau_x11_h
+ VDPAU_CFLAGS="-I/usr/include/nvidia"
+ VDPAU_LIBS="-L/usr/lib/nvidia -lvdpau"
+ CPPFLAGS="$VDPAU_CFLAGS $saved_CPPFLAGS"
+ AC_CHECK_HEADER([vdpau/vdpau.h], [HAVE_VDPAU_H=yes])
+ fi
+ AC_CHECK_HEADER([vdpau/vdpau_x11.h], [HAVE_VDPAU_X11_H=yes])
+ CPPFLAGS="$saved_CPPFLAGS"
+
+ if test "x$HAVE_VDPAU_H" = "xyes" -a "x$HAVE_VDPAU_X11_H" = "xyes"; then
+ dnl Found the headers - look for the lib
+ AC_MSG_NOTICE([VDPAU headers found. Checking libraries])
+ saved_LIBS="$LIBS"
+ LIBS="$VDPAU_LIBS $saved_LIBS"
+ AC_CHECK_LIB(vdpau,vdp_device_create_x11,[HAVE_VDPAU="yes"])
+ LIBS="$saved_LIBS"
+ fi
+ if test "$HAVE_VDPAU" = "yes"; then
+ AC_MSG_NOTICE([Found up to date VDPAU installation])
+ AC_SUBST(VDPAU_CFLAGS)
+ AC_SUBST(VDPAU_LIBS)
+ fi
])
else