Commit c88c8eae authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Define HAVE_V4L2 conditional

There should be more V4L2-based plugins later, e.g. FM RX, FM TX, VOUT.
parent d2a613c7
......@@ -2032,22 +2032,18 @@ dnl Video4Linux2 plugin
dnl
AC_ARG_ENABLE(v4l2,
[AS_HELP_STRING([--disable-v4l2],
[do not support Video4Linux version 2 (default auto)])])
AC_ARG_WITH(v4l2,
[AS_HELP_STRING([--with-v4l2=PATH], [path to a V4L2-enabled kernel tree])])
if test "${enable_v4l2}" != "no"
then
if test "${with_v4l2}" != "no" -a -n "${with_v4l2}"
then
VLC_ADD_CPPFLAGS([v4l2],[-I${with_v4l2}/include])
fi
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_v4l2}"
AC_CHECK_HEADERS(linux/videodev2.h sys/videoio.h, [
VLC_ADD_PLUGIN([v4l2])
],[])
CPPFLAGS="${CPPFLAGS_save}"
fi
[disable Video4Linux2 support (default auto)])])
have_v4l2="no"
AS_IF([test "${enable_v4l2}" != "no"], [
AC_CHECK_HEADERS([linux/videodev2.h sys/videoio.h], [
have_v4l2="yes"
], [
AS_IF([test "x${enable_v4l2}" != "x"], [
AC_MSG_ERROR([Video4Linux2 headers not found!])
])
])
])
AM_CONDITIONAL(HAVE_V4L2, [test "${have_v4l2}" != "no"])
dnl
dnl libv4l2 support for video4linux.
......
......@@ -44,7 +44,6 @@ SOURCES_dvdnav = dvdnav.c
SOURCES_dvdread = dvdread.c
SOURCES_dc1394 = dc1394.c
SOURCES_pvr = pvr.c
SOURCES_v4l2 = v4l2.c
SOURCES_qtcapture = qtcapture.m
SOURCES_linsys_sdi = linsys/linsys_sdi.c linsys/linsys_sdi.h
SOURCES_linsys_hdsdi = \
......@@ -120,6 +119,14 @@ libaccess_shm_plugin_la_LIBADD = $(AM_LIBADD)
libaccess_shm_plugin_la_DEPENDENCIES =
libvlc_LTLIBRARIES += $(LTLIBaccess_shm)
libv4l2_plugin_la_SOURCES = v4l2.c
libv4l2_plugin_la_CFLAGS = $(AM_CFLAGS)
libv4l2_plugin_la_LIBADD = $(AM_LIBADD)
libv4l2_plugin_la_DEPENDENCIES =
if HAVE_V4L2
libvlc_LTLIBRARIES += libv4l2_plugin.la
endif
libxcb_screen_plugin_la_SOURCES = screen/xcb.c
libxcb_screen_plugin_la_CFLAGS = $(AM_CFLAGS) \
$(XCB_CFLAGS) $(XCB_COMPOSITE_CFLAGS)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment