- in some cases atexit() doesn't work with libusb-compat
- all exit() functions are replaced by scanimage_exit()
- scanimage_exit() has a new parameter (exit status)
In the process, simplify processing the device list format: don't copy
the format string for writing \0 into it, just iterate over chunks in
the original string.
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.
using backend debugging using SANE_DEBUG_xxx to be used for saned controlled
scanning when using socket activation. When only the socket is received we
use the existing code path.
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.
The following updates were made to all directories but backends.
That still needs work. There are also still some pthread issues
and syslog is missing.
Windows doesn't support SIGHUP or SIGPIPE so make that optional.
Only include socket header files when sys/socket.h is detected.
Use winsock.h on windows.
Only include syslog.h when vsyslog() was detect by configure.
Skip FD_CLOEXEC when not supported by OS (not defined).
Only include sys/ioctl.h on platforms that define it.
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>