summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2016-09-18 20:25:16 +0200
committerSlávek Banko <[email protected]>2016-09-18 20:25:37 +0200
commit2304954b60ecf1f43078db5f3eccbb83cc6e1ab2 (patch)
tree22ffbd6a19b2de66a2ce1365096854c2f24fa355
parent0a78c9adbf4ec3cf77bad3a803706a10cc07b432 (diff)
downloadtellico-2304954b60ecf1f43078db5f3eccbb83cc6e1ab2.tar.gz
tellico-2304954b60ecf1f43078db5f3eccbb83cc6e1ab2.zip
Use libv4l1-videodev.h when available
Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 1ad8da5795c9b7e348aac6fc0a7c31e26584aa2b)
-rw-r--r--configure.in.in12
-rw-r--r--src/barcode/barcode_v4l.cpp2
-rw-r--r--src/barcode/barcode_v4l.h5
3 files changed, 13 insertions, 6 deletions
diff --git a/configure.in.in b/configure.in.in
index c9fa660..406e664 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -555,14 +555,20 @@ AC_ARG_ENABLE(webcam,
)
if test x$enable_webcam = xyes; then
- KDE_CHECK_HEADERS([linux/videodev.h],
- [],
- [enable_webcam="no"])
+ KDE_CHECK_HEADERS(
+ [libv4l1-videodev.h],
+ [videodev_header="libv4l1-videodev.h"],
+ [
+ KDE_CHECK_HEADERS([linux/videodev.h],
+ [videodev_header="linux/videodev.h"],
+ [enable_webcam="no"])
+ ])
fi
AM_CONDITIONAL(ENABLE_WEBCAM, test $enable_webcam = yes)
if test x$enable_webcam = xyes; then
AC_DEFINE(ENABLE_WEBCAM, 1, [Define to 1 if webcam support is enabled])
+ AC_DEFINE_UNQUOTED(VIDEODEV_HEADER, ["$videodev_header"], [Define header name for videodev])
fi
dnl ---------- END WEBCAM CHECK ----------
diff --git a/src/barcode/barcode_v4l.cpp b/src/barcode/barcode_v4l.cpp
index 10f501a..ec22aad 100644
--- a/src/barcode/barcode_v4l.cpp
+++ b/src/barcode/barcode_v4l.cpp
@@ -16,7 +16,7 @@
//#include <stdio.h>
//#include <stdlib.h>
#include <fcntl.h> /* low-level i/o */
-//#include <unistd.h>
+#include <unistd.h>
#include <errno.h>
//#include <malloc.h>
//#include <sys/stat.h>
diff --git a/src/barcode/barcode_v4l.h b/src/barcode/barcode_v4l.h
index 3ab1a32..c6f60b2 100644
--- a/src/barcode/barcode_v4l.h
+++ b/src/barcode/barcode_v4l.h
@@ -30,8 +30,9 @@
#undef FOO__STRICT_ANSI__
#endif
-//#include <linux/videodev2.h>
-#include <linux/videodev.h>
+#include "config.h"
+
+#include VIDEODEV_HEADER
#include <tqstring.h>
#include <tqimage.h>