Debian Codegraph @

m4/v4l2.m4

raw
1 # Configure paths for video4linux v2
2
3 dnl Usage:
4 dnl AC_CHECK_V4L2([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
5 dnl Test for video4linux v2 interface, and defines
6 dnl prerequisites:
7
8 AC_DEFUN([AC_CHECK_V4L2],
9 [
10 AC_ARG_ENABLE(v4l2, [ --enable-v4l2 support v4l2 video interface. [[autodetect]]],
11 [], enable_v4l2=yes)
12 if test "$enable_v4l2" = yes; then
13 AC_CACHE_CHECK([whether system supports Video4Linux2],
14 ac_cv_val_have_v4l2,
15 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([
16 #include <sys/time.h>
17 #include <asm/types.h>
18 #include <linux/videodev2.h>], [
19 int dummy = V4L2_PIX_FMT_YUV420;
20 struct v4l2_buffer dummy1 ]), ac_cv_val_have_v4l2=yes, ac_cv_val_have_v4l2=no)
21 )
22 test "$ac_cv_val_have_v4l2" = no && enable_v4l2=no
23 fi
24
25 if test "$enable_v4l2" = yes; then
26 ifelse([$1], , :, [$1])
27 else
28 ifelse([$2], , :, [$2])
29 fi
30 ])