1 /* $Header: /cvsroot/osrs/libtiff/libtiff/tiffconf.h,v 1.8 2003/12/26 10:20:03 dron Exp $ */ 2 /* 3 * Copyright (c) 1988-1997 Sam Leffler 4 * Copyright (c) 1991-1997 Silicon Graphics, Inc. 5 * 6 * Permission to use, copy, modify, distribute, and sell this software and 7 * its documentation for any purpose is hereby granted without fee, provided 8 * that (i) the above copyright notices and this permission notice appear in 9 * all copies of the software and related documentation, and (ii) the names of 10 * Sam Leffler and Silicon Graphics may not be used in any advertising or 11 * publicity relating to the software without the specific, prior written 12 * permission of Sam Leffler and Silicon Graphics. 13 * 14 * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 15 * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 16 * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 17 * 18 * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR 19 * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, 20 * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 21 * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 22 * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 23 * OF THIS SOFTWARE. 24 */ 25 26 #ifndef _TIFFCONF_ 27 #define _TIFFCONF_ 28 /* 29 * Library Configuration Definitions. 30 * 31 * This file defines the default configuration for the library. 32 * If the target system does not have make or a way to specify 33 * #defines on the command line, this file can be edited to 34 * configure the library. Otherwise, one can override portability 35 * and configuration-related definitions from a Makefile or command 36 * line by defining COMPRESSION_SUPPORT (see below). 37 */ 38 39 /* 40 * General portability-related defines: 41 * 42 * HAVE_IEEEFP define as 0 or 1 according to the floating point 43 * format suported by the machine 44 * BSDTYPES define this if your system does NOT define the 45 * usual 4BSD typedefs u_int et. al. 46 * HAVE_MMAP enable support for memory mapping read-only files; 47 * this is typically deduced by the configure script 48 * HOST_FILLORDER native cpu bit order: one of FILLORDER_MSB2LSB 49 * or FILLODER_LSB2MSB; this is typically set by the 50 * configure script 51 * HOST_BIGENDIAN native cpu byte order: 1 if big-endian (Motorola) 52 * or 0 if little-endian (Intel); this may be used 53 * in codecs to optimize code 54 * USE_64BIT_API set to 1 if tif_unix.c should use lseek64(), 55 * fstat64() and stat64 allowing 2-4GB files. 56 */ 57 #ifndef HAVE_IEEEFP 58 #define HAVE_IEEEFP 1 59 #endif 60 #ifndef HOST_FILLORDER 61 #define HOST_FILLORDER FILLORDER_MSB2LSB 62 #endif 63 #ifndef HOST_BIGENDIAN 64 #define HOST_BIGENDIAN 1 65 #endif 66 67 #ifndef USE_64BIT_API 68 # define USE_64BIT_API 0 69 #endif 70 71 #ifndef COMPRESSION_SUPPORT 72 /* 73 * Compression support defines: 74 * 75 * CCITT_SUPPORT enable support for CCITT Group 3 & 4 algorithms 76 * PACKBITS_SUPPORT enable support for Macintosh PackBits algorithm 77 * LZW_SUPPORT enable support for LZW algorithm 78 * THUNDER_SUPPORT enable support for ThunderScan 4-bit RLE algorithm 79 * NEXT_SUPPORT enable support for NeXT 2-bit RLE algorithm 80 * OJPEG_SUPPORT enable support for 6.0-style JPEG DCT algorithms 81 * (requires IJG software) 82 * JPEG_SUPPORT enable support for post-6.0-style JPEG DCT algorithms 83 * (requires freely available IJG software, see tif_jpeg.c) 84 * ZIP_SUPPORT enable support for Deflate algorithm 85 * (requires freely available zlib software, see tif_zip.c) 86 * PIXARLOG_SUPPORT enable support for Pixar log-format algorithm 87 * LOGLUV_SUPPORT enable support for LogLuv high dynamic range encoding 88 */ 89 #define CCITT_SUPPORT 90 #define PACKBITS_SUPPORT 91 #undef LZW_SUPPORT 92 #define THUNDER_SUPPORT 93 #define NEXT_SUPPORT 94 #define LOGLUV_SUPPORT 95 #define JPEG_SUPPORT 96 #define ZIP_SUPPORT 97 #endif /* COMPRESSION_SUPPORT */ 98 99 /* 100 * If JPEG compression is enabled then we must also include 101 * support for the colorimetry and YCbCr-related tags. 102 */ 103 #ifdef JPEG_SUPPORT 104 #ifndef YCBCR_SUPPORT 105 #define YCBCR_SUPPORT 106 #endif 107 #ifndef COLORIMETRY_SUPPORT 108 #define COLORIMETRY_SUPPORT 109 #endif 110 #endif /* JPEG_SUPPORT */ 111 112 /* 113 * ``Orthogonal Features'' 114 * 115 * STRIPCHOP_DEFAULT default handling of strip chopping support (whether 116 * or not to convert single-strip uncompressed images 117 * to mutiple strips of ~8Kb--to reduce memory use) 118 * SUBIFD_SUPPORT enable support for SubIFD tag (thumbnails and such) 119 * DEFAULT_EXTRASAMPLE_AS_ALPHA 120 * The RGBA interface will treat a fourth sample with 121 * no EXTRASAMPLE_ value as being ASSOCALPHA. Many 122 * packages produce RGBA files but don't mark the alpha 123 * properly. 124 * CHECK_JPEG_YCBCR_SUBSAMPLING 125 * Enable picking up YCbCr subsampling info from the 126 * JPEG data stream to support files lacking the tag. 127 * See Bug 168 in Bugzilla, and JPEGFixupTestSubsampling() 128 * for details. 129 */ 130 #ifndef STRIPCHOP_DEFAULT 131 #define STRIPCHOP_DEFAULT TIFF_STRIPCHOP /* default is to enable */ 132 #endif 133 #ifndef SUBIFD_SUPPORT 134 #define SUBIFD_SUPPORT 1 /* enable SubIFD tag (330) support */ 135 #endif 136 #ifndef DEFAULT_EXTRASAMPLE_AS_ALPHA 137 #define DEFAULT_EXTRASAMPLE_AS_ALPHA 1 138 #endif 139 #ifndef CHECK_JPEG_YCBCR_SUBSAMPLING 140 #define CHECK_JPEG_YCBCR_SUBSAMPLING 1 141 #endif 142 143 /* 144 * Feature support definitions. 145 * XXX: These macros are obsoleted. Don't use them in your apps! 146 * Macros stays here for backward compatibility and should be always defined. 147 */ 148 #define COLORIMETRY_SUPPORT 149 #define YCBCR_SUPPORT 150 #define CMYK_SUPPORT 151 #define ICC_SUPPORT 152 #define PHOTOSHOP_SUPPORT 153 #define IPTC_SUPPORT 154 155 #endif /* _TIFFCONF_ */ 156