[gst-cvs] gst-plugins-bad: vdpau: Fix pkg-config test
Jan Schmidt
thaytan at kemper.freedesktop.org
Wed Sep 16 17:39:12 PDT 2009
Module: gst-plugins-bad
Branch: master
Commit: 16124a1c1ebbe542ed44342fc21472e8478a61dc
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=16124a1c1ebbe542ed44342fc21472e8478a61dc
Author: Jan Schmidt <thaytan at noraisin.net>
Date: Tue Sep 1 19:48:43 2009 +0100
vdpau: Fix pkg-config test
If the pkg-config check doesn't succeed, test with the old method
instead of bailing out of configure with an error.
---
configure.ac | 55 ++++++++++++++++++++++++++++---------------------------
1 files changed, 28 insertions(+), 27 deletions(-)
diff --git a/configure.ac b/configure.ac
index c1b64d9..d4651a4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1537,35 +1537,36 @@ AG_GST_CHECK_FEATURE(VDPAU, [VDPAU], vdpau, [
VDPAU_LIBS=-lvdpau
HAVE_VDPAU=no
- PKG_CHECK_MODULES(VDPAU, vdpau, [HAVE_VDPAU="yes"])
-
- if test "$HAVE_VDPAU" = "no"; then
- 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"
+ PKG_CHECK_MODULES(VDPAU, vdpau, [HAVE_VDPAU="yes"],
+ [
+ if test "$HAVE_VDPAU" = "no"; then
+ 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])
+
+ 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
-
- 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
+ ])
if test "$HAVE_VDPAU" = "yes"; then
AC_MSG_NOTICE([Found up to date VDPAU installation])
More information about the Gstreamer-commits
mailing list