Regenerate testsuite reference data which was necessary after these
fixes:
- commit 3b96baef65
"sane-desc: fix udev hwdb generation"
- commit 758731489d
"sane-desc: fix faulty udev logic for SCSI devices"
libusb on my Linux box is returning EACCES error when invalid
permissions exist. Modify open to translate that into
SANE_STATUS_ECCESS_DENIED since that error description is
used for this case.
Modify sanei_usb_test.c to not treat access denied or busy
error codes as real failures since its expected to occur on
boxes that USB device is already claimed by another driver
and if that device uses default root only permissions.
strcmp() does not protect against NULL pointers and is
crashing on at least OS X for the fake devices we are creating
by setting device_number to MAX value.
Add a fake empty string to prevent this.
This lets test pass even when ran from a different location.
Also, added missing data files to distribution list.
These two things lets this test case pass when ran using "make distcheck".
Improving here means do not set LIBS/CFLAGS if library is not detected.
This prevents some unknown options based to ld when host is Linux and
target is mingw32/64. Further improvements are needed if one wants this
snmp support when cross compiling to really work.
Also, to make commit bisectable, updated all autofoo files using
'autoreconf -i -f' and repatching ltmain.sh.
Also, test-driver was missing from git repo but the Makefile.in
checked in expected it to exist.
- fixed a bug in sanei_constrain_value spotted by
viresh_shirol@yahoo.co.uk where range max was exceeded due to rounding
in quantization
- added test case for sane fixed values range
udev now comes with a hardware database (hwdb) which is meant to replace large
rule files as the one typically shipped with sane. This should significantly
speed up the processing of usb add events.
Add the required output format and add a special udev output mode which is
produces the udev file to be used with hwdb.
Sample hwdb file: <https://dev.archlinux.org/~tomegun/20-sane.hwdb>.
Sample udev+hwdb rules file:
<https://dev.archlinux.org/~tomegun/53-sane.rules>.
Similar support was recently added to gphoto2:
<http://sourceforge.net/p/gphoto/code/14490/>.
The new udev rules file does not support old udev/kernels as these anyway
don't support hwdb.
Moreover, it does not come with GROUP=/MODE= or ACL support as this can easily
be done externally by hooking into the libsane_matched envvar. In particular
systemd-logind uses this to do its own ACL handling.
Options were in README but removed at some point. They
are useful so add them back.
Document BACKENDS and PRELOADABLE_BACKENDS variables in
README as well as in configure --help output.
Add check for winsock2.h for socket.h replancement. Also, use this
check to add ws2_32 library. Also, switch all winsock.h references
to winsock2.h.
Add check for getuid and getpass; which are not on mingw.
Add a syslog() replacement that is basically a print(). This
is also used by vsyslog() replacement.
Comment out parts of replacement sigprocmask.c on mingw.
To support these configure.in changes, I need to rebuild all
related files with autoconf 2.68 and libtool 2.4. Hand ported
our sane-backend specific changes to newer ltmain.sh.
resmgr library is only used (optionally) by
sanei_usb and sanei_scsi. So only need to
link it in for those backends. This was
a stray piece from initial cleanup of LIBS
in sane-backends 1.0.20.
Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
with newer automake.
* backend/Makefile.am, tools/sane-config.in: Add missing
$GPHOTO2_LDFLAGS so library can be found.
* tools/Makefile.am: Add mising $SCSI_LIBS to sane-find-scanner.
to sane-config missed during fix to stop using LIBS to link everything.
Add back in code to move LDFLAGS out of $GPHOTO2_LIBS and into
GPHOTO2_LDFLAGS.
Fix a few bugs with "all" and "uninstall" targets to work when
$(builddir) != $(srcdir). Added $(DESTDIR) to uninstall target.
Made $(distdir) related to current directory to match automake.