configure: Don't check for gudev if video4linux2 is not present
authorOlivier Crête <tester@tester.ca>
Mon, 17 Mar 2014 03:46:22 +0000 (23:46 -0400)
committerOlivier Crête <tester@tester.ca>
Mon, 17 Mar 2014 03:46:22 +0000 (23:46 -0400)
configure.ac

index 282f511..7b754d1 100644 (file)
@@ -518,12 +518,14 @@ AC_ARG_WITH([gudev],
   AS_HELP_STRING([--with-gudev],[device detection with gudev]),
   [],
   [with_gudev=check])
-if test x$with_gudev != xno; then
-  PKG_CHECK_MODULES(GUDEV, [ gudev-1.0 >= 147 ],
-    [ AC_DEFINE(HAVE_GUDEV, 1,
-        [Whether gudev is available for device detection])
-    ],
-    [true])
+if test x$HAVE_GST_V4L2 = xyes; then
+  if test x$with_gudev != xno; then
+    PKG_CHECK_MODULES(GUDEV, [ gudev-1.0 >= 147 ],
+      [ AC_DEFINE(HAVE_GUDEV, 1,
+          [Whether gudev is available for device detection])
+      ],
+      [true])
+  fi
 fi
 
 AC_SUBST(GUDEV_CFLAGS)