summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2011-02-14 11:26:22 +0100
committerMartin Pitt <martin.pitt@ubuntu.com>2011-02-14 11:26:22 +0100
commit8f624253f0135ca77a893ad4e8168f51ef90d4da (patch)
tree54a7c3b7e55e1319e8d084443e5373117a3d3a1f
parent94ea0fc8b96f406655607c51d7d5a83876f82c6f (diff)
Do not build hald-probe-video4linux if v4l1 is not available.
The old v4l1 API is gone from current kernels (2.6.38), and thus linux/videodev.h does not exist any more. Add a configure check for the include and do not build hald-probe-video4linux if it is not available.
-rw-r--r--configure.in3
-rw-r--r--hald/linux/probing/Makefile.am7
2 files changed, 8 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 2394c456..861938fc 100644
--- a/configure.in
+++ b/configure.in
@@ -479,6 +479,9 @@ if test "x$with_libpci" != xno ; then
fi
AM_CONDITIONAL([HAVE_LIBPCI], [test "x$USE_LIBPCI" = "xyes"])
+AC_CHECK_HEADERS([linux/videodev.h], [have_videodev_h=yes], [])
+AM_CONDITIONAL(HAVE_V4L1, [test "x$have_videodev_h" = "xyes"])
+
AC_ARG_WITH([backend],
AS_HELP_STRING([--with-backend=<name>],
[backend to use (linux/solaris/freebsd/dummy)]),
diff --git a/hald/linux/probing/Makefile.am b/hald/linux/probing/Makefile.am
index 50f0dff1..cbea5161 100644
--- a/hald/linux/probing/Makefile.am
+++ b/hald/linux/probing/Makefile.am
@@ -20,8 +20,11 @@ libexec_PROGRAMS = \
hald-probe-serial \
hald-probe-ieee1394-unit \
hald-probe-net-bluetooth \
- hald-probe-lsb-release \
- hald-probe-video4linux
+ hald-probe-lsb-release
+
+if HAVE_V4L1
+libexec_PROGRAMS += hald-probe-video4linux
+endif
endif
hald_probe_smbios_SOURCES = probe-smbios.c ../../logger.c