diff options
author | Jan Schmidt <thaytan@noraisin.net> | 2009-06-12 16:39:39 +0100 |
---|---|---|
committer | Jan Schmidt <thaytan@noraisin.net> | 2009-06-20 15:21:46 +0100 |
commit | f45f87709c7da9105024b0ceedda0e3155526240 (patch) | |
tree | 0f4f295f44743286c3339736df696e1a67fad1c4 | |
parent | b4fa8a4ef01a78638f5bc16a14802acfa1c11106 (diff) | |
download | gst-plugins-bad-f45f87709c7da9105024b0ceedda0e3155526240.tar.gz gst-plugins-bad-f45f87709c7da9105024b0ceedda0e3155526240.tar.bz2 gst-plugins-bad-f45f87709c7da9105024b0ceedda0e3155526240.zip |
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.
-rw-r--r-- | configure.ac | 36 | ||||
-rw-r--r-- | sys/vdpau/Makefile.am | 5 |
2 files changed, 36 insertions, 5 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 diff --git a/sys/vdpau/Makefile.am b/sys/vdpau/Makefile.am index f4380aff..f62ee0b4 100644 --- a/sys/vdpau/Makefile.am +++ b/sys/vdpau/Makefile.am @@ -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 |