Wykres commitów

115 Commity (97dd074595622948e456a9d8f20fb8457bd39b19)

Autor SHA1 Wiadomość Data
Olaf Meeuwissen 02b0a7e4b6 m4: Move byteorder.m4 back to m4/ directory
There is little value in putting this in its own directory just
because it is a non-generated file.
2019-07-06 21:48:15 +09:00
Olaf Meeuwissen 6d95bc191f Drop unneeded C++ compiler flag additions to AM_CXXFLAGS. Re #92
The AX_CXX_COMPILE_STDCXX_11 macro takes care of doing so if needed
already.
2019-06-16 21:43:18 +09:00
Olaf Meeuwissen a4862d8526 Predicate genesys compilation on documented variable. Re #92 2019-06-16 21:43:18 +09:00
Povilas Kanapickas 72320897d8 autotools: Move byteorder.m4 to prevent mixing with generated files 2019-06-01 14:38:36 +03:00
Povilas Kanapickas 1c3e1aa184 autotools: Remove files generated by autotools from version control 2019-06-01 14:38:36 +03:00
Povilas Kanapickas 185303a18d Enable warnings in C++ source 2019-05-19 14:09:38 +03:00
Povilas Kanapickas 42fb5a3e03 Don't compile genesys backend when C++11 is not available 2019-05-19 14:09:31 +03:00
Povilas Kanapickas b93340b862 Enable C++ in autoconf 2019-05-11 00:03:26 +03:00
Earle F. Philhower, III d90f9054c6 Add JPEG scanning, MB2100/2700 to PIXMA
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.
2018-05-10 19:11:35 -07:00
Olaf Meeuwissen 54627bdeac lib/isfdtype.c: Remove badly broken substitute
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.
2017-07-15 21:58:51 +09:00
Olaf Meeuwissen 756d286f36 pthread: Disable support if pthread_t is *not* an integer type
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.
2017-07-15 17:13:34 +09:00
Olaf Meeuwissen 23891a2646 .editorconfig: trim trailing whitespace 2017-05-29 21:14:29 +09:00
Olaf Meeuwissen 50fa8efdcf gphoto2: fix libgphoto2 logging integration
In libgphoto2-2.5.0 (tagged for release on 2012-07-10) the GPLogFunc no
longer takes a va_list.  Instead, it passes a formatted message.
2016-09-04 14:39:52 +09:00
Olaf Meeuwissen f80cf1dbbd Remove unused SANE_LINKER_RPATH macro 2016-06-14 06:01:17 +09:00
Olaf Meeuwissen e4ad1f58f3 Enable ISO C99 support for more compilers 2016-06-14 05:58:50 +09:00
Olaf Meeuwissen 309a8140e7 Improve test shell builtin invocation portability
POSIX 2008 obsoletes the -a and -o operands (according to the autoconf
documentation).
2016-06-13 22:07:02 +09:00
Olaf Meeuwissen d9e2f44113 Double quote code passed to AC_LANG_PROGRAM
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.
2016-06-13 22:06:27 +09:00
Olaf Meeuwissen d3d5dc3da0 Update to autoconf-2.69
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.
2016-06-13 22:05:34 +09:00
Olaf Meeuwissen 2d6fad58b4 Respect GNU Standards user variables
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.
2016-06-13 22:03:14 +09:00
Olaf Meeuwissen 99f7e7872f Disable use of pthreads if pthread.h cannot be found 2016-02-13 17:37:34 +09:00
Olaf Meeuwissen 0d7882e34b Change compile time warning policy
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.
2015-12-26 16:51:44 +09:00
Volker Diels-Grabsch 58052a7ce6 Change GCC mode from ISO C90 to ISO C99
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
2015-12-20 15:27:45 +09:00
Volker Diels-Grabsch 6aced758f4 Fix typos in comments
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.
2015-12-20 14:43:56 +09:00
m. allan noah 60a772ca5d sane-backends 1.0.25 2015-10-04 09:24:46 -04:00
m. allan noah a6f8a3fd9f fix configure messages for 2 backends
dell1600n_net and mustek_pp configure messages did not
match the actual tests being run. From looking at the
backends, the tests seem to be accurate.
2015-09-19 13:39:38 -04:00
Luiz Angelo Daros de Luca 8434ea9162 Define IO_SUPPORT_MISSING when inb() and outb() aren't in <sys/io.h>
Fixes link issues on OpenWRT w/ musl on MIPS.
2015-09-19 13:39:37 -04:00
Matteo Croce c83123ee46 add PNG format to scanimage 2015-09-19 12:02:57 -04:00
m. allan noah a158339c57 disable epsonds if no libjpeg 2015-08-31 21:18:30 -04:00
m. allan noah 98345c5dfe Enable pthread on linux by default
Also, Changlog entries for recent changes.
2013-08-27 21:52:17 -04:00
Chris Bagwell 05c2825f17 Default enable_dynamic to yes/no based on librarys
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.
2011-11-09 21:46:12 -06:00
m. allan noah 483b0dc488 adding new kvs40xx backend 2011-06-06 14:28:55 -04:00
Chris Bagwell 3c21ae5f70 Fix cygwin compile. Initial mingw cleanup.
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>
2010-04-07 20:43:32 -05:00
Chris Bagwell cc75fa5dc2 add --enable-rpath option to configure
Allow user to configure support for rpath compiler
option.  Ported from Fedora's sane-backend patches.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
2010-04-05 15:54:39 -05:00
m. allan noah d01f0a38f2 missing '$' 2010-02-10 19:46:51 -05:00
Chris Bagwell 41a6a5d7cd Fix and cleanup PTHREAD linking.
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.
2009-05-04 21:01:42 -05:00
m. allan noah afc0dc6ed3 * acinclude.m4, backend/gphoto2.c, configure, include/sane/config.h.in:
deal with upcoming gphoto2 interface change (patch by Chris Bagwell)
* po/sane-backends.nl.po: updates from Martin Kho
2009-04-30 13:58:35 +00:00
Chris Bagwell 9d1375fd7e * acinclude.m4, tools/sane-config.in: Add in missing libraries
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.
2009-03-03 02:53:42 +00:00
Chris Bagwell 70f3fdfba4 * acinclude.m4, backend/*.[ch], tools/*.[ch], frontend/*.[ch]:
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.
2009-02-26 03:15:43 +00:00
Chris Bagwell caba90c552 * configure.in, acinclude.ac: Cleanup autoconf 2.63 warnings.
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.
2009-02-06 03:10:44 +00:00
Chris Bagwell 0330a4d416 * aclocalm4: fix prototype of internal strcasestr and usleep.
* 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.
2009-02-02 03:17:32 +00:00
Mattias Ellert 1d21f36d9f Don't compile sanei_jpeg if libjpeg is unavailable. 2009-02-01 15:21:46 +00:00
Mattias Ellert 4dab269c71 Restore the removed DYNAMIC_FLAG configuration. 2009-02-01 13:43:26 +00:00
Chris Bagwell 674b884f29 * acinclude.m4, configure.in: Define JPEG objects based on
existence of JPEG library and not on the dc* backends alone
since more backends then that use JPEG support.
* backend/Makefile.am: whitespace fixes.
2009-01-31 20:40:42 +00:00
Chris Bagwell 23ff26f9a5 * acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided.  Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
  lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
  tools/sane-desc.c: Convert lib/ to automake.  Create a liblib.la
  for everyone to use and a libfelib.la for only frontend programs.
  Make all internal programs be prefixed with sanei_ as not to conflict
  with other programs libsane is linked in with that will also most
  likely create similar internal utils on problem platforms.
  * include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
  and link in getopt_long() but prefix it with sanei_.  Its
  easier to always use internal version then try to figure out what
  platforms support getopt_long() and what header files to use.
  * backend/Makefile.am: Convert backend makefile to automake.
  Initial version that is feature parity with original but uses
  specific rules instead of wildcards and only links in libraries/objs
  really required. Room for more cleanup of whats linked in once
  all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
Mattias Ellert 93e856b53f Cross compilation fixes and libtool update 2007-11-10 07:12:55 +00:00
Mattias Ellert c2df6b9677 Fix autogenerated files 2007-01-20 09:55:10 +00:00
Jon Chambers b584612aae added dell1600n_net to the build
removed #include <sys/select.h>
2006-05-24 20:56:15 +00:00
Henning Geinitz 947339db25 Run "makedepend" if it's available. This way "make" builds
backends correctly even if only included files (e.g. headers) are
	  changed. Don't be too verbose when running makedepend.
	  Create links libsane-*.so.1 to the real library files if the
	  links are not there. This fixes dynamic loading on OpenBSD. The
	  links are not created for MacOS X as they don't work there.
	  Remove any libsane.* links in /usr/local/lib/sane. Such links
	  are created by libtool. As they point to libsane-v4l.so,
	  scanimage -L doesn't find any scanner in case of ld.so
	  misconfigurations.
	  The install target is much quiter now and prints the libtool
	  message only once now.
2005-10-29 20:01:54 +00:00
Henning Geinitz bc30f776cc Fixed check for libpthread functions. 2005-10-17 17:50:16 +00:00
Henning Geinitz e29b6b82c5 Check for pthread_cancel() and pthread_testcancel(). 2005-10-16 20:17:19 +00:00