--without-v4l breaks configure script (with autoconf 2.71)
fweimer-rh opened this issue · 1 comments
fweimer-rh commented
The configure.ac
contains this:
if test "x$with_v4l" != "xno"; then
AC_CHECK_HEADER(libv4l1-videodev.h,
[AC_DEFINE(HAVE_LIBV4L1_VIDEODEV_H)],,)
AC_CHECK_HEADER(linux/videodev.h,
[AC_DEFINE(HAVE_LINUX_VIDEODEV_H)],,)
AC_CHECK_HEADER(linux/videodev2.h,
[AC_DEFINE(HAVE_LINUX_VIDEODEV2_H)],,)
fi
The first AC_CHECK_HEADER
is where autoconf 2.71 chooses to inject all the system header probes. If --without-v4l
is specified, these probes never run, and HAVE_SYS_STAT_H
is not set. This causes the lstat
check to go from
checking whether lstat correctly handles trailing slash... yes
to
checking whether lstat correctly handles trailing slash... no
because it no longer includes <sys/stat.h>
.
I believe there is a rule that AC_CHECK_HEADER
must not be called conditionally. I have asked about it on the autoconf list:
Related to:
fweimer-rh commented
Upstream for autoconf provided the following reference:
This macro should be used instead of plain
if
in code outside of anAC_DEFUN
macro, when the contents of theif' use
AC_REQUIRE` directly or indirectly (see Prerequisite Macros).