summaryrefslogtreecommitdiff
path: root/extra/libdc1394/videodev-compile-fix.patch
blob: 8f234b152c42c04aa3d56da2d216f4d4ddb10f0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From 2ee7e7f98dd6225b40d5cd570c240504be7bc86a Mon Sep 17 00:00:00 2001
From: David Moore <david.moore@gmail.com>
Date: Sun, 27 Mar 2011 22:48:15 -0700
Subject: [PATCH] Conditionally compile dc1394_vloopback only when linux/videodev.h exists

---
 libdc1394/configure.in         |    3 +++
 libdc1394/examples/Makefile.am |    2 ++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/libdc1394/configure.in b/libdc1394/configure.in
index 69babab..bdddc9b 100644
--- a/libdc1394/configure.in
+++ b/libdc1394/configure.in
@@ -75,6 +75,9 @@ AM_CONDITIONAL(HAVE_WINDOWS, test x$have_windows = xtrue)
 AM_CONDITIONAL(HAVE_LIBRAW1394, test x$libraw1394 = xtrue)
 AM_CONDITIONAL(HAVE_LIBUSB, test "x$LIBUSB_LIBS" != "x")
 
+AC_CHECK_HEADER([linux/videodev.h], [have_videodev=true])
+AM_CONDITIONAL(HAVE_VIDEODEV, test x$have_videodev = xtrue)
+
 AC_ARG_ENABLE([examples], [AS_HELP_STRING([--disable-examples], [don't build example programs])], [build_examples=$enableval], [build_examples=true])
 
 AM_CONDITIONAL(MAKE_EXAMPLES, test x$build_examples = xtrue)
diff --git a/libdc1394/examples/Makefile.am b/libdc1394/examples/Makefile.am
index fcebf18..035612e 100644
--- a/libdc1394/examples/Makefile.am
+++ b/libdc1394/examples/Makefile.am
@@ -8,7 +8,9 @@ A = grab_gray_image grab_partial_image grab_color_image \
 B = dc1394_reset_bus
 
 if HAVE_LINUX
+if HAVE_VIDEODEV
 B += dc1394_vloopback
+endif
 if HAVE_XV
 A += dc1394_multiview
 endif
-- 
1.7.4.1