LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File libdc1394.no-x11.patch of Package libdc1394 (Project multimedia:libs)

---
 libdc1394-1.2.2/examples/Makefile.am |    2 +-
 libdc1394-2.0.2/configure.in         |   34 +++++++++++++++++++++-------------
 2 files changed, 22 insertions(+), 14 deletions(-)

--- a/libdc1394-1.2.2/examples/Makefile.am
+++ b/libdc1394-1.2.2/examples/Makefile.am
@@ -1,6 +1,6 @@
 MAINTAINERCLEANFILES = Makefile.in
 bin_PROGRAMS = dc1394_vloopback
-noinst_PROGRAMS = grab_gray_image grab_partial_image dc1394_multiview grab_color_image
+noinst_PROGRAMS = grab_gray_image grab_partial_image  grab_color_image
 
 grab_gray_image_SOURCES = grab_gray_image.c
 grab_gray_image_LDADD = ../libdc1394/libdc1394_control.la -lraw1394
--- a/libdc1394-2.2.1/configure.in
+++ b/libdc1394-2.2.1/configure.in
@@ -102,21 +102,30 @@ 

 # check for Xv extensions (necessary for examples/dc1394_multiview)
 # imported from Coriander
+AC_ARG_ENABLE([xv],
+              AS_HELP_STRING([--disable-xv], [Disable the check for Xv extensions]),
+              [test_xv=yes], [test_xv=no])
+
 AC_DEFUN([AC_CHECK_XV],[
-    AC_SUBST(XV_CFLAGS)
-    AC_SUBST(XV_LIBS)
-    AC_MSG_CHECKING(for Xv extensions)
-    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-        #include <X11/Xlib.h>
-        #include <X11/extensions/Xvlib.h>]], [[
-        int main(void) { (void) XvGetPortAttribute(0, 0, 0, 0); return 0; }
-    ]])],[xv=yes],[xv=no])
-    AC_MSG_RESULT($xv)
-    if test x$xv = xyes; then
-        XV_LIBS="-lXv -lXext"
-        XV_CFLAGS=""
-    fi
-    AM_CONDITIONAL(HAVE_XV, test x$xv = xyes)
+       if test x$test_xv != "xno"; then
+            AC_SUBST(XV_CFLAGS)
+            AC_SUBST(XV_LIBS)
+            AC_MSG_CHECKING(for Xv extensions)
+            AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+            #include <X11/Xlib.h>
+            #include <X11/extensions/Xvlib.h>]], [[
+            int main(void) { (void) XvGetPortAttribute(0, 0, 0, 0); return 0; }
+            ]])],[xv=yes],[xv=no]);
+            AC_MSG_RESULT($xv)
+            if test x$xv = xyes; then
+               XV_LIBS="-lXv -lXext"
+               XV_CFLAGS=""
+               AC_DEFINE(HAVE_XV,1,[defined if XV video overlay is available])
+            fi
+        else
+            xv=no
+        fi
+        AM_CONDITIONAL(HAVE_XV, test x$xv = xyes)
 ])
 AC_CHECK_XV