Commit cf407c2e authored by Andrey Kamaev's avatar Andrey Kamaev

Don't check for EINTR and replace xioctl with ioctl

This should be safe todo unless we are writing a signal handler.
parent 1a84bcc5
......@@ -136,7 +136,7 @@ OCV_OPTION(WITH_TBB "Include Intel TBB support" OFF
OCV_OPTION(WITH_CSTRIPES "Include C= support" OFF IF WIN32 )
OCV_OPTION(WITH_TIFF "Include TIFF support" ON IF (NOT IOS) )
OCV_OPTION(WITH_UNICAP "Include Unicap support (GPL)" OFF IF (UNIX AND NOT APPLE AND NOT ANDROID) )
OCV_OPTION(WITH_V4L "Include Video 4 Linux support" ON IF (UNIX AND NOT APPLE AND NOT ANDROID) )
OCV_OPTION(WITH_V4L "Include Video 4 Linux support" ON IF (UNIX AND NOT ANDROID) )
OCV_OPTION(WITH_VIDEOINPUT "Build HighGUI with DirectShow support" ON IF WIN32 )
OCV_OPTION(WITH_XIMEA "Include XIMEA cameras support" OFF IF (NOT ANDROID AND NOT APPLE) )
OCV_OPTION(WITH_XINE "Include Xine support (GPL)" OFF IF (UNIX AND NOT APPLE AND NOT ANDROID) )
......@@ -722,13 +722,15 @@ if(DEFINED WITH_V4L)
else()
set(HAVE_CAMV4L_STR "NO")
endif()
if(HAVE_CAMV4L2 OR HAVE_VIDEOIO)
if(HAVE_CAMV4L2)
set(HAVE_CAMV4L2_STR "YES")
elseif(HAVE_VIDEOIO)
set(HAVE_CAMV4L2_STR "YES(videoio)")
else()
set(HAVE_CAMV4L2_STR "NO")
endif()
status(" V4L/V4L2:" HAVE_LIBV4L THEN "Using libv4l (ver ${ALIASOF_libv4l1_VERSION})"
ELSE "${HAVE_CAMV4L_STR}/${HAVE_CAMV4L2_STR}")
ELSE "${HAVE_CAMV4L_STR}/${HAVE_CAMV4L2_STR}")
endif(DEFINED WITH_V4L)
if(DEFINED WITH_VIDEOINPUT)
......
......@@ -85,18 +85,12 @@ if(WITH_XINE)
endif(WITH_XINE)
# --- V4L ---
ocv_clear_vars(HAVE_LIBV4L HAVE_CAMV4L HAVE_CAMV4L2 HAVE_IOCTL_ULONG)
ocv_clear_vars(HAVE_LIBV4L HAVE_CAMV4L HAVE_CAMV4L2 HAVE_VIDEOIO)
if(WITH_V4L)
CHECK_MODULE(libv4l1 HAVE_LIBV4L)
CHECK_INCLUDE_FILE(linux/videodev.h HAVE_CAMV4L)
CHECK_INCLUDE_FILE(linux/videodev2.h HAVE_CAMV4L2)
CHECK_INCLUDE_FILE(sys/videoio.h HAVE_VIDEOIO)
INCLUDE(CheckPrototypeDefinition)
CHECK_PROTOTYPE_DEFINITION(ioctl
"int ioctl(int d, unsigned long request, ...)"
"-1"
"sys/ioctl.h"
HAVE_IOCTL_ULONG)
endif(WITH_V4L)
# --- OpenNI ---
......
......@@ -25,9 +25,6 @@
/* V4L/V4L2 capturing support via libv4l */
#cmakedefine HAVE_LIBV4L
/* ioctl takes unsigned long request rather than int */
#cmakedefine HAVE_IOCTL_ULONG
/* Carbon windowing environment */
#cmakedefine HAVE_CARBON
......
This diff is collapsed.
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