AC_MSG_CHECKING([for Xattr])
AC_MSG_RESULT([${have_xattr}])
+### Check for video4linux
+
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <stdio.h>
+#include <linux/videodev2.h>
+ ]],
+ [[
+fprintf(stdout, "%i\n", V4L2_CAP_VIDEO_CAPTURE);
+ ]])],
+ [
+ AC_DEFINE(HAVE_V4L2, 1, [Define to 1 if you have Video4Linux 2 available])
+ have_v4l2="yes"
+ ],
+ [have_v4l2="no"])
+AC_MSG_CHECKING([for V4L2])
+AC_MSG_RESULT([${have_v4l2}])
+
### Modules
EMOTION_CHECK_MODULE([Xine], [${want_xine}])
echo
echo " Xattr................: ${have_xattr}"
echo " Eio..................: ${have_eio}"
+echo " V4L2.................: ${have_v4l2}"
echo
echo "Documentation..........: ${build_doc}"
echo "Examples.............: ${enable_build_examples}"
#include <sys/stat.h>
#include <fcntl.h>
# include <sys/ioctl.h>
-# include <linux/videodev2.h>
+# ifdef HAVE_V4L2
+# include <linux/videodev2.h>
+# endif
# include <Ecore.h>
# include <Eeze.h>
static void
_emotion_check_device(Emotion_Webcam *ew)
{
+#ifdef HAVE_V4L2
Emotion_Webcam *check;
Eina_List *l;
struct v4l2_capability caps;
int fd;
+#endif
if (!ew) return ;
+#ifdef HAVE_V4L2
if (!ew->device) goto on_error;
fd = open(ew->filename, O_RDONLY);
return ;
on_error:
+#endif
fprintf(stderr, "'%s' is not a webcam ['%s']\n", ew->name, strerror(errno));
eina_stringshare_del(ew->syspath);
eina_stringshare_del(ew->device);