summaryrefslogtreecommitdiff
blob: c590aef3b7134693e5e81da4fbdd15eb9751539a (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
From b99ddff6f322c8b466f3cdfd71b0d629cea33aac Mon Sep 17 00:00:00 2001
From: hasufell <hasufell@gentoo.org>
Date: Wed, 9 Oct 2013 18:12:46 +0200
Subject: [PATCH] Support disabling V4L support completely

---
 configure.ac | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 94b6f18..9f402bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -746,6 +746,16 @@ PACKAGE_DATA_DIR="$prefix/share"
 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR,  "${package_prefix}/share" ,[path of data])
 AC_SUBST(PACKAGE_DATA_DIR)
 
+AC_ARG_ENABLE(v4l,
+      [  --disable-v4l       Disable usage of v4l],
+      [case "${enableval}" in
+        yes) v4l=yes ;;
+        no)  v4l=no ;;
+        *) AC_MSG_ERROR(bad value ${enableval} for --disable-v4l) ;;
+      esac],[v4l=yes])
+
+if test "$v4l" = "yes" ; then
+
 dnl check for video4linux headers
 AC_CHECK_HEADERS(linux/videodev.h linux/videodev2.h)
 if test "${ac_cv_header_linux_videodev_h}" = "yes" ; then
@@ -759,9 +769,6 @@ else
 	found_v4l2=no
 fi
 
-AM_CONDITIONAL(BUILD_V4L1, test x$found_v4l1 = xyes )
-AM_CONDITIONAL(BUILD_V4L2, test x$found_v4l2 = xyes )
-
 AC_ARG_ENABLE(libv4l1,
 	[AS_HELP_STRING([--disable-libv4l1], [Disable usage of libv4l1, really discouraged])],
 	[case "${enableval}" in
@@ -805,6 +812,11 @@ this check.
 	fi
 fi
 
+fi
+
+AM_CONDITIONAL(BUILD_V4L1, test x$found_v4l1 = xyes )
+AM_CONDITIONAL(BUILD_V4L2, test x$found_v4l2 = xyes )
+
 
 AC_PATH_PROG(PCAP,pcap-config,false)
 AM_CONDITIONAL(HAVE_PCAP, test $PCAP != false)
-- 
1.8.3.2