kopia lustrzana https://gitlab.com/sane-project/backends
Handle libtiff the same way as libpng and libjpeg
libtiff is the odd one out where support was detected in two places and it was handled a different way than the other two.merge-requests/880/head
rodzic
edc3763f57
commit
bfb4cc7f38
|
@ -313,6 +313,9 @@ AC_DEFUN([SANE_CHECK_TIFF],
|
|||
AC_CHECK_HEADER(tiffio.h,
|
||||
[sane_cv_use_libtiff="yes"; TIFF_LIBS="-ltiff"],)
|
||||
],)
|
||||
if test "$sane_cv_use_libtiff" = "yes" ; then
|
||||
AC_DEFINE(HAVE_LIBTIFF,1,[Define to 1 if you have the libtiff library.])
|
||||
fi
|
||||
AC_SUBST(TIFF_LIBS)
|
||||
])
|
||||
|
||||
|
|
|
@ -232,7 +232,7 @@ find_valor_of_array_variables(xmlNode *node, capabilities_t *scanner, int type)
|
|||
scanner->caps[type].have_png = i;
|
||||
}
|
||||
#endif
|
||||
#if(defined HAVE_TIFFIO_H)
|
||||
#if(defined HAVE_LIBTIFF)
|
||||
else if(!strcmp(scanner->caps[type].DocumentFormats[i], "image/tiff"))
|
||||
{
|
||||
have_tiff = SANE_TRUE;
|
||||
|
|
|
@ -35,14 +35,14 @@
|
|||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if(defined HAVE_TIFFIO_H)
|
||||
#if(defined HAVE_LIBTIFF)
|
||||
#include <tiffio.h>
|
||||
#endif
|
||||
|
||||
#include <setjmp.h>
|
||||
|
||||
|
||||
#if(defined HAVE_TIFFIO_H)
|
||||
#if(defined HAVE_LIBTIFF)
|
||||
|
||||
/**
|
||||
* \fn SANE_Status escl_sane_decompressor(escl_sane_t *handler)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include "image.h"
|
||||
|
||||
#if defined(HAVE_TIFFIO_H)
|
||||
#if defined(HAVE_LIBTIFF)
|
||||
#include <tiffio.h>
|
||||
#endif
|
||||
|
||||
|
@ -187,7 +187,7 @@ void write_tiff_file(const std::string& filename, const void* data, int depth, i
|
|||
{
|
||||
DBG_HELPER_ARGS(dbg, "depth=%d, channels=%d, ppl=%d, lines=%d", depth, channels,
|
||||
pixels_per_line, lines);
|
||||
#if defined(HAVE_TIFFIO_H)
|
||||
#if defined(HAVE_LIBTIFF)
|
||||
auto image = TIFFOpen(filename.c_str(), "w");
|
||||
if (!image) {
|
||||
dbg.log(DBG_error, "Could not save debug image");
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
#define DBG_BLK 0x04 /* USB Bulk data */
|
||||
|
||||
#include <stdarg.h>
|
||||
#ifdef HAVE_TIFFIO_H
|
||||
#ifdef HAVE_LIBTIFF
|
||||
#include <tiffio.h> /* dbg_tiff_save */
|
||||
#endif
|
||||
|
||||
|
@ -545,7 +545,7 @@ dbg_tiff_save (char *sFile, SANE_Int width, SANE_Int height, SANE_Int depth,
|
|||
SANE_Int colortype, SANE_Int res_x, SANE_Int res_y,
|
||||
SANE_Byte * buffer, SANE_Int size)
|
||||
{
|
||||
#ifdef HAVE_TIFFIO_H
|
||||
#ifdef HAVE_LIBTIFF
|
||||
if (buffer != NULL)
|
||||
{
|
||||
char *path = getenv ("HOME");
|
||||
|
|
|
@ -201,7 +201,7 @@ AC_CHECK_HEADERS(fcntl.h unistd.h libc.h sys/dsreq.h sys/select.h \
|
|||
sys/socket.h sys/io.h sys/hw.h sys/types.h linux/ppdev.h \
|
||||
dev/ppbus/ppi.h machine/cpufunc.h sys/sem.h poll.h \
|
||||
windows.h be/kernel/OS.h limits.h sys/ioctl.h asm/types.h\
|
||||
netinet/in.h tiffio.h ifaddrs.h pwd.h getopt.h)
|
||||
netinet/in.h ifaddrs.h pwd.h getopt.h)
|
||||
AC_CHECK_HEADERS([asm/io.h],,,[#include <sys/types.h>])
|
||||
|
||||
SANE_CHECK_MISSING_HEADERS
|
||||
|
|
Ładowanie…
Reference in New Issue