Use of the STDC_HEADER pre-processor macro that the autoconf macro
used to define has been removed. Conditionalized code is now used
unconditionally. This should be fine as the macro checks for ANSI
C, i.e. C89 (ISO C90), compliant headers. We already require C99.
This aims to clarify the purpose of each parameter: SANEI_THREAD_LIBS
for any code that uses sanei/sanei_thread.c and a plain PTHREAD_LIBS
for code that uses the pthread library directly.
The use of pthreads was disabled in case of a non-integral pthread_t
type in 756d286f36 as the sanei_thread
implementation assumes an integral type. This also disabled building
of the kvs40xx and mustek_usb2 backends which use pthreads directly.
This re-enables the build of these backends.
The Maxify scanners seem to only be able to return JPEG data for ADF
sources. Attempting to send a gamma LUT will result in an error on
sane_start when trying to use the ADF. Flatbed scanning is unaffected
and runs fine with LUTs like prior models.
This patch adds support to the PIXMA backend for returned JPEG scans
and keys it off of the new capability, ADF_JPEG.
Tested on a Maxify MB2120 using the ADF and the flatbed scanner.
This may also fix other Maxify MB* models where it seems the ADF does
not with with the prior code, but I only have the MB2120 to test.
The substitute completely ignores the fdtype argument and only works
correctly for S_IFSOCK values. This happened to be the only way the
function was invoked but for safety's sake this has been replaced by
a local implementation that does pretty much the same thing, without
the misleading bit.
Found courtesy of a [-Wunused-parameter] compiler warning on Alpine.
The sanei_thread implementation assumes an integer type in case of
pthread based thread support. As anything else is unlikely to work
correctly, it's safer to just fall back to forked processes.
Upon re-reading the autoconf documentation, this seemed the right thing
to do. The AC_LANG_PROGRAM macro does not quote its arguments so any
occurence of [ and ] will get stripped out if not double quoted.
Current code snippets passed do not use them but it is better to use a
consistent quoting approach for such snippets. In other places in the
configure.ac file double quoting is used already.
This gets rid of a number of obsoleted macros and replaces RETSIGTYPE
with a void literal which can be assumed for C89 and later.
This changeset was prepared using autoupdate and modified to get rid of
whitespace and doubled [] changes. Changes to acinclude.m4 were added
by hand.
Several variables are considered "user variables" by the GNU Standards.
This means that the user can pass these to their ./configure and make
invocations as they see fit. These variables include CPPFLAGS, CFLAGS
and LDFLAGS.
This changeset pushes our use of these variables to the automake shadow
variables, AM_CPPFLAGS, AM_CFLAGS and AM_LDFLAGS, so that user variables
will no longer clobber flags required in order to build.
The -Wall flag is now always enabled (when using gcc). The -Wextra
flag (previously known as -W) and -pedantic flags are, by default,
enabled during development but disabled for releases.
All other flags have been removed.
Add GCC flag "-std=c99". Also remove GCC flag "-ansi" which is an
alias for "-std=c90" and would make the flag "-std=c99" ineffective.
This fixes all occurrences of the following GCC warning:
warning: ISO C90 does not support '__func__' predefined identifier
While reading through the SANE sources I noticed some annoying typos
in the comments. This patch is my contribution to make the SANE
sources slightly more pleasant to read.
My previous try was always defaulting to "yes" and user
and to manually specify --disable-dynamic to work correctly
on platforms that didn't support dynamic loading.
cygwin and mingw is now hiding M_PI_2 defines with -ansi flag.
Remove to fix cygwin compile.
Mingw doesn't support fork() so default to pthreads.
Add u_short to complete definition of u_* types which helps out mingw
when we define _BSDTYPES_DEFINED.
Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Allow user to configure support for rpath compiler
option. Ported from Fedora's sane-backend patches.
Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Add in missing $PTHREAD_LIBS to all backends that can make use of it.
Rename --enable-fork-process to --enable-pthread to maatch internal
logic. Also, stop linking in pthreads needlessly if its been
disabled.
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.
Global replace of u_int??_t with C9x standard based uintxx_t
in order to remove some tricky and overlapping portability logic
from acinclude.m4 and leave it in only m4/stdint.m4.
add cv_ prefix to cached variable. Remove AC_ARG_PROGRAM as
automake already invokes this. When prefered AC_USE_SYSTEM_EXTENSIONS
exists, use that instead of AC_GNU_SOURCE/AC_AIX/AC_MINUX.
Cleanup socket detection more by creating only a single
SOCKET_LIBS that contains list of all optional libraries
for any socket related funciton. Make sure that checks
for socket related functions use SOCKET_LIBS when searching.
Check for getopt_long() and getopt.h. Make OS/2 use
-no-undefined (same as windows).
* ltmain.sh, m4/libtool.m4: Upgrade to libtool 1.5.26.
* Makefile.am: Cleanups to match configure updates.
* frontend/scanimage.c, include/Makefile.in, lib/getopt.c
lib/getopt1.c, toosl/sane-desc.c, include/lgetopt.h:
Rename internal getopt.h to lgetopt.h to allow using
external getopt.h when it exists. This allows to go
back to optionally compiling getopt()/getopt_long() and its
prototypes and not have conflicts with external headers/symbols.
* configure.in: Group all USB logic together and all SCSI
logic together to aid understanding of whats no longer
valid. Allow sharing enable/disable options between all
USB drivers on multiple platforms. Combined CAM_LIBS and
SCSI_LIBS since they are mutually exclusive.
Skip some USB/SCSI checks when previous tests show it will always fail.
* backend/Makefile.am, tools/Makefile.in: Combine CAM_LIBS and
SCSI_LIBS. Add missing SOCKET_LIBS to epson2. Add USB_LIB.
* saned.c: Add limits.h for PATH_MAX.