mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-02 16:52:42 +00:00
VDPAU: Enhance the configure tests
Check for the VDPAU headers in /usr/include/nvidia as they are on some platforms (Fedora/rpmfusion). Also check that the libvdpau library is available.
This commit is contained in:
parent
b4fa8a4ef0
commit
f45f87709c
2 changed files with 36 additions and 5 deletions
36
configure.ac
36
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
|
||||
|
|
|
@ -9,9 +9,10 @@ libgstvdpau_la_SOURCES = \
|
|||
gstvdp.c \
|
||||
gstvdpyuvvideo.c
|
||||
|
||||
libgstvdpau_la_CFLAGS = $(GST_CFLAGS) $(X11_CFLAGS) -Ivdpau
|
||||
libgstvdpau_la_CFLAGS = $(GST_CFLAGS) $(X11_CFLAGS) $(VDPAU_CFLAGS)
|
||||
libgstvdpau_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) \
|
||||
$(GST_PLUGINS_BASE) $(X11_LIBS) -lgstvideo-$(GST_MAJORMINOR) -lvdpau
|
||||
$(GST_PLUGINS_BASE) $(X11_LIBS) -lgstvideo-$(GST_MAJORMINOR) \
|
||||
$(VDPAU_LIBS)
|
||||
libgstvdpau_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
|
||||
libgstvdpau_la_LIBTOOLFLAGS = --tag=disable-static
|
||||
|
||||
|
|
Loading…
Reference in a new issue