Commit e9d45e8f authored by Christophe Mutricy's avatar Christophe Mutricy

Better fix for <linux/videodev2.h> . Refs #1238

parent 757fcfc9
...@@ -2369,15 +2369,21 @@ then ...@@ -2369,15 +2369,21 @@ then
if test "${with_videodev2}" != "no" -a -n "${with_videodev2}" if test "${with_videodev2}" != "no" -a -n "${with_videodev2}"
then then
AC_DEFINE_UNQUOTED(VIDEODEV2_H_FILE, "${with_videodev2}", [Location of videodev2.h]) AC_DEFINE_UNQUOTED(VIDEODEV2_H_FILE, "${with_videodev2}", [Location of videodev2.h])
else dnl else
AC_DEFINE(VIDEODEV2_H_FILE, "linux/videodev2.h", [Location of videodev2.h]) dnl AC_DEFINE(VIDEODEV2_H_FILE, "linux/videodev2.h", [Location of videodev2.h])
fi fi
AC_CACHE_CHECK([for new linux/videodev2.h], AC_CACHE_CHECK([for new linux/videodev2.h],
[new_linux_videodev2_h], [new_linux_videodev2_h],
[AC_TRY_COMPILE([#include <sys/types.h> [AC_TRY_COMPILE([
#include VIDEODEV2_H_FILE], #include <sys/types.h>
# ifdef VIDEODEV2_H_FILE
# include VIDEODEV2_H_FILE
# else
# include <linux/videodev2.h>
# endif
],
[struct v4l2_ext_controls ctrls; ctrls.ctrl_class = V4L2_CTRL_CLASS_MPEG; ], [struct v4l2_ext_controls ctrls; ctrls.ctrl_class = V4L2_CTRL_CLASS_MPEG; ],
new_linux_videodev2_h=yes, new_linux_videodev2_h=yes,
new_linux_videodev2_h=no)]) new_linux_videodev2_h=no)])
......
...@@ -38,7 +38,11 @@ ...@@ -38,7 +38,11 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/poll.h> #include <sys/poll.h>
#ifdef HAVE_NEW_LINUX_VIDEODEV2_H #ifdef HAVE_NEW_LINUX_VIDEODEV2_H
#include VIDEODEV2_H_FILE # ifdef VIDEODEV2_H_FILE
# include VIDEODEV2_H_FILE
# else
# include <linux/videodev2.h>
# endif
#else #else
#include "videodev2.h" #include "videodev2.h"
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment