chiark / gitweb /
Only build v4l_id if V4L1 header file is available
authorMartin Pitt <martin.pitt@ubuntu.com>
Tue, 15 Feb 2011 13:20:21 +0000 (14:20 +0100)
committerMartin Pitt <martin.pitt@ubuntu.com>
Tue, 15 Feb 2011 13:20:21 +0000 (14:20 +0100)
Makefile.am
configure.ac

index df426f72a44fd95b66f7bfddec8967681275208e..b87741802f853c29980a4033dd80ff4950640974 100644 (file)
@@ -312,10 +312,12 @@ libexec_PROGRAMS += extras/usb_id/usb_id
 # ------------------------------------------------------------------------------
 # v4l_id - video4linux capabilities
 # ------------------------------------------------------------------------------
+if HAVE_V4L1
 extras_v4l_id_v4l_id_SOURCES = extras/v4l_id/v4l_id.c
 extras_v4l_id_v4l_id_LDADD = libudev/libudev-private.la
 libexec_PROGRAMS += extras/v4l_id/v4l_id
 dist_udevrules_DATA += extras/v4l_id/60-persistent-v4l.rules
+endif
 
 # ------------------------------------------------------------------------------
 # qemu -- qemu/kvm guest tweaks
index 9d35cfced08dd2e9b60bb3efaf75275e695b1683..2ceba56191617bed5987406cdb2c39e073d50a8d 100644 (file)
@@ -115,6 +115,9 @@ if test "x$enable_extras" = xyes; then
 
        AC_CHECK_HEADER([linux/input.h], [:], AC_MSG_ERROR([kernel headers not found]))
        AC_SUBST([INCLUDE_PREFIX], [$(echo '#include <linux/input.h>' | eval $ac_cpp -E - | sed -n '/linux\/input.h/ {s:.*"\(.*\)/linux/input.h".*:\1:; p; q}')])
+
+       AC_CHECK_HEADER([linux/videodev.h], [have_videodev_h=yes], [])
+       AM_CONDITIONAL(HAVE_V4L1, [test "x$have_videodev_h" = "xyes"])
 fi
 AM_CONDITIONAL([ENABLE_EXTRAS], [test "x$enable_extras" = xyes])