[vlc-commits] v4l2: check if kernel headers are recent enough

Rafaël Carré git at videolan.org
Thu Jan 19 19:42:34 CET 2012


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Wed Jan 18 20:04:24 2012 -0500| [5740099f6ffea9bc72f64ccd2870453e61ee77b2] | committer: Rafaël Carré

v4l2: check if kernel headers are recent enough

V4L2_FIELD_INTERLACED_BT was introduced in v2.6.25-3581-g26d507f
Check for headers from last supported kernel

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5740099f6ffea9bc72f64ccd2870453e61ee77b2
---

 configure.ac |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index 442cc37..4f09324 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1809,7 +1809,18 @@ AC_ARG_ENABLE(pvr, [AS_HELP_STRING([--enable-pvr],
   [support PVR V4L2 cards (default disabled)])])
 have_v4l2="no"
 AC_CHECK_HEADERS([linux/videodev2.h sys/videoio.h], [
-  have_v4l2="yes"
+  AC_PREPROC_IFELSE([
+  #ifdef __linux__
+  # include <linux/version.h>
+  # if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
+  #  error Kernel headers too old
+  # endif
+  #endif
+    ], [
+      have_v4l2="yes"
+      ], [
+      AC_MSG_WARN([Kernel headers too old for V4L2 module. You need at least 2.6.32])
+  ])
 ])
 AS_IF([test "$have_v4l2" = "yes"], [
   AS_IF([test "${enable_libv4l2}" != "no"], [



More information about the vlc-commits mailing list