Fix kstars not detecting videodev2.h

This resolves Bug 1372
pull/1/head
Timothy Pearson 12 years ago
parent c2c964bb41
commit ab9a2a8b5e

@ -87,7 +87,18 @@ case "$target" in
[have_v4l2=true], [have_v4l2=true],
[have_v4l2=false], [have_v4l2=false],
[#include <sys/time.h> [#include <sys/time.h>
#include <linux/videodev.h>]) #include <linux/videodev2.h>])
if test x$have_v4l2 = xfalse; then
unset ac_cv_type_struct_v4l2_buffer
AC_CHECK_TYPE([struct v4l2_buffer],
[have_v4l2=true],
[have_v4l2=false],
[#include <sys/time.h>
#include <linux/videodev.h>])
if test x$have_v4l2 = xtrue; then
AC_DEFINE(HAVE_LINUX_ALTERNATE_VIDEODEV_H, 1, [Define to 1 if you have the <linux/videodev.h> header file.])
fi
fi
if test x$have_v4l2 = xfalse; then if test x$have_v4l2 = xfalse; then
KERNEL_VERSION=`uname -r` KERNEL_VERSION=`uname -r`
AC_CHECK_FILE(/lib/modules/$KERNEL_VERSION/build/include/linux/videodev2.h, AC_CHECK_FILE(/lib/modules/$KERNEL_VERSION/build/include/linux/videodev2.h,

@ -20,6 +20,8 @@
*/ */
#include <config.h>
#ifndef HAVE_LINUX_VIDEODEV2_H #ifndef HAVE_LINUX_VIDEODEV2_H
#include "webcam/v4l1_pwc.h" #include "webcam/v4l1_pwc.h"
#endif #endif

@ -24,7 +24,11 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#ifdef HAVE_LINUX_ALTERNATE_VIDEODEV_H
#include "videodev.h" #include "videodev.h"
#else
#include "videodev2.h"
#endif
#include "../eventloop.h" #include "../eventloop.h"
class V4L1_Base class V4L1_Base

@ -23,7 +23,11 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#ifdef HAVE_LINUX_ALTERNATE_VIDEODEV_H
#include "videodev.h" #include "videodev.h"
#else
#include "videodev2.h"
#endif
#include "v4l1_base.h" #include "v4l1_base.h"
class V4L1_PWC : public V4L1_Base class V4L1_PWC : public V4L1_Base

Loading…
Cancel
Save