mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 04:56:14 +00:00
vdpau: check for vdpau with pkg-config first
This commit is contained in:
parent
d849563bda
commit
3b2faded12
1 changed files with 28 additions and 22 deletions
50
configure.ac
50
configure.ac
|
@ -1537,30 +1537,36 @@ AG_GST_CHECK_FEATURE(VDPAU, [VDPAU], vdpau, [
|
||||||
VDPAU_LIBS=-lvdpau
|
VDPAU_LIBS=-lvdpau
|
||||||
HAVE_VDPAU=no
|
HAVE_VDPAU=no
|
||||||
|
|
||||||
saved_CPPFLAGS="$CPPFLAGS"
|
PKG_CHECK_MODULES(VDPAU, vdpau, [HAVE_VDPAU="yes"])
|
||||||
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
|
if test "$HAVE_VDPAU" = "no"; then
|
||||||
dnl Found the headers - look for the lib
|
saved_CPPFLAGS="$CPPFLAGS"
|
||||||
AC_MSG_NOTICE([VDPAU headers found. Checking libraries])
|
AC_CHECK_HEADER([vdpau/vdpau.h], [HAVE_VDPAU_H=yes])
|
||||||
saved_LIBS="$LIBS"
|
|
||||||
LIBS="$VDPAU_LIBS $saved_LIBS"
|
if test -z "$HAVE_VDPAU_H"; then
|
||||||
AC_CHECK_LIB(vdpau,vdp_device_create_x11,[HAVE_VDPAU="yes"])
|
dnl Didn't find VDPAU header straight away.
|
||||||
LIBS="$saved_LIBS"
|
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])
|
||||||
|
|
||||||
|
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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$HAVE_VDPAU" = "yes"; then
|
if test "$HAVE_VDPAU" = "yes"; then
|
||||||
AC_MSG_NOTICE([Found up to date VDPAU installation])
|
AC_MSG_NOTICE([Found up to date VDPAU installation])
|
||||||
AC_SUBST(VDPAU_CFLAGS)
|
AC_SUBST(VDPAU_CFLAGS)
|
||||||
|
|
Loading…
Reference in a new issue