aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2021-04-19 20:11:07 +0200
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2021-04-20 14:06:26 +0200
commitfc95aea735185cf78766a8402f0df73a221ff2ce (patch)
tree53cea90fc25d497bc938fa4c054a640d51f3252d
parent5b3355e3e54344fab7fc264b69d88ef10b889427 (diff)
downloadv4l-utils-fc95aea735185cf78766a8402f0df73a221ff2ce.tar.gz
configure.ac: Fix building without libudev
Since the addition of the --without-libudev option automatic detection of missing libudev have been broken and fails with, configure: error: Package requirements (libudev) were not met: Package 'libudev', required by 'virtual:world', not found This is because autotools macro PKG_CHECK_MODULES action-if-not-found behaves differently from most other macros, As most of the original autoconf macros, there are boolean values provided, for the cases when the check succeeded or failed. In contrast with almost all of the original macros, though, the default action-if-not-found will end the execution with an error for not having found the dependency. As the AS_IF check following the PKG_CHECK_MODULES prints a warning if libudev is not found the intention can't have been to fail configure if libudev not found. Fix this by setting have_libudev=no instead of failing due to the default action. Fixes: 49316dc21f806d0c ("configure.ac: Add --without-libudev option to avoid automagic dep") Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--configure.ac2
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index a79bf517..8710ab45 100644
--- a/configure.ac
+++ b/configure.ac
@@ -299,7 +299,7 @@ AC_ARG_WITH([libudev],
have_libudev=no
AS_IF([test "x$with_libudev" != xno -o "x$enable_libdvbv5" != xno],
- [PKG_CHECK_MODULES(libudev, libudev, have_libudev=yes, [])
+ [PKG_CHECK_MODULES(libudev, libudev, have_libudev=yes, have_libudev=no)
AS_IF([test "x$have_libudev" = xyes],
[AC_DEFINE([HAVE_LIBUDEV], [], [Use libudev])
LIBUDEV_CFLAGS="$libudev_CFLAGS"