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 ...@@ -2032,22 +2032,18 @@ dnl Video4Linux2 plugin
dnl dnl
AC_ARG_ENABLE(v4l2, AC_ARG_ENABLE(v4l2,
[AS_HELP_STRING([--disable-v4l2], [AS_HELP_STRING([--disable-v4l2],
[do not support Video4Linux version 2 (default auto)])]) [disable Video4Linux2 support (default auto)])])
AC_ARG_WITH(v4l2, have_v4l2="no"
[AS_HELP_STRING([--with-v4l2=PATH], [path to a V4L2-enabled kernel tree])]) AS_IF([test "${enable_v4l2}" != "no"], [
if test "${enable_v4l2}" != "no" AC_CHECK_HEADERS([linux/videodev2.h sys/videoio.h], [
then have_v4l2="yes"
if test "${with_v4l2}" != "no" -a -n "${with_v4l2}" ], [
then AS_IF([test "x${enable_v4l2}" != "x"], [
VLC_ADD_CPPFLAGS([v4l2],[-I${with_v4l2}/include]) AC_MSG_ERROR([Video4Linux2 headers not found!])
fi ])
])
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_v4l2}" ])
AC_CHECK_HEADERS(linux/videodev2.h sys/videoio.h, [ AM_CONDITIONAL(HAVE_V4L2, [test "${have_v4l2}" != "no"])
VLC_ADD_PLUGIN([v4l2])
],[])
CPPFLAGS="${CPPFLAGS_save}"
fi
dnl dnl
dnl libv4l2 support for video4linux. dnl libv4l2 support for video4linux.
......
...@@ -44,7 +44,6 @@ SOURCES_dvdnav = dvdnav.c ...@@ -44,7 +44,6 @@ SOURCES_dvdnav = dvdnav.c
SOURCES_dvdread = dvdread.c SOURCES_dvdread = dvdread.c
SOURCES_dc1394 = dc1394.c SOURCES_dc1394 = dc1394.c
SOURCES_pvr = pvr.c SOURCES_pvr = pvr.c
SOURCES_v4l2 = v4l2.c
SOURCES_qtcapture = qtcapture.m SOURCES_qtcapture = qtcapture.m
SOURCES_linsys_sdi = linsys/linsys_sdi.c linsys/linsys_sdi.h SOURCES_linsys_sdi = linsys/linsys_sdi.c linsys/linsys_sdi.h
SOURCES_linsys_hdsdi = \ SOURCES_linsys_hdsdi = \
...@@ -120,6 +119,14 @@ libaccess_shm_plugin_la_LIBADD = $(AM_LIBADD) ...@@ -120,6 +119,14 @@ libaccess_shm_plugin_la_LIBADD = $(AM_LIBADD)
libaccess_shm_plugin_la_DEPENDENCIES = libaccess_shm_plugin_la_DEPENDENCIES =
libvlc_LTLIBRARIES += $(LTLIBaccess_shm) 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_SOURCES = screen/xcb.c
libxcb_screen_plugin_la_CFLAGS = $(AM_CFLAGS) \ libxcb_screen_plugin_la_CFLAGS = $(AM_CFLAGS) \
$(XCB_CFLAGS) $(XCB_COMPOSITE_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