kopia lustrzana https://gitlab.com/sane-project/backends
Use libv4l (libv4l1) for v4l device access in the v4l backend. Gives us
limited v4l2 devices support for free through libv4l1/libv4l2/libv4lconvert.merge-requests/1/head
rodzic
4930880e8f
commit
ec46508258
|
@ -1,5 +1,8 @@
|
|||
2008-12-17 Julien Blache <jb@jblache.org>
|
||||
* backend/v4l.c: unmap mapped buffer in sane_cancel().
|
||||
* backend/v4l.c: unmap mapped buffer in sane_cancel(). Use libv4l1
|
||||
for v4l device access, buys us some support for v4l2 devices for
|
||||
free thanks to libv4l1, libv4l2 and libv4lconvert.
|
||||
* configure.in, configure: check for libv4l1 availability.
|
||||
|
||||
2008-12-15 Alex Belkin <abc@telekom.ru>
|
||||
* AUTHORS, configure, configure.in, backend/Makefile.in,
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
This file implements a SANE backend for v4l-Devices.
|
||||
*/
|
||||
|
||||
#define BUILD 4
|
||||
#define BUILD 5
|
||||
|
||||
#include "../include/sane/config.h"
|
||||
|
||||
|
@ -86,6 +86,8 @@
|
|||
|
||||
#include "v4l.h"
|
||||
|
||||
#include <libv4l1.h>
|
||||
|
||||
static const SANE_Device **devlist = NULL;
|
||||
static int num_devices;
|
||||
static V4L_Device *first_dev;
|
||||
|
@ -139,27 +141,27 @@ attach (const char *devname, V4L_Device ** devp)
|
|||
}
|
||||
|
||||
DBG (3, "attach: trying to open %s\n", devname);
|
||||
v4lfd = open (devname, O_RDWR);
|
||||
v4lfd = v4l1_open (devname, O_RDWR);
|
||||
if (v4lfd != -1)
|
||||
{
|
||||
if (ioctl (v4lfd, VIDIOCGCAP, &capability) == -1)
|
||||
if (v4l1_ioctl (v4lfd, VIDIOCGCAP, &capability) == -1)
|
||||
{
|
||||
DBG (1,
|
||||
"attach: ioctl (%d, VIDIOCGCAP,..) failed on `%s': %s\n",
|
||||
v4lfd, devname, strerror (errno));
|
||||
close (v4lfd);
|
||||
v4l1_close (v4lfd);
|
||||
return SANE_STATUS_INVAL;
|
||||
}
|
||||
if (!(VID_TYPE_CAPTURE & capability.type))
|
||||
{
|
||||
DBG (1, "attach: device %s can't capture to memory -- exiting\n",
|
||||
devname);
|
||||
close (v4lfd);
|
||||
v4l1_close (v4lfd);
|
||||
return SANE_STATUS_UNSUPPORTED;
|
||||
}
|
||||
DBG (2, "attach: found videodev `%s' on `%s'\n", capability.name,
|
||||
devname);
|
||||
close (v4lfd);
|
||||
v4l1_close (v4lfd);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -536,7 +538,7 @@ sane_open (SANE_String_Const devname, SANE_Handle * handle)
|
|||
return SANE_STATUS_INVAL;
|
||||
}
|
||||
|
||||
v4lfd = open (devname, O_RDWR);
|
||||
v4lfd = v4l1_open (devname, O_RDWR);
|
||||
if (v4lfd == -1)
|
||||
{
|
||||
DBG (1, "sane_open: can't open %s (%s)\n", devname, strerror (errno));
|
||||
|
@ -550,11 +552,11 @@ sane_open (SANE_String_Const devname, SANE_Handle * handle)
|
|||
s->devicename = devname;
|
||||
s->fd = v4lfd;
|
||||
|
||||
if (ioctl (s->fd, VIDIOCGCAP, &s->capability) == -1)
|
||||
if (v4l1_ioctl (s->fd, VIDIOCGCAP, &s->capability) == -1)
|
||||
{
|
||||
DBG (1, "sane_open: ioctl (%d, VIDIOCGCAP,..) failed on `%s': %s\n",
|
||||
s->fd, devname, strerror (errno));
|
||||
close (s->fd);
|
||||
v4l1_close (s->fd);
|
||||
return SANE_STATUS_INVAL;
|
||||
}
|
||||
|
||||
|
@ -590,7 +592,7 @@ sane_open (SANE_String_Const devname, SANE_Handle * handle)
|
|||
for (i = 0; i < max_channels; i++)
|
||||
{
|
||||
channel.channel = i;
|
||||
if (-1 == ioctl (v4lfd, VIDIOCGCHAN, &channel))
|
||||
if (-1 == v4l1_ioctl (v4lfd, VIDIOCGCHAN, &channel))
|
||||
{
|
||||
DBG (1, "sane_open: can't ioctl VIDIOCGCHAN %s: %s\n", devname,
|
||||
strerror (errno));
|
||||
|
@ -612,7 +614,7 @@ sane_open (SANE_String_Const devname, SANE_Handle * handle)
|
|||
return SANE_STATUS_NO_MEM;
|
||||
}
|
||||
s->channel[i] = 0;
|
||||
if (-1 == ioctl (v4lfd, VIDIOCGPICT, &s->pict))
|
||||
if (-1 == v4l1_ioctl (v4lfd, VIDIOCGPICT, &s->pict))
|
||||
{
|
||||
DBG (1, "sane_open: can't ioctl VIDIOCGPICT %s: %s\n", devname,
|
||||
strerror (errno));
|
||||
|
@ -625,12 +627,12 @@ sane_open (SANE_String_Const devname, SANE_Handle * handle)
|
|||
|
||||
/* ??? */
|
||||
s->pict.palette = VIDEO_PALETTE_GREY;
|
||||
if (-1 == ioctl (s->fd, VIDIOCSPICT, &s->pict))
|
||||
if (-1 == v4l1_ioctl (s->fd, VIDIOCSPICT, &s->pict))
|
||||
{
|
||||
DBG (1, "sane_open: ioctl VIDIOCSPICT failed (%s)\n", strerror (errno));
|
||||
}
|
||||
|
||||
if (-1 == ioctl (s->fd, VIDIOCGWIN, &s->window))
|
||||
if (-1 == v4l1_ioctl (s->fd, VIDIOCGWIN, &s->window))
|
||||
{
|
||||
DBG (1, "sane_open: can't ioctl VIDIOCGWIN %s: %s\n", devname,
|
||||
strerror (errno));
|
||||
|
@ -640,7 +642,7 @@ sane_open (SANE_String_Const devname, SANE_Handle * handle)
|
|||
s->window.x, s->window.y, s->window.width, s->window.height);
|
||||
|
||||
/* already done in sane_start
|
||||
if (-1 == ioctl (v4lfd, VIDIOCGMBUF, &mbuf))
|
||||
if (-1 == v4l1_ioctl (v4lfd, VIDIOCGMBUF, &mbuf))
|
||||
DBG (1, "sane_open: can't ioctl VIDIOCGMBUF (no Fbuffer?)\n");
|
||||
*/
|
||||
|
||||
|
@ -684,7 +686,7 @@ sane_close (SANE_Handle handle)
|
|||
|
||||
if (s->scanning)
|
||||
sane_cancel (handle);
|
||||
close (s->fd);
|
||||
v4l1_close (s->fd);
|
||||
free (s);
|
||||
}
|
||||
|
||||
|
@ -771,7 +773,7 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
|
|||
if (option >= OPT_TL_X && option <= OPT_BR_Y)
|
||||
{
|
||||
s->user_corner |= 1 << (option - OPT_TL_X);
|
||||
if (-1 == ioctl (s->fd, VIDIOCGWIN, &s->window))
|
||||
if (-1 == v4l1_ioctl (s->fd, VIDIOCGWIN, &s->window))
|
||||
{
|
||||
DBG (1, "sane_control_option: ioctl VIDIOCGWIN failed "
|
||||
"(can not get window geometry)\n");
|
||||
|
@ -848,13 +850,13 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
|
|||
if (strcmp (s->channel[i], val) == 0)
|
||||
{
|
||||
channel.channel = i;
|
||||
if (-1 == ioctl (s->fd, VIDIOCGCHAN, &channel))
|
||||
if (-1 == v4l1_ioctl (s->fd, VIDIOCGCHAN, &channel))
|
||||
{
|
||||
DBG (1, "sane_open: can't ioctl VIDIOCGCHAN %s: %s\n",
|
||||
s->devicename, strerror (errno));
|
||||
return SANE_STATUS_INVAL;
|
||||
}
|
||||
if (-1 == ioctl (s->fd, VIDIOCSCHAN, &channel))
|
||||
if (-1 == v4l1_ioctl (s->fd, VIDIOCSCHAN, &channel))
|
||||
{
|
||||
DBG (1, "sane_open: can't ioctl VIDIOCSCHAN %s: %s\n",
|
||||
s->devicename, strerror (errno));
|
||||
|
@ -872,13 +874,13 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
|
|||
}
|
||||
if (option >= OPT_TL_X && option <= OPT_BR_Y)
|
||||
{
|
||||
if (-1 == ioctl (s->fd, VIDIOCSWIN, &s->window))
|
||||
if (-1 == v4l1_ioctl (s->fd, VIDIOCSWIN, &s->window))
|
||||
{
|
||||
DBG (1, "sane_control_option: ioctl VIDIOCSWIN failed (%s)\n",
|
||||
strerror (errno));
|
||||
/* return SANE_STATUS_INVAL; */
|
||||
}
|
||||
if (-1 == ioctl (s->fd, VIDIOCGWIN, &s->window))
|
||||
if (-1 == v4l1_ioctl (s->fd, VIDIOCGWIN, &s->window))
|
||||
{
|
||||
DBG (1, "sane_control_option: ioctl VIDIOCGWIN failed (%s)\n",
|
||||
strerror (errno));
|
||||
|
@ -887,7 +889,7 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
|
|||
}
|
||||
if (option >= OPT_BRIGHTNESS && option <= OPT_WHITE_LEVEL)
|
||||
{
|
||||
if (-1 == ioctl (s->fd, VIDIOCSPICT, &s->pict))
|
||||
if (-1 == v4l1_ioctl (s->fd, VIDIOCSPICT, &s->pict))
|
||||
{
|
||||
DBG (1, "sane_control_option: ioctl VIDIOCSPICT failed (%s)\n",
|
||||
strerror (errno));
|
||||
|
@ -928,7 +930,7 @@ sane_get_parameters (SANE_Handle handle, SANE_Parameters * params)
|
|||
DBG (1, "sane_get_parameters: params == 0\n");
|
||||
return SANE_STATUS_INVAL;
|
||||
}
|
||||
if (-1 == ioctl (s->fd, VIDIOCGWIN, &s->window))
|
||||
if (-1 == v4l1_ioctl (s->fd, VIDIOCGWIN, &s->window))
|
||||
{
|
||||
DBG (1, "sane_control_option: ioctl VIDIOCGWIN failed "
|
||||
"(can not get window geometry)\n");
|
||||
|
@ -961,14 +963,14 @@ sane_start (SANE_Handle handle)
|
|||
DBG (1, "sane_start: bad handle %p\n", handle);
|
||||
return SANE_STATUS_INVAL; /* oops, not a handle we know about */
|
||||
}
|
||||
len = ioctl (s->fd, VIDIOCGCAP, &s->capability);
|
||||
len = v4l1_ioctl (s->fd, VIDIOCGCAP, &s->capability);
|
||||
if (-1 == len)
|
||||
{
|
||||
DBG (1, "sane_start: can not get capabilities\n");
|
||||
return SANE_STATUS_INVAL;
|
||||
}
|
||||
s->buffercount = 0;
|
||||
if (-1 == ioctl (s->fd, VIDIOCGMBUF, &s->mbuf))
|
||||
if (-1 == v4l1_ioctl (s->fd, VIDIOCGMBUF, &s->mbuf))
|
||||
{
|
||||
s->is_mmap = SANE_FALSE;
|
||||
buffer =
|
||||
|
@ -977,7 +979,7 @@ sane_start (SANE_Handle handle)
|
|||
if (0 == buffer)
|
||||
return SANE_STATUS_NO_MEM;
|
||||
DBG (3, "sane_start: V4L trying to read frame\n");
|
||||
len = read (s->fd, buffer, parms.bytes_per_line * parms.lines);
|
||||
len = v4l1_read (s->fd, buffer, parms.bytes_per_line * parms.lines);
|
||||
DBG (3, "sane_start: %d bytes read\n", len);
|
||||
}
|
||||
else
|
||||
|
@ -987,10 +989,11 @@ sane_start (SANE_Handle handle)
|
|||
"sane_start: mmap frame, buffersize: %d bytes, buffers: %d, offset 0 %d\n",
|
||||
s->mbuf.size, s->mbuf.frames, s->mbuf.offsets[0]);
|
||||
buffer =
|
||||
mmap (0, s->mbuf.size, PROT_READ | PROT_WRITE, MAP_SHARED, s->fd, 0);
|
||||
v4l1_mmap (0, s->mbuf.size, PROT_READ | PROT_WRITE, MAP_SHARED, s->fd, 0);
|
||||
if (buffer == (void *)-1)
|
||||
{
|
||||
DBG (1, "sane_start: mmap failed: %s\n", strerror (errno));
|
||||
buffer = NULL;
|
||||
return SANE_STATUS_IO_ERROR;
|
||||
}
|
||||
DBG (3, "sane_start: mmapped frame, capture 1 pict into %p\n", buffer);
|
||||
|
@ -1000,9 +1003,9 @@ sane_start (SANE_Handle handle)
|
|||
s->mmap.height = s->window.height;
|
||||
/* s->mmap.height = parms.lines; ??? huh? */
|
||||
s->mmap.format = s->pict.palette;
|
||||
DBG (2, "sane_start: mmappeded frame %d x %d with palette %d\n",
|
||||
DBG (2, "sane_start: mmapped frame %d x %d with palette %d\n",
|
||||
s->mmap.width, s->mmap.height, s->mmap.format);
|
||||
len = ioctl (s->fd, VIDIOCMCAPTURE, &s->mmap);
|
||||
len = v4l1_ioctl (s->fd, VIDIOCMCAPTURE, &s->mmap);
|
||||
if (len == -1)
|
||||
{
|
||||
DBG (1, "sane_start: ioctl VIDIOCMCAPTURE failed: %s\n",
|
||||
|
@ -1010,7 +1013,7 @@ sane_start (SANE_Handle handle)
|
|||
return SANE_STATUS_INVAL;
|
||||
}
|
||||
DBG (3, "sane_start: waiting for frame %x\n", s->mmap.frame);
|
||||
len = ioctl (s->fd, VIDIOCSYNC, &(s->mmap.frame));
|
||||
len = v4l1_ioctl (s->fd, VIDIOCSYNC, &(s->mmap.frame));
|
||||
if (-1 == len)
|
||||
{
|
||||
DBG (1, "sane_start: call to ioctl(%d, VIDIOCSYNC, ..) failed\n",
|
||||
|
@ -1053,7 +1056,7 @@ sane_read (SANE_Handle handle, SANE_Byte * buf, SANE_Int max_len,
|
|||
*lenp = (parms.lines * parms.bytes_per_line - s->buffercount);
|
||||
if (max_len < *lenp)
|
||||
*lenp = max_len;
|
||||
DBG (3, "sane_read: tranfered %d bytes (from %d to %d)\n", *lenp,
|
||||
DBG (3, "sane_read: transferred %d bytes (from %d to %d)\n", *lenp,
|
||||
s->buffercount, i);
|
||||
s->buffercount = i;
|
||||
}
|
||||
|
@ -1066,7 +1069,7 @@ sane_read (SANE_Handle handle, SANE_Byte * buf, SANE_Int max_len,
|
|||
*lenp = (parms.lines * parms.bytes_per_line - s->buffercount);
|
||||
if ((i - s->buffercount) < *lenp)
|
||||
*lenp = (i - s->buffercount);
|
||||
DBG (3, "sane_read: tranfered %d bytes (from %d to %d)\n", *lenp,
|
||||
DBG (3, "sane_read: transferred %d bytes (from %d to %d)\n", *lenp,
|
||||
s->buffercount, i);
|
||||
s->buffercount = i;
|
||||
}
|
||||
|
@ -1079,11 +1082,12 @@ sane_cancel (SANE_Handle handle)
|
|||
V4L_Scanner *s = handle;
|
||||
|
||||
DBG (2, "sane_cancel\n");
|
||||
|
||||
/* ??? buffer isn't checked in sane_read? */
|
||||
if (buffer)
|
||||
{
|
||||
if (s->is_mmap)
|
||||
munmap (buffer, s->mbuf.size);
|
||||
v4l1_munmap(buffer, s->mbuf.size);
|
||||
else
|
||||
free (buffer);
|
||||
|
||||
|
|
|
@ -854,6 +854,8 @@ LOCKPATH_GROUP
|
|||
HAVE_GPHOTO2
|
||||
GPHOTO2_LDFLAGS
|
||||
PKG_CONFIG
|
||||
libv4l1_CFLAGS
|
||||
libv4l1_LIBS
|
||||
AVAHI_CFLAGS
|
||||
AVAHI_LIBS
|
||||
ALLOCA
|
||||
|
@ -898,6 +900,8 @@ LIBS
|
|||
CPPFLAGS
|
||||
CPP
|
||||
PKG_CONFIG
|
||||
libv4l1_CFLAGS
|
||||
libv4l1_LIBS
|
||||
AVAHI_CFLAGS
|
||||
AVAHI_LIBS
|
||||
CXX
|
||||
|
@ -1534,6 +1538,10 @@ Some influential environment variables:
|
|||
you have headers in a nonstandard directory <include dir>
|
||||
CPP C preprocessor
|
||||
PKG_CONFIG path to pkg-config utility
|
||||
libv4l1_CFLAGS
|
||||
C compiler flags for libv4l1, overriding pkg-config
|
||||
libv4l1_LIBS
|
||||
linker flags for libv4l1, overriding pkg-config
|
||||
AVAHI_CFLAGS
|
||||
C compiler flags for AVAHI, overriding pkg-config
|
||||
AVAHI_LIBS linker flags for AVAHI, overriding pkg-config
|
||||
|
@ -8180,15 +8188,6 @@ done
|
|||
|
||||
|
||||
|
||||
# Check whether --enable-avahi was given.
|
||||
if test "${enable_avahi+set}" = set; then
|
||||
enableval=$enable_avahi; enable_avahi=$enableval
|
||||
else
|
||||
enable_avahi=no
|
||||
fi
|
||||
|
||||
|
||||
if test "$enable_avahi" = "yes"; then
|
||||
|
||||
|
||||
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
|
||||
|
@ -8310,6 +8309,89 @@ echo "${ECHO_T}no" >&6; }
|
|||
|
||||
fi
|
||||
|
||||
pkg_failed=no
|
||||
{ echo "$as_me:$LINENO: checking for libv4l1" >&5
|
||||
echo $ECHO_N "checking for libv4l1... $ECHO_C" >&6; }
|
||||
|
||||
if test -n "$PKG_CONFIG"; then
|
||||
if test -n "$libv4l1_CFLAGS"; then
|
||||
pkg_cv_libv4l1_CFLAGS="$libv4l1_CFLAGS"
|
||||
else
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" libv4l1 \"") >&5
|
||||
($PKG_CONFIG --exists --print-errors " libv4l1 ") 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; then
|
||||
pkg_cv_libv4l1_CFLAGS=`$PKG_CONFIG --cflags " libv4l1 " 2>/dev/null`
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
if test -n "$PKG_CONFIG"; then
|
||||
if test -n "$libv4l1_LIBS"; then
|
||||
pkg_cv_libv4l1_LIBS="$libv4l1_LIBS"
|
||||
else
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" libv4l1 \"") >&5
|
||||
($PKG_CONFIG --exists --print-errors " libv4l1 ") 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; then
|
||||
pkg_cv_libv4l1_LIBS=`$PKG_CONFIG --libs " libv4l1 " 2>/dev/null`
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
_pkg_short_errors_supported=yes
|
||||
else
|
||||
_pkg_short_errors_supported=no
|
||||
fi
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
libv4l1_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors " libv4l1 "`
|
||||
else
|
||||
libv4l1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors " libv4l1 "`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$libv4l1_PKG_ERRORS" >&5
|
||||
|
||||
{ echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6; }
|
||||
have_libv4l1=no
|
||||
elif test $pkg_failed = untried; then
|
||||
have_libv4l1=no
|
||||
else
|
||||
libv4l1_CFLAGS=$pkg_cv_libv4l1_CFLAGS
|
||||
libv4l1_LIBS=$pkg_cv_libv4l1_LIBS
|
||||
{ echo "$as_me:$LINENO: result: yes" >&5
|
||||
echo "${ECHO_T}yes" >&6; }
|
||||
LIBS="${LIBS} ${libv4l1_LIBS}"
|
||||
CFLAGS="${CFLAGS} ${libv4l1_CFLAGS}"
|
||||
have_libv4l1=yes
|
||||
fi
|
||||
|
||||
# Check whether --enable-avahi was given.
|
||||
if test "${enable_avahi+set}" = set; then
|
||||
enableval=$enable_avahi; enable_avahi=$enableval
|
||||
else
|
||||
enable_avahi=no
|
||||
fi
|
||||
|
||||
|
||||
if test "$enable_avahi" = "yes"; then
|
||||
|
||||
pkg_failed=no
|
||||
{ echo "$as_me:$LINENO: checking for AVAHI" >&5
|
||||
echo $ECHO_N "checking for AVAHI... $ECHO_C" >&6; }
|
||||
|
@ -8675,6 +8757,7 @@ fi
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
for ac_header in fcntl.h unistd.h libc.h sys/dsreq.h sys/select.h \
|
||||
|
@ -8688,7 +8771,7 @@ for ac_header in fcntl.h unistd.h libc.h sys/dsreq.h sys/select.h \
|
|||
IOKit/cdb/IOSCSILib.h IOKit/scsi/SCSICommandOperationCodes.h \
|
||||
IOKit/scsi-commands/SCSICommandOperationCodes.h \
|
||||
windows.h be/kernel/OS.h be/drivers/USB_scanner.h limits.h sys/ioctl.h asm/types.h\
|
||||
netinet/in.h tiffio.h ifaddrs.h
|
||||
netinet/in.h tiffio.h ifaddrs.h pwd.h
|
||||
do
|
||||
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
|
||||
|
@ -12645,7 +12728,7 @@ ia64-*-hpux*)
|
|||
;;
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
echo '#line 12648 "configure"' > conftest.$ac_ext
|
||||
echo '#line 12731 "configure"' > conftest.$ac_ext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -15088,11 +15171,11 @@ else
|
|||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:15091: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:15174: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:15095: \$? = $ac_status" >&5
|
||||
echo "$as_me:15178: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings other than the usual output.
|
||||
|
@ -15356,11 +15439,11 @@ else
|
|||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:15359: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:15442: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:15363: \$? = $ac_status" >&5
|
||||
echo "$as_me:15446: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings other than the usual output.
|
||||
|
@ -15460,11 +15543,11 @@ else
|
|||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:15463: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:15546: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:15467: \$? = $ac_status" >&5
|
||||
echo "$as_me:15550: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
|
@ -17768,7 +17851,7 @@ else
|
|||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 17771 "configure"
|
||||
#line 17854 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
@ -17868,7 +17951,7 @@ else
|
|||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 17871 "configure"
|
||||
#line 17954 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
@ -20208,11 +20291,11 @@ else
|
|||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:20211: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:20294: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:20215: \$? = $ac_status" >&5
|
||||
echo "$as_me:20298: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings other than the usual output.
|
||||
|
@ -20312,11 +20395,11 @@ else
|
|||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:20315: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:20398: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:20319: \$? = $ac_status" >&5
|
||||
echo "$as_me:20402: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
|
@ -21882,11 +21965,11 @@ else
|
|||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:21885: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:21968: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:21889: \$? = $ac_status" >&5
|
||||
echo "$as_me:21972: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings other than the usual output.
|
||||
|
@ -21986,11 +22069,11 @@ else
|
|||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:21989: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:22072: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:21993: \$? = $ac_status" >&5
|
||||
echo "$as_me:22076: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
|
@ -24188,11 +24271,11 @@ else
|
|||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:24191: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:24274: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:24195: \$? = $ac_status" >&5
|
||||
echo "$as_me:24278: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings other than the usual output.
|
||||
|
@ -24456,11 +24539,11 @@ else
|
|||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:24459: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:24542: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:24463: \$? = $ac_status" >&5
|
||||
echo "$as_me:24546: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings other than the usual output.
|
||||
|
@ -24560,11 +24643,11 @@ else
|
|||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:24563: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:24646: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:24567: \$? = $ac_status" >&5
|
||||
echo "$as_me:24650: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
|
@ -27341,7 +27424,7 @@ echo "$as_me: Manually selected backends: ${BACKENDS}" >&6;}
|
|||
BACKENDS="${BACKENDS} qcam"
|
||||
fi
|
||||
|
||||
if test "${have_linux_ioctl_defines}" != "yes"
|
||||
if test "${have_linux_ioctl_defines}" != "yes" || test "${have_libv4l1}" != "yes"
|
||||
then
|
||||
echo "*** disabling v4l (Video for Linux) backend"
|
||||
else
|
||||
|
@ -28185,6 +28268,8 @@ LOCKPATH_GROUP!$LOCKPATH_GROUP$ac_delim
|
|||
HAVE_GPHOTO2!$HAVE_GPHOTO2$ac_delim
|
||||
GPHOTO2_LDFLAGS!$GPHOTO2_LDFLAGS$ac_delim
|
||||
PKG_CONFIG!$PKG_CONFIG$ac_delim
|
||||
libv4l1_CFLAGS!$libv4l1_CFLAGS$ac_delim
|
||||
libv4l1_LIBS!$libv4l1_LIBS$ac_delim
|
||||
AVAHI_CFLAGS!$AVAHI_CFLAGS$ac_delim
|
||||
AVAHI_LIBS!$AVAHI_LIBS$ac_delim
|
||||
ALLOCA!$ALLOCA$ac_delim
|
||||
|
@ -28194,8 +28279,6 @@ ECHO!$ECHO$ac_delim
|
|||
AR!$AR$ac_delim
|
||||
RANLIB!$RANLIB$ac_delim
|
||||
STRIP!$STRIP$ac_delim
|
||||
DLLTOOL!$DLLTOOL$ac_delim
|
||||
AS!$AS$ac_delim
|
||||
_ACEOF
|
||||
|
||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
|
||||
|
@ -28237,6 +28320,8 @@ _ACEOF
|
|||
ac_delim='%!_!# '
|
||||
for ac_last_try in false false false false false :; do
|
||||
cat >conf$$subs.sed <<_ACEOF
|
||||
DLLTOOL!$DLLTOOL$ac_delim
|
||||
AS!$AS$ac_delim
|
||||
OBJDUMP!$OBJDUMP$ac_delim
|
||||
CXX!$CXX$ac_delim
|
||||
CXXFLAGS!$CXXFLAGS$ac_delim
|
||||
|
@ -28261,7 +28346,7 @@ DISTCLEAN_FILES!$DISTCLEAN_FILES$ac_delim
|
|||
LTLIBOBJS!$LTLIBOBJS$ac_delim
|
||||
_ACEOF
|
||||
|
||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 22; then
|
||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then
|
||||
break
|
||||
elif $ac_last_try; then
|
||||
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
|
||||
|
|
|
@ -117,6 +117,12 @@ SANE_CHECK_LOCKING
|
|||
SANE_CHECK_GPHOTO2
|
||||
|
||||
|
||||
PKG_CHECK_MODULES(libv4l1, [ libv4l1 ],
|
||||
[ LIBS="${LIBS} ${libv4l1_LIBS}"
|
||||
CFLAGS="${CFLAGS} ${libv4l1_CFLAGS}"
|
||||
have_libv4l1=yes ],
|
||||
[ have_libv4l1=no ])
|
||||
|
||||
AC_ARG_ENABLE(avahi,
|
||||
AC_HELP_STRING([--enable-avahi], [enable Avahi support for saned and the net backend]),
|
||||
[enable_avahi=$enableval], [enable_avahi=no])
|
||||
|
@ -449,7 +455,7 @@ else
|
|||
BACKENDS="${BACKENDS} qcam"
|
||||
fi
|
||||
|
||||
if test "${have_linux_ioctl_defines}" != "yes"
|
||||
if test "${have_linux_ioctl_defines}" != "yes" || test "${have_libv4l1}" != "yes"
|
||||
then
|
||||
echo "*** disabling v4l (Video for Linux) backend"
|
||||
else
|
||||
|
|
Ładowanie…
Reference in New Issue