Browse Source

Use libv4l1-videodev.h when available

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 3 years ago
parent
commit
1ad8da5795
3 changed files with 13 additions and 6 deletions
  1. +9
    -3
      configure.in.in
  2. +1
    -1
      src/barcode/barcode_v4l.cpp
  3. +3
    -2
      src/barcode/barcode_v4l.h

+ 9
- 3
configure.in.in View File

@@ -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 ----------


+ 1
- 1
src/barcode/barcode_v4l.cpp View File

@@ -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>


+ 3
- 2
src/barcode/barcode_v4l.h View File

@@ -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>


Loading…
Cancel
Save