xref: /aosp_15_r20/external/libpng/scripts/pnglibconf.dfa (revision a67afe4df73cf47866eedc69947994b8ff839aba)
1*a67afe4dSAndroid Build Coastguard Worker# scripts/pnglibconf.dfa - library build configuration control
2*a67afe4dSAndroid Build Coastguard Worker#
3*a67afe4dSAndroid Build Coastguard Worker@/*- pnglibconf.dfn intermediate file
4*a67afe4dSAndroid Build Coastguard Worker@ *  generated from scripts/pnglibconf.dfa
5*a67afe4dSAndroid Build Coastguard Worker@ */
6*a67afe4dSAndroid Build Coastguard Worker#
7*a67afe4dSAndroid Build Coastguard Workercom pnglibconf.h - library build configuration
8*a67afe4dSAndroid Build Coastguard Workercom
9*a67afe4dSAndroid Build Coastguard Workerversion
10*a67afe4dSAndroid Build Coastguard Workercom
11*a67afe4dSAndroid Build Coastguard Workercom Copyright (c) 2018-2024 Cosmin Truta
12*a67afe4dSAndroid Build Coastguard Workercom Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
13*a67afe4dSAndroid Build Coastguard Workercom
14*a67afe4dSAndroid Build Coastguard Workercom This code is released under the libpng license.
15*a67afe4dSAndroid Build Coastguard Workercom For conditions of distribution and use, see the disclaimer
16*a67afe4dSAndroid Build Coastguard Workercom and license in png.h
17*a67afe4dSAndroid Build Coastguard Workercom
18*a67afe4dSAndroid Build Coastguard Worker
19*a67afe4dSAndroid Build Coastguard Workerfile pnglibconf.h scripts/pnglibconf.dfa PNGLCONF_H
20*a67afe4dSAndroid Build Coastguard Worker
21*a67afe4dSAndroid Build Coastguard Worker# This file is preprocessed by scripts/options.awk and the
22*a67afe4dSAndroid Build Coastguard Worker# C compiler to generate 'pnglibconf.h' - a list of all the
23*a67afe4dSAndroid Build Coastguard Worker# configuration options.  The file lists the various options
24*a67afe4dSAndroid Build Coastguard Worker# that can *only* be specified during the libpng build;
25*a67afe4dSAndroid Build Coastguard Worker# pnglibconf.h freezes the definitions selected for the specific
26*a67afe4dSAndroid Build Coastguard Worker# build.
27*a67afe4dSAndroid Build Coastguard Worker#
28*a67afe4dSAndroid Build Coastguard Worker# The syntax is detailed in scripts/options.awk; this is a summary
29*a67afe4dSAndroid Build Coastguard Worker# only:
30*a67afe4dSAndroid Build Coastguard Worker#
31*a67afe4dSAndroid Build Coastguard Worker# setting <name> [requires ...] [default]
32*a67afe4dSAndroid Build Coastguard Worker#    #define PNG_<name> <value>  /* value comes from current setting */
33*a67afe4dSAndroid Build Coastguard Worker# option <name> [requires ...] [if ...] [enables ...] [disabled]
34*a67afe4dSAndroid Build Coastguard Worker#    #define PNG_<name>_SUPPORTED if the requirements are met and
35*a67afe4dSAndroid Build Coastguard Worker#    enable the other options listed
36*a67afe4dSAndroid Build Coastguard Worker# chunk <name> [requires ...] [enables ...] [disabled]
37*a67afe4dSAndroid Build Coastguard Worker#    Enable chunk processing for the given ancillary chunk; any
38*a67afe4dSAndroid Build Coastguard Worker#    'requires something' expands to READ_something for read and
39*a67afe4dSAndroid Build Coastguard Worker#    WRITE_something for write, but the enables list members are
40*a67afe4dSAndroid Build Coastguard Worker#    used as given (e.g. enables GAMMA just expands to that on the
41*a67afe4dSAndroid Build Coastguard Worker#    correspond READ_name and WRITE_name lines.)
42*a67afe4dSAndroid Build Coastguard Worker#
43*a67afe4dSAndroid Build Coastguard Worker# "," may be used to separate options on an 'option' line and is ignored; it
44*a67afe4dSAndroid Build Coastguard Worker# doesn't change the meaning of the line.  (NOT setting, where "," becomes
45*a67afe4dSAndroid Build Coastguard Worker# part of the setting!)  A comma at the end of an option line causes a
46*a67afe4dSAndroid Build Coastguard Worker# continuation (the next line is included in the option too.)
47*a67afe4dSAndroid Build Coastguard Worker#
48*a67afe4dSAndroid Build Coastguard Worker# Note that the 'on' and 'off' keywords, while valid on both option
49*a67afe4dSAndroid Build Coastguard Worker# and chunk, should not be used in this file because they force the
50*a67afe4dSAndroid Build Coastguard Worker# relevant options on or off.
51*a67afe4dSAndroid Build Coastguard Worker
52*a67afe4dSAndroid Build Coastguard Worker#----------------------------------------------------------------------
53*a67afe4dSAndroid Build Coastguard Worker
54*a67afe4dSAndroid Build Coastguard Worker# The following setting, option and chunk values can all be changed
55*a67afe4dSAndroid Build Coastguard Worker# while building libpng:
56*a67afe4dSAndroid Build Coastguard Worker#
57*a67afe4dSAndroid Build Coastguard Worker# setting: change 'setting' lines to fine tune library performance;
58*a67afe4dSAndroid Build Coastguard Worker#   changes to the settings don't affect the libpng API functionally
59*a67afe4dSAndroid Build Coastguard Worker#
60*a67afe4dSAndroid Build Coastguard Worker# option: change 'option' lines to remove or add capabilities from
61*a67afe4dSAndroid Build Coastguard Worker#   or to the library; options change the library API
62*a67afe4dSAndroid Build Coastguard Worker#
63*a67afe4dSAndroid Build Coastguard Worker# chunk: change 'chunk' lines to remove capabilities to process
64*a67afe4dSAndroid Build Coastguard Worker#   optional ('ancillary') chunks.  This does not prevent PNG
65*a67afe4dSAndroid Build Coastguard Worker#   decoding but does change the libpng API because some chunks
66*a67afe4dSAndroid Build Coastguard Worker#   will be ignored.
67*a67afe4dSAndroid Build Coastguard Worker#
68*a67afe4dSAndroid Build Coastguard Worker# There are three ways of disabling features, in no particular order:
69*a67afe4dSAndroid Build Coastguard Worker#
70*a67afe4dSAndroid Build Coastguard Worker# 1) Create 'pngusr.h', enter the required private build information
71*a67afe4dSAndroid Build Coastguard Worker# detailed below and #define PNG_NO_<option> for each option you
72*a67afe4dSAndroid Build Coastguard Worker# don't want in that file.  You can also turn on options using
73*a67afe4dSAndroid Build Coastguard Worker# PNG_<option>_SUPPORTED.  When you have finished, rerun configure
74*a67afe4dSAndroid Build Coastguard Worker# and rebuild pnglibconf.h file with -DPNG_USER_CONFIG:
75*a67afe4dSAndroid Build Coastguard Worker#
76*a67afe4dSAndroid Build Coastguard Worker#  make clean
77*a67afe4dSAndroid Build Coastguard Worker#  CPPFLAGS='-DPNG_USER_CONFIG' ./configure
78*a67afe4dSAndroid Build Coastguard Worker#  make pnglibconf.h
79*a67afe4dSAndroid Build Coastguard Worker#
80*a67afe4dSAndroid Build Coastguard Worker# pngusr.h is only used during the creation of pnglibconf.h, but it
81*a67afe4dSAndroid Build Coastguard Worker# is safer to ensure that -DPNG_USER_CONFIG is specified throughout
82*a67afe4dSAndroid Build Coastguard Worker# the build by changing the CPPFLAGS passed to the initial ./configure
83*a67afe4dSAndroid Build Coastguard Worker#
84*a67afe4dSAndroid Build Coastguard Worker# 2) Add definitions of the settings you want to change to
85*a67afe4dSAndroid Build Coastguard Worker# CPPFLAGS; for example:
86*a67afe4dSAndroid Build Coastguard Worker#
87*a67afe4dSAndroid Build Coastguard Worker#   -DPNG_DEFAULT_READ_MACROS=0
88*a67afe4dSAndroid Build Coastguard Worker#
89*a67afe4dSAndroid Build Coastguard Worker# (This would change the default to *not* use read macros.)  Be
90*a67afe4dSAndroid Build Coastguard Worker# very careful to change only settings that don't alter the API
91*a67afe4dSAndroid Build Coastguard Worker# because this approach bypasses the private build checking.  You
92*a67afe4dSAndroid Build Coastguard Worker# can also change settings from pngpriv.h (read pngpriv.h) safely
93*a67afe4dSAndroid Build Coastguard Worker# without API changes.  Do that in the same way.
94*a67afe4dSAndroid Build Coastguard Worker#
95*a67afe4dSAndroid Build Coastguard Worker# 3) Write a new '.dfa' file (say 'pngusr.dfa') and in this file
96*a67afe4dSAndroid Build Coastguard Worker# provide override values for setting entries and turn option or
97*a67afe4dSAndroid Build Coastguard Worker# chunk values explicitly 'on' or 'off':
98*a67afe4dSAndroid Build Coastguard Worker#
99*a67afe4dSAndroid Build Coastguard Worker#    setting FOO default VALUE
100*a67afe4dSAndroid Build Coastguard Worker#    option BAR [on|off]
101*a67afe4dSAndroid Build Coastguard Worker#
102*a67afe4dSAndroid Build Coastguard Worker# Then add this file to the options.awk command line (the *first*
103*a67afe4dSAndroid Build Coastguard Worker# one) after this file.  The make macro DFA_XTRA is provided to make
104*a67afe4dSAndroid Build Coastguard Worker# this easier (set it like CPPFLAGS prior to running ./configure).
105*a67afe4dSAndroid Build Coastguard Worker# Look at the builds below contrib/pngminim for some extreme examples
106*a67afe4dSAndroid Build Coastguard Worker# of how this can be used.
107*a67afe4dSAndroid Build Coastguard Worker#
108*a67afe4dSAndroid Build Coastguard Worker# Don't edit this file unless you are contributing a patch to
109*a67afe4dSAndroid Build Coastguard Worker# libpng and need new or modified options/settings.
110*a67afe4dSAndroid Build Coastguard Worker#----------------------------------------------------------------------
111*a67afe4dSAndroid Build Coastguard Worker
112*a67afe4dSAndroid Build Coastguard Worker# The following causes commented out #undef lines to be written to
113*a67afe4dSAndroid Build Coastguard Worker# pnglibconf.h; this can be stopped by logunsupported=0 in a later
114*a67afe4dSAndroid Build Coastguard Worker# file or on the command line (after pnglibconf.dfa)
115*a67afe4dSAndroid Build Coastguard Worker
116*a67afe4dSAndroid Build Coastguard Workerlogunsupported = 1
117*a67afe4dSAndroid Build Coastguard Worker
118*a67afe4dSAndroid Build Coastguard Worker# The following allows the output from configure to modify the contents of
119*a67afe4dSAndroid Build Coastguard Worker# pnglibconf.h
120*a67afe4dSAndroid Build Coastguard Worker
121*a67afe4dSAndroid Build Coastguard Worker@#ifdef HAVE_CONFIG_H
122*a67afe4dSAndroid Build Coastguard Worker@#  include "config.h"
123*a67afe4dSAndroid Build Coastguard Worker@#endif
124*a67afe4dSAndroid Build Coastguard Worker
125*a67afe4dSAndroid Build Coastguard Worker# PNG_USER_CONFIG has to be defined on the compiler command line
126*a67afe4dSAndroid Build Coastguard Worker# to cause pngusr.h to be read while constructing pnglibconf.h
127*a67afe4dSAndroid Build Coastguard Worker#
128*a67afe4dSAndroid Build Coastguard Worker# If you create a private DLL you need to define the following
129*a67afe4dSAndroid Build Coastguard Worker# macros in the file 'pngusr.h' and set -DPNG_USER_CONFIG for
130*a67afe4dSAndroid Build Coastguard Worker# compilation (i.e. in CPPFLAGS.)
131*a67afe4dSAndroid Build Coastguard Worker# #define PNG_USER_PRIVATEBUILD \
132*a67afe4dSAndroid Build Coastguard Worker#     <Describes by whom and why this version of the DLL was built>
133*a67afe4dSAndroid Build Coastguard Worker#  e.g. #define PNG_USER_PRIVATEBUILD "Build by MyCompany for xyz reasons."
134*a67afe4dSAndroid Build Coastguard Worker# #define PNG_USER_DLLFNAME_POSTFIX <two-letter postfix that serve to
135*a67afe4dSAndroid Build Coastguard Worker#        distinguish your DLL from those of the official release. These
136*a67afe4dSAndroid Build Coastguard Worker#        correspond to the trailing letters that come after the version
137*a67afe4dSAndroid Build Coastguard Worker#        number and must match your private DLL name>
138*a67afe4dSAndroid Build Coastguard Worker#  e.g. // private DLL "libpng13gx.dll"
139*a67afe4dSAndroid Build Coastguard Worker#       #define PNG_USER_DLLFNAME_POSTFIX "gx"
140*a67afe4dSAndroid Build Coastguard Worker#
141*a67afe4dSAndroid Build Coastguard Worker# The following macros are also at your disposal if you want to complete the
142*a67afe4dSAndroid Build Coastguard Worker# DLL VERSIONINFO structure.
143*a67afe4dSAndroid Build Coastguard Worker# - PNG_USER_VERSIONINFO_COMMENTS
144*a67afe4dSAndroid Build Coastguard Worker# - PNG_USER_VERSIONINFO_COMPANYNAME
145*a67afe4dSAndroid Build Coastguard Worker# - PNG_USER_VERSIONINFO_LEGALTRADEMARKS
146*a67afe4dSAndroid Build Coastguard Worker
147*a67afe4dSAndroid Build Coastguard Worker# It is necessary to include configures definitions here so that AC_DEFINE
148*a67afe4dSAndroid Build Coastguard Worker# in configure.ac works in a comprehensible way
149*a67afe4dSAndroid Build Coastguard Worker@#if defined(HAVE_CONFIG_H) && !defined(PNG_NO_CONFIG_H)
150*a67afe4dSAndroid Build Coastguard Worker@#  include "config.h"
151*a67afe4dSAndroid Build Coastguard Worker@#endif
152*a67afe4dSAndroid Build Coastguard Worker
153*a67afe4dSAndroid Build Coastguard Worker@#ifdef PNG_USER_CONFIG
154*a67afe4dSAndroid Build Coastguard Worker@#  include "pngusr.h"
155*a67afe4dSAndroid Build Coastguard Worker@#endif
156*a67afe4dSAndroid Build Coastguard Worker
157*a67afe4dSAndroid Build Coastguard Worker# This is a special fixup for the Watcom C compiler on Windows, which has
158*a67afe4dSAndroid Build Coastguard Worker# multiple procedure call standards.  Unless PNG_API_RULE is set explicitly
159*a67afe4dSAndroid Build Coastguard Worker# (i.e. if it is not defined at this point) it will be forced to '2' here when
160*a67afe4dSAndroid Build Coastguard Worker# using Watcom.  This indicates to the other header files that Watcom behaviour
161*a67afe4dSAndroid Build Coastguard Worker# is required where appropriate.
162*a67afe4dSAndroid Build Coastguard Worker
163*a67afe4dSAndroid Build Coastguard Worker@#ifdef __WATCOMC__
164*a67afe4dSAndroid Build Coastguard Worker@#  ifndef PNG_API_RULE
165*a67afe4dSAndroid Build Coastguard Worker@#     define PNG_API_RULE 2 /* Use Watcom calling conventions */
166*a67afe4dSAndroid Build Coastguard Worker@#  endif
167*a67afe4dSAndroid Build Coastguard Worker@#endif
168*a67afe4dSAndroid Build Coastguard Worker
169*a67afe4dSAndroid Build Coastguard Worker# IN DEVELOPMENT
170*a67afe4dSAndroid Build Coastguard Worker# These are currently experimental features; define them if you want (NOTE:
171*a67afe4dSAndroid Build Coastguard Worker# experimental options must be disabled before they are defined in this file!)
172*a67afe4dSAndroid Build Coastguard Worker
173*a67afe4dSAndroid Build Coastguard Worker# NONE
174*a67afe4dSAndroid Build Coastguard Worker
175*a67afe4dSAndroid Build Coastguard Worker# Note that PNG_USER_CONFIG only has an effect when building
176*a67afe4dSAndroid Build Coastguard Worker# pnglibconf.h
177*a67afe4dSAndroid Build Coastguard Worker
178*a67afe4dSAndroid Build Coastguard Workersetting USER_CONFIG
179*a67afe4dSAndroid Build Coastguard Workersetting USER_PRIVATEBUILD
180*a67afe4dSAndroid Build Coastguard Workersetting USER_DLLFNAME_POSTFIX
181*a67afe4dSAndroid Build Coastguard Workersetting USER_VERSIONINFO_COMMENTS
182*a67afe4dSAndroid Build Coastguard Workersetting USER_VERSIONINFO_COMPANYNAME
183*a67afe4dSAndroid Build Coastguard Workersetting USER_VERSIONINFO_LEGALTRADEMARKS
184*a67afe4dSAndroid Build Coastguard Worker
185*a67afe4dSAndroid Build Coastguard Worker# Record the 'API rule' used to select calling conventions on
186*a67afe4dSAndroid Build Coastguard Worker# those systems that support such things (see all the comments in
187*a67afe4dSAndroid Build Coastguard Worker# pngconf.h)
188*a67afe4dSAndroid Build Coastguard Worker# Changing this setting has a fundamental affect on the PNG ABI,
189*a67afe4dSAndroid Build Coastguard Worker# do not release shared libraries with this changed.
190*a67afe4dSAndroid Build Coastguard Worker
191*a67afe4dSAndroid Build Coastguard Workersetting API_RULE default 0
192*a67afe4dSAndroid Build Coastguard Worker
193*a67afe4dSAndroid Build Coastguard Worker# This allows a prefix to be added to the front of every API function name (and
194*a67afe4dSAndroid Build Coastguard Worker# therefore every symbol) by redefining all the function names with the prefix
195*a67afe4dSAndroid Build Coastguard Worker# at the end of pnglibconf.h.  It also turns on similar internal symbol renaming
196*a67afe4dSAndroid Build Coastguard Worker# by causing a similar build-time only file, pngprefix.h, to be generated.
197*a67afe4dSAndroid Build Coastguard Worker
198*a67afe4dSAndroid Build Coastguard Workersetting PREFIX
199*a67afe4dSAndroid Build Coastguard Worker
200*a67afe4dSAndroid Build Coastguard Worker# Implementation specific control of the optimizations, enabled by those
201*a67afe4dSAndroid Build Coastguard Worker# hardware or software options that need it (typically when run-time choices
202*a67afe4dSAndroid Build Coastguard Worker# must be made by the user)
203*a67afe4dSAndroid Build Coastguard Workeroption SET_OPTION disabled
204*a67afe4dSAndroid Build Coastguard Worker
205*a67afe4dSAndroid Build Coastguard Worker# These options are specific to the ARM NEON hardware optimizations.  At present
206*a67afe4dSAndroid Build Coastguard Worker# these optimizations depend on GCC specific pre-processing of an assembler (.S)
207*a67afe4dSAndroid Build Coastguard Worker# file, so they probably won't work with other compilers.
208*a67afe4dSAndroid Build Coastguard Worker#
209*a67afe4dSAndroid Build Coastguard Worker# ARM_NEON_OPT:
210*a67afe4dSAndroid Build Coastguard Worker#   unset: check at compile time
211*a67afe4dSAndroid Build Coastguard Worker#          (__ARM_NEON__ must be predefined by the compiler, as a result of
212*a67afe4dSAndroid Build Coastguard Worker#          passing "-mfpu=neon" to the compiler options)
213*a67afe4dSAndroid Build Coastguard Worker#   0: disable (even if the CPU has a NEON FPU)
214*a67afe4dSAndroid Build Coastguard Worker#   1: check at run time (via ARM_NEON_{API,CHECK})
215*a67afe4dSAndroid Build Coastguard Worker#   2: switch on unconditionally
216*a67afe4dSAndroid Build Coastguard Worker#      (inadvisable - instead, pass "-mfpu=neon" to the compiler)
217*a67afe4dSAndroid Build Coastguard Worker#   NOTE:
218*a67afe4dSAndroid Build Coastguard Worker#     When building libpng, avoid using any setting other than '0';
219*a67afe4dSAndroid Build Coastguard Worker#     '1' is set automatically when either 'API' or 'CHECK' are configured in;
220*a67afe4dSAndroid Build Coastguard Worker#     '2' should not be necessary, as "-mfpu=neon" will achieve the same effect
221*a67afe4dSAndroid Build Coastguard Worker#     as well as applying the NEON optimizations to the rest of libpng.
222*a67afe4dSAndroid Build Coastguard Worker#   NOTE:
223*a67afe4dSAndroid Build Coastguard Worker#     Any setting other than '0' requires ALIGNED_MEMORY.
224*a67afe4dSAndroid Build Coastguard Worker#
225*a67afe4dSAndroid Build Coastguard Worker# ARM_NEON_API:
226*a67afe4dSAndroid Build Coastguard Worker#   (PNG_ARM_NEON == 1)
227*a67afe4dSAndroid Build Coastguard Worker#   Allow the optimization to be switched on with png_set_option.
228*a67afe4dSAndroid Build Coastguard Worker#
229*a67afe4dSAndroid Build Coastguard Worker# ARM_NEON_CHECK:
230*a67afe4dSAndroid Build Coastguard Worker#   (PNG_ARM_NEON == 1)
231*a67afe4dSAndroid Build Coastguard Worker#   Compile a run-time check to see if Neon extensions are supported.
232*a67afe4dSAndroid Build Coastguard Worker#   This is poorly supported and deprecated - use the png_set_option API.
233*a67afe4dSAndroid Build Coastguard Worker#
234*a67afe4dSAndroid Build Coastguard Workersetting ARM_NEON_OPT
235*a67afe4dSAndroid Build Coastguard Workeroption ARM_NEON_API disabled requires ALIGNED_MEMORY enables SET_OPTION,
236*a67afe4dSAndroid Build Coastguard Worker   sets ARM_NEON_OPT 1
237*a67afe4dSAndroid Build Coastguard Workeroption ARM_NEON_CHECK disabled requires ALIGNED_MEMORY,
238*a67afe4dSAndroid Build Coastguard Worker   sets ARM_NEON_OPT 1
239*a67afe4dSAndroid Build Coastguard Worker
240*a67afe4dSAndroid Build Coastguard Worker# These options are specific to the PowerPC VSX hardware optimizations.
241*a67afe4dSAndroid Build Coastguard Worker#
242*a67afe4dSAndroid Build Coastguard Worker# POWERPC_VSX_OPT:
243*a67afe4dSAndroid Build Coastguard Worker#   unset: check at compile time
244*a67afe4dSAndroid Build Coastguard Worker#          (__PPC64__,__ALTIVEC__,__VSX__ must be predefined by the compiler,
245*a67afe4dSAndroid Build Coastguard Worker#          as a result of passing "-mvsx -maltivec" to the compiler options)
246*a67afe4dSAndroid Build Coastguard Worker#   0: disable (even if the CPU supports VSX)
247*a67afe4dSAndroid Build Coastguard Worker#   1: check at run time (via POWERPC_VSX_{API,CHECK})
248*a67afe4dSAndroid Build Coastguard Worker#   2: switch on unconditionally
249*a67afe4dSAndroid Build Coastguard Worker#      (inadvisable - instead, pass "-mvsx -maltivec" to the compiler)
250*a67afe4dSAndroid Build Coastguard Worker#   NOTE:
251*a67afe4dSAndroid Build Coastguard Worker#     When building libpng, avoid using any setting other than '0';
252*a67afe4dSAndroid Build Coastguard Worker#     '1' is set automatically when either 'API' or 'CHECK' are configured in;
253*a67afe4dSAndroid Build Coastguard Worker#     '2' should not be necessary, as "-mvsx -maltivec" will achieve the same
254*a67afe4dSAndroid Build Coastguard Worker#     effect as well as applying the VSX optimizations to the rest of libpng.
255*a67afe4dSAndroid Build Coastguard Worker#
256*a67afe4dSAndroid Build Coastguard Worker# POWERPC_VSX_API:
257*a67afe4dSAndroid Build Coastguard Worker#   (PNG_POWERPC_VSX == 1)
258*a67afe4dSAndroid Build Coastguard Worker#   Allow the optimization to be switched on with png_set_option.
259*a67afe4dSAndroid Build Coastguard Worker#
260*a67afe4dSAndroid Build Coastguard Worker# POWERPC_VSX_CHECK:
261*a67afe4dSAndroid Build Coastguard Worker#   (PNG_POWERPC_VSX == 1)
262*a67afe4dSAndroid Build Coastguard Worker#   Compile a run-time check to see if VSX extensions are supported.
263*a67afe4dSAndroid Build Coastguard Worker#   This is not supported on all systems. See contrib/powerpc-vsx/README.
264*a67afe4dSAndroid Build Coastguard Worker#
265*a67afe4dSAndroid Build Coastguard Workersetting POWERPC_VSX_OPT
266*a67afe4dSAndroid Build Coastguard Workeroption POWERPC_VSX_API disabled enables SET_OPTION,
267*a67afe4dSAndroid Build Coastguard Worker  sets POWERPC_VSX_OPT 1
268*a67afe4dSAndroid Build Coastguard Workeroption POWERPC_VSX_CHECK disabled,
269*a67afe4dSAndroid Build Coastguard Worker  sets POWERPC_VSX_OPT 1
270*a67afe4dSAndroid Build Coastguard Worker
271*a67afe4dSAndroid Build Coastguard Worker# These options are specific to the MIPS MSA hardware optimizations.
272*a67afe4dSAndroid Build Coastguard Worker#
273*a67afe4dSAndroid Build Coastguard Worker# MIPS_MSA_OPT:
274*a67afe4dSAndroid Build Coastguard Worker#   unset: check at compile time
275*a67afe4dSAndroid Build Coastguard Worker#          (__mips_msa must be predefined by the compiler, as a result of
276*a67afe4dSAndroid Build Coastguard Worker#          passing "-mmsa -mfp64" to the compiler options)
277*a67afe4dSAndroid Build Coastguard Worker#   0: disable (even if the CPU supports MSA)
278*a67afe4dSAndroid Build Coastguard Worker#   1: check at run time (via MIPS_MSA_{API,CHECK})
279*a67afe4dSAndroid Build Coastguard Worker#   2: switch on unconditionally
280*a67afe4dSAndroid Build Coastguard Worker#      (inadvisable - instead, pass "-mmsa -mfp64" to the compiler)
281*a67afe4dSAndroid Build Coastguard Worker#   NOTE:
282*a67afe4dSAndroid Build Coastguard Worker#     When building libpng, avoid using any setting other than '0';
283*a67afe4dSAndroid Build Coastguard Worker#     '1' is set automatically when either 'API' or 'CHECK' are configured in;
284*a67afe4dSAndroid Build Coastguard Worker#     '2' should not be necessary, as "-mmsa -mfp64" will achieve the same
285*a67afe4dSAndroid Build Coastguard Worker#     effect as well as applying the MSA optimizations to the rest of libpng.
286*a67afe4dSAndroid Build Coastguard Worker#   NOTE:
287*a67afe4dSAndroid Build Coastguard Worker#     Any setting other than '0' requires ALIGNED_MEMORY.
288*a67afe4dSAndroid Build Coastguard Worker#
289*a67afe4dSAndroid Build Coastguard Worker# MIPS_MSA_API:
290*a67afe4dSAndroid Build Coastguard Worker#   (PNG_MIPS_MSA == 1)
291*a67afe4dSAndroid Build Coastguard Worker#   Allow the optimization to be switched on with png_set_option.
292*a67afe4dSAndroid Build Coastguard Worker#
293*a67afe4dSAndroid Build Coastguard Worker# MIPS_MSA_CHECK:
294*a67afe4dSAndroid Build Coastguard Worker#   (PNG_MIPS_MSA == 1)
295*a67afe4dSAndroid Build Coastguard Worker#   Compile a run-time check to see if MSA extensions are supported.
296*a67afe4dSAndroid Build Coastguard Worker#
297*a67afe4dSAndroid Build Coastguard Workersetting MIPS_MSA_OPT
298*a67afe4dSAndroid Build Coastguard Workeroption MIPS_MSA_API disabled requires ALIGNED_MEMORY enables SET_OPTION,
299*a67afe4dSAndroid Build Coastguard Worker  sets MIPS_MSA_OPT 1
300*a67afe4dSAndroid Build Coastguard Workeroption MIPS_MSA_CHECK disabled requires ALIGNED_MEMORY,
301*a67afe4dSAndroid Build Coastguard Worker  sets MIPS_MSA_OPT 1
302*a67afe4dSAndroid Build Coastguard Worker
303*a67afe4dSAndroid Build Coastguard Worker# These options are specific to the MIPS MMI hardware optimizations.
304*a67afe4dSAndroid Build Coastguard Worker#
305*a67afe4dSAndroid Build Coastguard Worker# MIPS_MMI_OPT:
306*a67afe4dSAndroid Build Coastguard Worker#   unset: check at compile time
307*a67afe4dSAndroid Build Coastguard Worker#          (__mips_loongson_mmi must be defined by the compiler, as a result of
308*a67afe4dSAndroid Build Coastguard Worker#          passing "-mloongson-mmi -march=loongson3a" to the compiler options)
309*a67afe4dSAndroid Build Coastguard Worker#   0: disable (even if the CPU supports MMI)
310*a67afe4dSAndroid Build Coastguard Worker#   1: check at run time (via MIPS_MMI_{API,CHECK})
311*a67afe4dSAndroid Build Coastguard Worker#   2: switch on unconditionally
312*a67afe4dSAndroid Build Coastguard Worker#      (inadvisable - instead, pass "-mloongson-mmi -march=loongson3a" to the
313*a67afe4dSAndroid Build Coastguard Worker#      compiler)
314*a67afe4dSAndroid Build Coastguard Worker#   NOTE:
315*a67afe4dSAndroid Build Coastguard Worker#     When building libpng, avoid using any setting other than '0';
316*a67afe4dSAndroid Build Coastguard Worker#     '1' is set automatically when either 'API' or 'CHECK' are configured in;
317*a67afe4dSAndroid Build Coastguard Worker#     '2' should not be necessary, as "-mloongson-mmi -march=loongson3a" will
318*a67afe4dSAndroid Build Coastguard Worker#     achieve the same effect as well as applying the MMI optimizations to the
319*a67afe4dSAndroid Build Coastguard Worker#     rest of libpng.
320*a67afe4dSAndroid Build Coastguard Worker#
321*a67afe4dSAndroid Build Coastguard Worker# MIPS_MMI_API:
322*a67afe4dSAndroid Build Coastguard Worker#   (PNG_MIPS_MMI == 1)
323*a67afe4dSAndroid Build Coastguard Worker#   Allow the optimization to be switched on with png_set_option.
324*a67afe4dSAndroid Build Coastguard Worker#
325*a67afe4dSAndroid Build Coastguard Worker# MIPS_MMI_CHECK:
326*a67afe4dSAndroid Build Coastguard Worker#   (PNG_MIPS_MMI == 1)
327*a67afe4dSAndroid Build Coastguard Worker#   Compile a run-time check to see if MMI extensions are supported.
328*a67afe4dSAndroid Build Coastguard Worker#
329*a67afe4dSAndroid Build Coastguard Workersetting MIPS_MMI_OPT
330*a67afe4dSAndroid Build Coastguard Workeroption MIPS_MMI_API disabled requires ALIGNED_MEMORY enables SET_OPTION,
331*a67afe4dSAndroid Build Coastguard Worker  sets MIPS_MMI_OPT 1
332*a67afe4dSAndroid Build Coastguard Workeroption MIPS_MMI_CHECK disabled requires ALIGNED_MEMORY,
333*a67afe4dSAndroid Build Coastguard Worker  sets MIPS_MMI_OPT 1
334*a67afe4dSAndroid Build Coastguard Worker
335*a67afe4dSAndroid Build Coastguard Worker
336*a67afe4dSAndroid Build Coastguard Worker# These settings configure the default compression level (0-9) and 'strategy';
337*a67afe4dSAndroid Build Coastguard Worker# strategy is as defined by the implementors of zlib. It describes the input
338*a67afe4dSAndroid Build Coastguard Worker# data and modifies the zlib parameters in an attempt to optimize the balance
339*a67afe4dSAndroid Build Coastguard Worker# between search and huffman encoding in the zlib algorithms.  The defaults are
340*a67afe4dSAndroid Build Coastguard Worker# the zlib.h defaults - the apparently recursive definition does not arise
341*a67afe4dSAndroid Build Coastguard Worker# because the name of the setting is prefixed by PNG_
342*a67afe4dSAndroid Build Coastguard Worker#
343*a67afe4dSAndroid Build Coastguard Worker# The TEXT values are the defaults when writing compressed text (all forms)
344*a67afe4dSAndroid Build Coastguard Worker
345*a67afe4dSAndroid Build Coastguard Worker# Include the zlib header so that the defaults below are known
346*a67afe4dSAndroid Build Coastguard Worker@#  include <zlib.h>
347*a67afe4dSAndroid Build Coastguard Worker
348*a67afe4dSAndroid Build Coastguard Worker# The '@' here means to substitute the value when pnglibconf.h is built
349*a67afe4dSAndroid Build Coastguard Workersetting Z_DEFAULT_COMPRESSION default @Z_DEFAULT_COMPRESSION
350*a67afe4dSAndroid Build Coastguard Worker# TODO: why aren't these Z_RLE; zlib.h says that Z_RLE, specifically, is
351*a67afe4dSAndroid Build Coastguard Worker# appropriate for PNG images, maybe it doesn't exist in all versions?
352*a67afe4dSAndroid Build Coastguard Workersetting Z_DEFAULT_STRATEGY default @Z_FILTERED
353*a67afe4dSAndroid Build Coastguard Workersetting Z_DEFAULT_NOFILTER_STRATEGY default @Z_DEFAULT_STRATEGY
354*a67afe4dSAndroid Build Coastguard Workersetting ZLIB_VERNUM default @ZLIB_VERNUM
355*a67afe4dSAndroid Build Coastguard Worker
356*a67afe4dSAndroid Build Coastguard Worker# Linkage of:
357*a67afe4dSAndroid Build Coastguard Worker#
358*a67afe4dSAndroid Build Coastguard Worker#  API:      libpng API functions
359*a67afe4dSAndroid Build Coastguard Worker#  CALLBACK: internal non-file-local callbacks
360*a67afe4dSAndroid Build Coastguard Worker#  FUNCTION: internal non-file-local functions
361*a67afe4dSAndroid Build Coastguard Worker#  DATA:     internal non-file-local (const) data
362*a67afe4dSAndroid Build Coastguard Workersetting LINKAGE_API default extern
363*a67afe4dSAndroid Build Coastguard Workersetting LINKAGE_CALLBACK default extern
364*a67afe4dSAndroid Build Coastguard Workersetting LINKAGE_FUNCTION default extern
365*a67afe4dSAndroid Build Coastguard Workersetting LINKAGE_DATA default extern
366*a67afe4dSAndroid Build Coastguard Worker
367*a67afe4dSAndroid Build Coastguard Workersetting TEXT_Z_DEFAULT_COMPRESSION default @Z_DEFAULT_COMPRESSION
368*a67afe4dSAndroid Build Coastguard Workersetting TEXT_Z_DEFAULT_STRATEGY default @Z_DEFAULT_STRATEGY
369*a67afe4dSAndroid Build Coastguard Worker
370*a67afe4dSAndroid Build Coastguard Worker# Default to using the read macros
371*a67afe4dSAndroid Build Coastguard Worker
372*a67afe4dSAndroid Build Coastguard Workersetting DEFAULT_READ_MACROS default 1
373*a67afe4dSAndroid Build Coastguard Worker
374*a67afe4dSAndroid Build Coastguard Worker# The alternative is to call functions to read PNG values, if
375*a67afe4dSAndroid Build Coastguard Worker# the functions are turned *off* the read macros must always
376*a67afe4dSAndroid Build Coastguard Worker# be enabled, so turning this off will actually force the
377*a67afe4dSAndroid Build Coastguard Worker# USE_READ_MACROS option on (see pngconf.h)
378*a67afe4dSAndroid Build Coastguard Worker
379*a67afe4dSAndroid Build Coastguard Workeroption READ_INT_FUNCTIONS requires READ
380*a67afe4dSAndroid Build Coastguard Worker
381*a67afe4dSAndroid Build Coastguard Worker# The same for write  but these can only be switched off if no writing
382*a67afe4dSAndroid Build Coastguard Worker# is required at all - hence the use of a 'disabled', not a 'requires'.
383*a67afe4dSAndroid Build Coastguard Worker# If these are needed, they are enabled in the 'WRITE options' section
384*a67afe4dSAndroid Build Coastguard Worker# below.
385*a67afe4dSAndroid Build Coastguard Worker
386*a67afe4dSAndroid Build Coastguard Workeroption WRITE_INT_FUNCTIONS disabled
387*a67afe4dSAndroid Build Coastguard Worker
388*a67afe4dSAndroid Build Coastguard Worker# Error controls
389*a67afe4dSAndroid Build Coastguard Worker#
390*a67afe4dSAndroid Build Coastguard Worker# WARNINGS: normally on, if off no warnings are generated
391*a67afe4dSAndroid Build Coastguard Worker# ERROR_TEXT: normally on, if off errors happen but there is no message
392*a67afe4dSAndroid Build Coastguard Worker# ERROR_NUMBERS: unimplemented feature, therefore disabled
393*a67afe4dSAndroid Build Coastguard Worker# BENIGN_ERRORS: support for just issuing warnings for recoverable errors
394*a67afe4dSAndroid Build Coastguard Worker#
395*a67afe4dSAndroid Build Coastguard Worker# BENIGN_READ_ERRORS:
396*a67afe4dSAndroid Build Coastguard Worker#     By default recoverable errors on read should just generate warnings,
397*a67afe4dSAndroid Build Coastguard Worker#     generally safe but PNG files that don't conform to the specification will
398*a67afe4dSAndroid Build Coastguard Worker#     be accepted if a meaningful result can be produced.
399*a67afe4dSAndroid Build Coastguard Worker#
400*a67afe4dSAndroid Build Coastguard Worker# BENIGN_WRITE_ERRORS:
401*a67afe4dSAndroid Build Coastguard Worker#     By default recoverable errors on write should just generate warnings,
402*a67afe4dSAndroid Build Coastguard Worker#     not generally safe because this allows the application to write invalid
403*a67afe4dSAndroid Build Coastguard Worker#     PNG files.  Applications should enable this themselves; it's useful
404*a67afe4dSAndroid Build Coastguard Worker#     because it means that a failure to write an ancillary chunk can often be
405*a67afe4dSAndroid Build Coastguard Worker#     ignored.
406*a67afe4dSAndroid Build Coastguard Worker
407*a67afe4dSAndroid Build Coastguard Workeroption WARNINGS
408*a67afe4dSAndroid Build Coastguard Workeroption ERROR_TEXT
409*a67afe4dSAndroid Build Coastguard Workeroption ERROR_NUMBERS disabled
410*a67afe4dSAndroid Build Coastguard Worker
411*a67afe4dSAndroid Build Coastguard Workeroption BENIGN_ERRORS
412*a67afe4dSAndroid Build Coastguard Workeroption BENIGN_WRITE_ERRORS requires BENIGN_ERRORS disabled
413*a67afe4dSAndroid Build Coastguard Workeroption BENIGN_READ_ERRORS requires BENIGN_ERRORS
414*a67afe4dSAndroid Build Coastguard Worker
415*a67afe4dSAndroid Build Coastguard Worker# Adler32 checksum
416*a67afe4dSAndroid Build Coastguard Worker#
417*a67afe4dSAndroid Build Coastguard Worker# This option allows the check of the Adler32 checksum performed by zlib to
418*a67afe4dSAndroid Build Coastguard Worker# be turned off for IDAT chunks (only).  Unless this option is enabled and
419*a67afe4dSAndroid Build Coastguard Worker# turned on (not the default even if enabled) a failed Adler32 at the end of the
420*a67afe4dSAndroid Build Coastguard Worker# stream will result in a decompression (inflate) failure on read even though
421*a67afe4dSAndroid Build Coastguard Worker# the entire image might have been read successfully.
422*a67afe4dSAndroid Build Coastguard Worker#
423*a67afe4dSAndroid Build Coastguard Worker# This option relies on an undocumented function 'inflateValidate' which is
424*a67afe4dSAndroid Build Coastguard Worker# present in only some versions of zlib.  If the function is not present in the
425*a67afe4dSAndroid Build Coastguard Worker# zlib used with libpng code which uses -lpng is likely to fail to link or to
426*a67afe4dSAndroid Build Coastguard Worker# launch in the case of a DLL.
427*a67afe4dSAndroid Build Coastguard Worker#
428*a67afe4dSAndroid Build Coastguard Worker# Therefore this option is currently disabled by default; it has to be turned on
429*a67afe4dSAndroid Build Coastguard Worker# in pngusr.dfa and then the application program has to explicitly turn the
430*a67afe4dSAndroid Build Coastguard Worker# functionality on by calling png_set_option.
431*a67afe4dSAndroid Build Coastguard Worker#
432*a67afe4dSAndroid Build Coastguard Worker# Furthermore the option is explicitly turned off here if the zlib version
433*a67afe4dSAndroid Build Coastguard Worker# number is below that required - libpng wouldn't compile in that case if the
434*a67afe4dSAndroid Build Coastguard Worker# option were turned on.
435*a67afe4dSAndroid Build Coastguard Workeroption DISABLE_ADLER32_CHECK requires READ enables SET_OPTION disabled
436*a67afe4dSAndroid Build Coastguard Worker
437*a67afe4dSAndroid Build Coastguard Worker# ZLIB_VERNUM must be used here, not PNG_ZLIB_VERNUM, because
438*a67afe4dSAndroid Build Coastguard Worker# scripts/options.awk ends up putting this test adhead of the setting of
439*a67afe4dSAndroid Build Coastguard Worker# PNG_ZLIB_VERNUM (apparently above, but not because of the two-pass processing)
440*a67afe4dSAndroid Build Coastguard Worker@#if ZLIB_VERNUM < 0x1290
441*a67afe4dSAndroid Build Coastguard Worker@#   define PNG_NO_DISABLE_ADLER32_CHECK
442*a67afe4dSAndroid Build Coastguard Worker@#endif
443*a67afe4dSAndroid Build Coastguard Worker
444*a67afe4dSAndroid Build Coastguard Worker# Generic options - affect both read and write.
445*a67afe4dSAndroid Build Coastguard Worker
446*a67afe4dSAndroid Build Coastguard Workeroption MNG_FEATURES
447*a67afe4dSAndroid Build Coastguard Worker
448*a67afe4dSAndroid Build Coastguard Worker# Arithmetic options, the first is the big switch that chooses between internal
449*a67afe4dSAndroid Build Coastguard Worker# floating and fixed point arithmetic implementations - it does not affect any
450*a67afe4dSAndroid Build Coastguard Worker# APIs.  The second two (the _POINT settings) switch off individual APIs.
451*a67afe4dSAndroid Build Coastguard Worker#
452*a67afe4dSAndroid Build Coastguard Worker# Prior to libpng 1.6.8 one of the API (_POINT) variants had to be selected.  At
453*a67afe4dSAndroid Build Coastguard Worker# 1.6.8 this restriction has been removed; the simplified API can be used
454*a67afe4dSAndroid Build Coastguard Worker# without enabling any of the low level fixed/floating APIs.
455*a67afe4dSAndroid Build Coastguard Worker
456*a67afe4dSAndroid Build Coastguard Workeroption FLOATING_ARITHMETIC
457*a67afe4dSAndroid Build Coastguard Workeroption FLOATING_POINT
458*a67afe4dSAndroid Build Coastguard Workeroption FIXED_POINT
459*a67afe4dSAndroid Build Coastguard Worker
460*a67afe4dSAndroid Build Coastguard Worker# This protects us against compilers that run on a windowing system
461*a67afe4dSAndroid Build Coastguard Worker# and thus don't have or would rather us not use the stdio types:
462*a67afe4dSAndroid Build Coastguard Worker# stdin, stdout, and stderr.  The only one currently used is stderr
463*a67afe4dSAndroid Build Coastguard Worker# in png_error() and png_warning().  #defining PNG_NO_CONSOLE_IO will
464*a67afe4dSAndroid Build Coastguard Worker# prevent these from being compiled and used. #defining PNG_NO_STDIO
465*a67afe4dSAndroid Build Coastguard Worker# will also prevent these, plus will prevent the entire set of stdio
466*a67afe4dSAndroid Build Coastguard Worker# macros and functions (FILE *, printf, etc.) from being compiled and used,
467*a67afe4dSAndroid Build Coastguard Worker# unless (PNG_DEBUG > 0) has been #defined.
468*a67afe4dSAndroid Build Coastguard Worker
469*a67afe4dSAndroid Build Coastguard Workeroption STDIO
470*a67afe4dSAndroid Build Coastguard Workeroption CONSOLE_IO requires STDIO
471*a67afe4dSAndroid Build Coastguard Worker
472*a67afe4dSAndroid Build Coastguard Worker# Note: prior to 1.5.0 this option could not be disabled if STDIO
473*a67afe4dSAndroid Build Coastguard Worker# was enabled.  Prior to 1.5.3 this option required STDIO
474*a67afe4dSAndroid Build Coastguard Worker
475*a67afe4dSAndroid Build Coastguard Workeroption TIME_RFC1123
476*a67afe4dSAndroid Build Coastguard Worker
477*a67afe4dSAndroid Build Coastguard Worker# PNG_SETJMP_NOT_SUPPORTED is an old equivalent for NO_SETJMP
478*a67afe4dSAndroid Build Coastguard Worker
479*a67afe4dSAndroid Build Coastguard Workeroption SETJMP
480*a67afe4dSAndroid Build Coastguard Worker= NO_SETJMP SETJMP_NOT_SUPPORTED
481*a67afe4dSAndroid Build Coastguard Worker
482*a67afe4dSAndroid Build Coastguard Worker# If this is disabled it is not possible for apps to get the
483*a67afe4dSAndroid Build Coastguard Worker# values from the 'info' structure, this effectively removes
484*a67afe4dSAndroid Build Coastguard Worker# quite a lot of the READ API.
485*a67afe4dSAndroid Build Coastguard Worker
486*a67afe4dSAndroid Build Coastguard Workeroption EASY_ACCESS
487*a67afe4dSAndroid Build Coastguard Worker
488*a67afe4dSAndroid Build Coastguard Worker# Added at libpng-1.2.0
489*a67afe4dSAndroid Build Coastguard Worker
490*a67afe4dSAndroid Build Coastguard Workeroption USER_MEM
491*a67afe4dSAndroid Build Coastguard Worker
492*a67afe4dSAndroid Build Coastguard Worker# Added at libpng-1.4.0
493*a67afe4dSAndroid Build Coastguard Worker
494*a67afe4dSAndroid Build Coastguard Workeroption IO_STATE
495*a67afe4dSAndroid Build Coastguard Worker
496*a67afe4dSAndroid Build Coastguard Worker# Libpng limits: limit the size of images and data on read.
497*a67afe4dSAndroid Build Coastguard Worker#
498*a67afe4dSAndroid Build Coastguard Worker# If this option is disabled all the limit checking code will be disabled:
499*a67afe4dSAndroid Build Coastguard Worker
500*a67afe4dSAndroid Build Coastguard Workeroption USER_LIMITS requires READ
501*a67afe4dSAndroid Build Coastguard Worker
502*a67afe4dSAndroid Build Coastguard Worker# The default settings given below for the limits mean that libpng will
503*a67afe4dSAndroid Build Coastguard Worker# limit the size of images or the size of data in ancillary chunks to less
504*a67afe4dSAndroid Build Coastguard Worker# than the specification or implementation limits. Settings have the
505*a67afe4dSAndroid Build Coastguard Worker# following interpretations:
506*a67afe4dSAndroid Build Coastguard Worker#
507*a67afe4dSAndroid Build Coastguard Worker# USER_WIDTH_MAX: maximum width of an image that will be read
508*a67afe4dSAndroid Build Coastguard Worker# USER_HEIGHT_MAX: maximum height
509*a67afe4dSAndroid Build Coastguard Worker# USER_CHUNK_MALLOC_MAX: maximum in-memory (decompressed) size of a single chunk
510*a67afe4dSAndroid Build Coastguard Worker# USER_CHUNK_CACHE_MAX: maximum number of chunks to be cached
511*a67afe4dSAndroid Build Coastguard Worker#
512*a67afe4dSAndroid Build Coastguard Worker# Only chunks that are variable in number are counted towards the
513*a67afe4dSAndroid Build Coastguard Worker
514*a67afe4dSAndroid Build Coastguard Worker# Use 0x7fffffff for unlimited
515*a67afe4dSAndroid Build Coastguard Workersetting USER_WIDTH_MAX default        1000000
516*a67afe4dSAndroid Build Coastguard Workersetting USER_HEIGHT_MAX default       1000000
517*a67afe4dSAndroid Build Coastguard Worker
518*a67afe4dSAndroid Build Coastguard Worker# Use 0 for unlimited
519*a67afe4dSAndroid Build Coastguard Workersetting USER_CHUNK_CACHE_MAX default     1000
520*a67afe4dSAndroid Build Coastguard Workersetting USER_CHUNK_MALLOC_MAX default 8000000
521*a67afe4dSAndroid Build Coastguard Worker
522*a67afe4dSAndroid Build Coastguard Worker# If this option is enabled APIs to set the above limits at run time are added;
523*a67afe4dSAndroid Build Coastguard Worker# without this the hardwired (compile time) limits will be used.
524*a67afe4dSAndroid Build Coastguard Workeroption SET_USER_LIMITS requires USER_LIMITS
525*a67afe4dSAndroid Build Coastguard Worker
526*a67afe4dSAndroid Build Coastguard Worker# All of the following options relate to code capabilities for
527*a67afe4dSAndroid Build Coastguard Worker# processing image data before creating a PNG or after reading one.
528*a67afe4dSAndroid Build Coastguard Worker# You can remove these capabilities safely and still be PNG
529*a67afe4dSAndroid Build Coastguard Worker# conformant, however the library that results is still non-standard.
530*a67afe4dSAndroid Build Coastguard Worker# See the comments above about how to change options and settings.
531*a67afe4dSAndroid Build Coastguard Worker
532*a67afe4dSAndroid Build Coastguard Worker# READ options
533*a67afe4dSAndroid Build Coastguard Worker#
534*a67afe4dSAndroid Build Coastguard Worker# WARNING: in libpng 1.5 maintained configuration compatibility with earlier
535*a67afe4dSAndroid Build Coastguard Worker# versions.  In some cases turning off an option turned off other options, in
536*a67afe4dSAndroid Build Coastguard Worker# others it was ineffective unless dependent options were also turned off.
537*a67afe4dSAndroid Build Coastguard Worker# Libpng 1.6 changes this: in general if you turn off an option that affects
538*a67afe4dSAndroid Build Coastguard Worker# APIs it stays off and simply disables APIs that depend on it.
539*a67afe4dSAndroid Build Coastguard Worker#
540*a67afe4dSAndroid Build Coastguard Worker# As a result if you simply port the libpng 1.5 configuration to libpng 1.6 you
541*a67afe4dSAndroid Build Coastguard Worker# will probably see build failures due to missing APIs.  Fixing these failures
542*a67afe4dSAndroid Build Coastguard Worker# requires some, perhaps considerable, knowledge of what your libpng using
543*a67afe4dSAndroid Build Coastguard Worker# applications are doing, fortunately there is no great reason for you to move
544*a67afe4dSAndroid Build Coastguard Worker# to libpng 1.6; the new interfaces in 1.6 will take several years to become
545*a67afe4dSAndroid Build Coastguard Worker# popular.
546*a67afe4dSAndroid Build Coastguard Worker
547*a67afe4dSAndroid Build Coastguard Workeroption READ enables READ_INTERLACING SET_OPTION
548*a67afe4dSAndroid Build Coastguard Worker
549*a67afe4dSAndroid Build Coastguard Worker# Disabling READ_16BIT does not disable reading 16-bit PNG files, but it
550*a67afe4dSAndroid Build Coastguard Worker# forces them to be chopped down to 8-bit, and disables any 16-bit
551*a67afe4dSAndroid Build Coastguard Worker# processing after that has happened.  You need to be sure to enable
552*a67afe4dSAndroid Build Coastguard Worker# READ_SCALE_16_TO_8 or READ_STRIP_16_TO_8 when you disable READ_16BIT for
553*a67afe4dSAndroid Build Coastguard Worker# this to work properly.  You should disable the other option if you need to
554*a67afe4dSAndroid Build Coastguard Worker# ensure a particular conversion (otherwise the app can chose.)
555*a67afe4dSAndroid Build Coastguard Worker
556*a67afe4dSAndroid Build Coastguard Workeroption READ_16BIT requires READ enables 16BIT
557*a67afe4dSAndroid Build Coastguard Worker
558*a67afe4dSAndroid Build Coastguard Workeroption READ_QUANTIZE requires READ
559*a67afe4dSAndroid Build Coastguard Worker
560*a67afe4dSAndroid Build Coastguard Workeroption READ_TRANSFORMS requires READ
561*a67afe4dSAndroid Build Coastguard Worker= NO_READ_TRANSFORMS READ_TRANSFORMS_NOT_SUPPORTED
562*a67afe4dSAndroid Build Coastguard Worker
563*a67afe4dSAndroid Build Coastguard Worker# Read gamma handling.  Gamma processing is a core part of libpng and many of
564*a67afe4dSAndroid Build Coastguard Worker# the capabilities are dependent on libpng performing gamma correction.
565*a67afe4dSAndroid Build Coastguard Worker#
566*a67afe4dSAndroid Build Coastguard Worker# In libpng 1.6 disabling gamma processing (setting PNG_NO_READ_GAMMA)
567*a67afe4dSAndroid Build Coastguard Worker# consistently disables those parts of the API that depend on it.  Prior to
568*a67afe4dSAndroid Build Coastguard Worker# 1.6.0 this was not true; the results were unpredictable and varied between
569*a67afe4dSAndroid Build Coastguard Worker# releases.
570*a67afe4dSAndroid Build Coastguard Worker#
571*a67afe4dSAndroid Build Coastguard Worker# If you disable gamma processing and your program no longer compiles you need
572*a67afe4dSAndroid Build Coastguard Worker# to ask whether you really need the APIs that are missing.  If you do then you
573*a67afe4dSAndroid Build Coastguard Worker# almost certainly need the gamma processing.
574*a67afe4dSAndroid Build Coastguard Worker#
575*a67afe4dSAndroid Build Coastguard Worker# If you handle gamma issues outside libpng then you do not need the libpng
576*a67afe4dSAndroid Build Coastguard Worker# gamma processing; and it is an enormous waste of space.  You just need to
577*a67afe4dSAndroid Build Coastguard Worker# remove the use of libpng APIs that depend on it.
578*a67afe4dSAndroid Build Coastguard Workeroption READ_GAMMA requires READ_TRANSFORMS, READ_gAMA, READ_sRGB
579*a67afe4dSAndroid Build Coastguard Worker
580*a67afe4dSAndroid Build Coastguard Workeroption READ_ALPHA_MODE requires READ_TRANSFORMS, READ_GAMMA
581*a67afe4dSAndroid Build Coastguard Workeroption READ_BACKGROUND requires READ_TRANSFORMS, READ_STRIP_ALPHA, READ_GAMMA
582*a67afe4dSAndroid Build Coastguard Workeroption READ_BGR requires READ_TRANSFORMS
583*a67afe4dSAndroid Build Coastguard Workeroption READ_EXPAND_16 requires READ_TRANSFORMS, READ_16BIT, READ_EXPAND
584*a67afe4dSAndroid Build Coastguard Workeroption READ_EXPAND requires READ_TRANSFORMS
585*a67afe4dSAndroid Build Coastguard Workeroption READ_FILLER requires READ_TRANSFORMS
586*a67afe4dSAndroid Build Coastguard Workeroption READ_GRAY_TO_RGB requires READ_TRANSFORMS
587*a67afe4dSAndroid Build Coastguard Workeroption READ_INVERT_ALPHA requires READ_TRANSFORMS
588*a67afe4dSAndroid Build Coastguard Workeroption READ_INVERT requires READ_TRANSFORMS
589*a67afe4dSAndroid Build Coastguard Workeroption READ_PACK requires READ_TRANSFORMS
590*a67afe4dSAndroid Build Coastguard Workeroption READ_PACKSWAP requires READ_TRANSFORMS
591*a67afe4dSAndroid Build Coastguard Workeroption READ_RGB_TO_GRAY requires READ_TRANSFORMS, READ_GAMMA enables COLORSPACE
592*a67afe4dSAndroid Build Coastguard Workeroption READ_SCALE_16_TO_8 requires READ_TRANSFORMS
593*a67afe4dSAndroid Build Coastguard Workeroption READ_SHIFT requires READ_TRANSFORMS
594*a67afe4dSAndroid Build Coastguard Workeroption READ_STRIP_16_TO_8 requires READ_TRANSFORMS
595*a67afe4dSAndroid Build Coastguard Workeroption READ_STRIP_ALPHA requires READ_TRANSFORMS
596*a67afe4dSAndroid Build Coastguard Workeroption READ_SWAP_ALPHA requires READ_TRANSFORMS
597*a67afe4dSAndroid Build Coastguard Workeroption READ_SWAP requires READ_TRANSFORMS, READ_16BIT
598*a67afe4dSAndroid Build Coastguard Workeroption READ_USER_TRANSFORM requires READ_TRANSFORMS
599*a67afe4dSAndroid Build Coastguard Worker
600*a67afe4dSAndroid Build Coastguard Workeroption PROGRESSIVE_READ requires READ
601*a67afe4dSAndroid Build Coastguard Workeroption SEQUENTIAL_READ requires READ
602*a67afe4dSAndroid Build Coastguard Worker
603*a67afe4dSAndroid Build Coastguard Worker# You can define PNG_NO_PROGRESSIVE_READ if you don't do progressive reading.
604*a67afe4dSAndroid Build Coastguard Worker# This is not talking about interlacing capability!  You'll still have
605*a67afe4dSAndroid Build Coastguard Worker# interlacing unless you turn off the following which is required
606*a67afe4dSAndroid Build Coastguard Worker# for PNG-compliant decoders.  (In other words, do not do this - in
607*a67afe4dSAndroid Build Coastguard Worker# fact it can't be disabled from the command line!)
608*a67afe4dSAndroid Build Coastguard Worker#option READ_INTERLACING requires READ
609*a67afe4dSAndroid Build Coastguard Worker
610*a67afe4dSAndroid Build Coastguard Workeroption READ_COMPOSITE_NODIV requires READ
611*a67afe4dSAndroid Build Coastguard Worker= NO_READ_COMPOSITE_NODIV NO_READ_COMPOSITED_NODIV
612*a67afe4dSAndroid Build Coastguard Worker
613*a67afe4dSAndroid Build Coastguard Worker# Inch conversions
614*a67afe4dSAndroid Build Coastguard Worker
615*a67afe4dSAndroid Build Coastguard Workeroption INCH_CONVERSIONS
616*a67afe4dSAndroid Build Coastguard Worker= INCH_CONVERSIONS INCH_CONVERSIONS
617*a67afe4dSAndroid Build Coastguard Worker
618*a67afe4dSAndroid Build Coastguard Worker# API to build a grayscale palette
619*a67afe4dSAndroid Build Coastguard Worker# NOTE: this is not used internally by libpng at present.
620*a67afe4dSAndroid Build Coastguard Worker
621*a67afe4dSAndroid Build Coastguard Workeroption BUILD_GRAYSCALE_PALETTE
622*a67afe4dSAndroid Build Coastguard Worker
623*a67afe4dSAndroid Build Coastguard Worker# WRITE options
624*a67afe4dSAndroid Build Coastguard Worker
625*a67afe4dSAndroid Build Coastguard Workeroption WRITE enables WRITE_INT_FUNCTIONS
626*a67afe4dSAndroid Build Coastguard Worker
627*a67afe4dSAndroid Build Coastguard Worker# Disabling WRITE_16BIT prevents 16-bit PNG files from being
628*a67afe4dSAndroid Build Coastguard Worker# generated.
629*a67afe4dSAndroid Build Coastguard Workeroption WRITE_16BIT requires WRITE enables 16BIT
630*a67afe4dSAndroid Build Coastguard Worker
631*a67afe4dSAndroid Build Coastguard Workeroption WRITE_TRANSFORMS requires WRITE
632*a67afe4dSAndroid Build Coastguard Worker= NO_WRITE_TRANSFORMS WRITE_TRANSFORMS_NOT_SUPPORTED
633*a67afe4dSAndroid Build Coastguard Worker
634*a67afe4dSAndroid Build Coastguard Workeroption WRITE_SHIFT requires WRITE_TRANSFORMS
635*a67afe4dSAndroid Build Coastguard Workeroption WRITE_PACK requires WRITE_TRANSFORMS
636*a67afe4dSAndroid Build Coastguard Workeroption WRITE_BGR requires WRITE_TRANSFORMS
637*a67afe4dSAndroid Build Coastguard Workeroption WRITE_SWAP requires WRITE_TRANSFORMS, WRITE_16BIT
638*a67afe4dSAndroid Build Coastguard Workeroption WRITE_PACKSWAP requires WRITE_TRANSFORMS
639*a67afe4dSAndroid Build Coastguard Workeroption WRITE_INVERT requires WRITE_TRANSFORMS
640*a67afe4dSAndroid Build Coastguard Workeroption WRITE_FILLER requires WRITE_TRANSFORMS
641*a67afe4dSAndroid Build Coastguard Workeroption WRITE_SWAP_ALPHA requires WRITE_TRANSFORMS
642*a67afe4dSAndroid Build Coastguard Workeroption WRITE_INVERT_ALPHA requires WRITE_TRANSFORMS
643*a67afe4dSAndroid Build Coastguard Workeroption WRITE_USER_TRANSFORM requires WRITE_TRANSFORMS
644*a67afe4dSAndroid Build Coastguard Worker
645*a67afe4dSAndroid Build Coastguard Worker# This is not required for PNG-compliant encoders, but can cause
646*a67afe4dSAndroid Build Coastguard Worker# trouble if left undefined
647*a67afe4dSAndroid Build Coastguard Worker
648*a67afe4dSAndroid Build Coastguard Workeroption WRITE_INTERLACING requires WRITE
649*a67afe4dSAndroid Build Coastguard Worker
650*a67afe4dSAndroid Build Coastguard Worker# Deprecated, will be removed.
651*a67afe4dSAndroid Build Coastguard Workeroption WRITE_WEIGHTED_FILTER requires WRITE
652*a67afe4dSAndroid Build Coastguard Worker
653*a67afe4dSAndroid Build Coastguard Workeroption WRITE_FLUSH requires WRITE
654*a67afe4dSAndroid Build Coastguard Worker
655*a67afe4dSAndroid Build Coastguard Worker# Note: these can be turned off explicitly if not required by the
656*a67afe4dSAndroid Build Coastguard Worker# apps implementing the user transforms
657*a67afe4dSAndroid Build Coastguard Workeroption USER_TRANSFORM_PTR if READ_USER_TRANSFORM, WRITE_USER_TRANSFORM
658*a67afe4dSAndroid Build Coastguard Workeroption USER_TRANSFORM_INFO if READ_USER_TRANSFORM, WRITE_USER_TRANSFORM
659*a67afe4dSAndroid Build Coastguard Worker
660*a67afe4dSAndroid Build Coastguard Worker# This enables API to set compression parameters for compressing
661*a67afe4dSAndroid Build Coastguard Worker# non-IDAT chunks (zTXt, iTXt, iCCP, and unknown chunks).  This feature
662*a67afe4dSAndroid Build Coastguard Worker# was added at libpng-1.5.3.
663*a67afe4dSAndroid Build Coastguard Workeroption WRITE_CUSTOMIZE_ZTXT_COMPRESSION requires WRITE
664*a67afe4dSAndroid Build Coastguard Workeroption WRITE_CUSTOMIZE_COMPRESSION requires WRITE
665*a67afe4dSAndroid Build Coastguard Worker
666*a67afe4dSAndroid Build Coastguard Worker# Any chunks you are not interested in, you can undef here.  The
667*a67afe4dSAndroid Build Coastguard Worker# ones that allocate memory may be especially important (hIST,
668*a67afe4dSAndroid Build Coastguard Worker# tEXt, zTXt, tRNS, pCAL).  Others will just save time and make png_info
669*a67afe4dSAndroid Build Coastguard Worker# a bit smaller.
670*a67afe4dSAndroid Build Coastguard Worker
671*a67afe4dSAndroid Build Coastguard Worker# The size of the png_text structure changed in libpng-1.0.6 when
672*a67afe4dSAndroid Build Coastguard Worker# iTXt support was added.  iTXt support was turned off by default through
673*a67afe4dSAndroid Build Coastguard Worker# libpng-1.2.x, to support old apps that malloc the png_text structure
674*a67afe4dSAndroid Build Coastguard Worker# instead of calling png_set_text() and letting libpng malloc it.  It
675*a67afe4dSAndroid Build Coastguard Worker# was turned on by default in libpng-1.4.0.
676*a67afe4dSAndroid Build Coastguard Worker
677*a67afe4dSAndroid Build Coastguard Workeroption READ_ANCILLARY_CHUNKS requires READ
678*a67afe4dSAndroid Build Coastguard Worker# PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED is deprecated.
679*a67afe4dSAndroid Build Coastguard Worker= NO_READ_ANCILLARY_CHUNKS READ_ANCILLARY_CHUNKS_NOT_SUPPORTED
680*a67afe4dSAndroid Build Coastguard Worker
681*a67afe4dSAndroid Build Coastguard Workeroption WRITE_ANCILLARY_CHUNKS requires WRITE
682*a67afe4dSAndroid Build Coastguard Worker# PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED is deprecated.
683*a67afe4dSAndroid Build Coastguard Worker= NO_WRITE_ANCILLARY_CHUNKS WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED
684*a67afe4dSAndroid Build Coastguard Worker
685*a67afe4dSAndroid Build Coastguard Worker# These options disable *all* the text chunks if turned off
686*a67afe4dSAndroid Build Coastguard Worker
687*a67afe4dSAndroid Build Coastguard Workeroption TEXT disabled
688*a67afe4dSAndroid Build Coastguard Workeroption READ_TEXT requires READ_ANCILLARY_CHUNKS enables TEXT
689*a67afe4dSAndroid Build Coastguard Workeroption WRITE_TEXT requires WRITE_ANCILLARY_CHUNKS enables TEXT
690*a67afe4dSAndroid Build Coastguard Worker
691*a67afe4dSAndroid Build Coastguard Worker# Moved to pnglibconf.h at libpng-1.5.0
692*a67afe4dSAndroid Build Coastguard Worker# Feature support: in 1.4 this was in pngconf.h, but the following
693*a67afe4dSAndroid Build Coastguard Worker# features have no affect on the libpng API.  Add library
694*a67afe4dSAndroid Build Coastguard Worker# only features to the end of this list.  Add features that
695*a67afe4dSAndroid Build Coastguard Worker# affect the API above.  (Note: the list of chunks follows
696*a67afe4dSAndroid Build Coastguard Worker# the library-only settings.)
697*a67afe4dSAndroid Build Coastguard Worker#
698*a67afe4dSAndroid Build Coastguard Worker# BUILD TIME ONLY OPTIONS
699*a67afe4dSAndroid Build Coastguard Worker#   These options do not affect the API but rather alter how the
700*a67afe4dSAndroid Build Coastguard Worker#   API is implemented, they get recorded in pnglibconf.h, but
701*a67afe4dSAndroid Build Coastguard Worker#   can't be changed by the application.
702*a67afe4dSAndroid Build Coastguard Worker
703*a67afe4dSAndroid Build Coastguard Worker# Colorspace support (enabled as required); just the support for colorant
704*a67afe4dSAndroid Build Coastguard Worker# information.  Gamma support, likewise, is just support for the gamma
705*a67afe4dSAndroid Build Coastguard Worker# information, READ_GAMMA is required for gamma transformations (so it
706*a67afe4dSAndroid Build Coastguard Worker# is possible to read PNG gamma without enabling all the libpng transform
707*a67afe4dSAndroid Build Coastguard Worker# code - do this for applications that do their own gamma processing)
708*a67afe4dSAndroid Build Coastguard Worker#
709*a67afe4dSAndroid Build Coastguard Worker# As of 1.6.0 COLORSPACE is only useful if the application processes the
710*a67afe4dSAndroid Build Coastguard Worker# information; this is because the library does not do any colorspace
711*a67afe4dSAndroid Build Coastguard Worker# processing, it just validates the data in the PNG file.
712*a67afe4dSAndroid Build Coastguard Worker
713*a67afe4dSAndroid Build Coastguard Workeroption GAMMA disabled
714*a67afe4dSAndroid Build Coastguard Workeroption COLORSPACE enables GAMMA disabled
715*a67afe4dSAndroid Build Coastguard Worker
716*a67afe4dSAndroid Build Coastguard Worker# When an ICC profile is read, or png_set, it will be checked for a match
717*a67afe4dSAndroid Build Coastguard Worker# against known sRGB profiles if the sRGB handling is enabled.  The
718*a67afe4dSAndroid Build Coastguard Worker# PNG_sRGB_PROFILE_CHECKS setting controls how much work is done during the
719*a67afe4dSAndroid Build Coastguard Worker# check:
720*a67afe4dSAndroid Build Coastguard Worker#
721*a67afe4dSAndroid Build Coastguard Worker# -1: Don't do any sRGB profile checking.
722*a67afe4dSAndroid Build Coastguard Worker#
723*a67afe4dSAndroid Build Coastguard Worker#  0: Just validate the profile MD5 signature if present, otherwise use
724*a67afe4dSAndroid Build Coastguard Worker#     the checks in option 1.
725*a67afe4dSAndroid Build Coastguard Worker#
726*a67afe4dSAndroid Build Coastguard Worker#  1: Additionally check the length, intent and adler32 checksum of the
727*a67afe4dSAndroid Build Coastguard Worker#     actual data.   If enabled this will reject known profiles that have
728*a67afe4dSAndroid Build Coastguard Worker#     had the rendering intent in the header changed as well as other edits
729*a67afe4dSAndroid Build Coastguard Worker#     done without updating the checksum.  See the discussion below.
730*a67afe4dSAndroid Build Coastguard Worker#
731*a67afe4dSAndroid Build Coastguard Worker#  2: Additionally checksum all the data using the ethernet CRC32 algorithm.
732*a67afe4dSAndroid Build Coastguard Worker#     This makes it more difficult to fake profiles and makes it less likely
733*a67afe4dSAndroid Build Coastguard Worker#     to get a false positive on profiles with no signature, but is probably
734*a67afe4dSAndroid Build Coastguard Worker#     just a waste of time since all currently approved ICC sRGB profiles have
735*a67afe4dSAndroid Build Coastguard Worker#     a secure MD5 signature.
736*a67afe4dSAndroid Build Coastguard Worker#
737*a67afe4dSAndroid Build Coastguard Worker# The rendering intent.  An ICC profile stores an intended rendering intent,
738*a67afe4dSAndroid Build Coastguard Worker# but does not include the value in the signature.  The intent is documented
739*a67afe4dSAndroid Build Coastguard Worker# as the intent that should be used when combining two profiles.  The sRGB
740*a67afe4dSAndroid Build Coastguard Worker# profile is intended, however, to be used with any of the four defined intents.
741*a67afe4dSAndroid Build Coastguard Worker# For this reason the sRGB chunk includes an 'intent' to be used when displaying
742*a67afe4dSAndroid Build Coastguard Worker# the image (intent is really a property of the image not the profile.)
743*a67afe4dSAndroid Build Coastguard Worker#
744*a67afe4dSAndroid Build Coastguard Worker# Unfortunately the iCCP chunk does not.  It may therefore be that some
745*a67afe4dSAndroid Build Coastguard Worker# applications modify the intent in profiles (including sRGB profiles) to work
746*a67afe4dSAndroid Build Coastguard Worker# round this problem.  Selecting an option other than option '0' will cause such
747*a67afe4dSAndroid Build Coastguard Worker# modified profiles to be rejected.
748*a67afe4dSAndroid Build Coastguard Worker#
749*a67afe4dSAndroid Build Coastguard Worker# Security.  The use of Adler32 and CRC32 checksums does not help significantly
750*a67afe4dSAndroid Build Coastguard Worker# with any security issues.  It is relatively easy to produce arbitrary profiles
751*a67afe4dSAndroid Build Coastguard Worker# with the required checksums on current computer systems.  Nevertheless
752*a67afe4dSAndroid Build Coastguard Worker# security does not seem to be an issue because the only consequence of a false
753*a67afe4dSAndroid Build Coastguard Worker# positive is a false assertion that the profile is an sRGB profile.  This might
754*a67afe4dSAndroid Build Coastguard Worker# be used to hide data from libpng using applications, but it doesn't seem
755*a67afe4dSAndroid Build Coastguard Worker# possible to damage them.
756*a67afe4dSAndroid Build Coastguard Worker
757*a67afe4dSAndroid Build Coastguard Workersetting sRGB_PROFILE_CHECKS default 2
758*a67afe4dSAndroid Build Coastguard Worker
759*a67afe4dSAndroid Build Coastguard Worker# Artificially align memory - the code typically aligns to 8 byte
760*a67afe4dSAndroid Build Coastguard Worker# boundaries if this is switched on, it's a small waste of space
761*a67afe4dSAndroid Build Coastguard Worker# but can help (in theory) on some architectures.  Only affects
762*a67afe4dSAndroid Build Coastguard Worker# internal structures.  Added at libpng 1.4.0
763*a67afe4dSAndroid Build Coastguard Worker
764*a67afe4dSAndroid Build Coastguard Workeroption ALIGNED_MEMORY
765*a67afe4dSAndroid Build Coastguard Worker
766*a67afe4dSAndroid Build Coastguard Worker# Buggy compilers (e.g., gcc 2.7.2.2) need PNG_NO_POINTER_INDEXING
767*a67afe4dSAndroid Build Coastguard Worker# See png[wr]util.c, normally this should always be *on*
768*a67afe4dSAndroid Build Coastguard Worker
769*a67afe4dSAndroid Build Coastguard Workeroption POINTER_INDEXING
770*a67afe4dSAndroid Build Coastguard Worker
771*a67afe4dSAndroid Build Coastguard Worker# Other defines for things like memory and the like can go here.
772*a67afe4dSAndroid Build Coastguard Worker
773*a67afe4dSAndroid Build Coastguard Worker# BUILD TIME SETTINGS
774*a67afe4dSAndroid Build Coastguard Worker# Like build time options these do not affect the API, but they
775*a67afe4dSAndroid Build Coastguard Worker# may be useful to applications because they record details of
776*a67afe4dSAndroid Build Coastguard Worker# how the API will behave particularly with regard to overall
777*a67afe4dSAndroid Build Coastguard Worker# accuracy.
778*a67afe4dSAndroid Build Coastguard Worker
779*a67afe4dSAndroid Build Coastguard Worker# This controls how fine the quantizing gets.  As this allocates
780*a67afe4dSAndroid Build Coastguard Worker# a largish chunk of memory (32K), those who are not as concerned
781*a67afe4dSAndroid Build Coastguard Worker# with quantizing quality can decrease some or all of these.
782*a67afe4dSAndroid Build Coastguard Worker
783*a67afe4dSAndroid Build Coastguard Workersetting QUANTIZE_RED_BITS default 5
784*a67afe4dSAndroid Build Coastguard Workersetting QUANTIZE_GREEN_BITS default 5
785*a67afe4dSAndroid Build Coastguard Workersetting QUANTIZE_BLUE_BITS default 5
786*a67afe4dSAndroid Build Coastguard Worker
787*a67afe4dSAndroid Build Coastguard Worker# This controls how fine the gamma correction becomes when you
788*a67afe4dSAndroid Build Coastguard Worker# are only interested in 8 bits anyway.  Increasing this value
789*a67afe4dSAndroid Build Coastguard Worker# results in more memory being used, and more pow() functions
790*a67afe4dSAndroid Build Coastguard Worker# being called to fill in the gamma tables.  Don't set this value
791*a67afe4dSAndroid Build Coastguard Worker# less than 8, and even that may not work (I haven't tested it).
792*a67afe4dSAndroid Build Coastguard Worker
793*a67afe4dSAndroid Build Coastguard Workersetting MAX_GAMMA_8 default 11
794*a67afe4dSAndroid Build Coastguard Worker
795*a67afe4dSAndroid Build Coastguard Worker# This controls how much a difference in gamma we can tolerate before
796*a67afe4dSAndroid Build Coastguard Worker# we actually start doing gamma conversion, it's a fixed point value,
797*a67afe4dSAndroid Build Coastguard Worker# so the default below is 0.05, meaning libpng ignores corrections in
798*a67afe4dSAndroid Build Coastguard Worker# the range 0.95 to 1.05
799*a67afe4dSAndroid Build Coastguard Worker
800*a67afe4dSAndroid Build Coastguard Workersetting GAMMA_THRESHOLD_FIXED default 5000
801*a67afe4dSAndroid Build Coastguard Worker
802*a67afe4dSAndroid Build Coastguard Worker# Precision to use when converting a floating point value to a PNG
803*a67afe4dSAndroid Build Coastguard Worker# extension format string in an sCAL chunk (only relevant if the
804*a67afe4dSAndroid Build Coastguard Worker# floating point API is enabled)
805*a67afe4dSAndroid Build Coastguard Worker
806*a67afe4dSAndroid Build Coastguard Workersetting sCAL_PRECISION default 5
807*a67afe4dSAndroid Build Coastguard Worker
808*a67afe4dSAndroid Build Coastguard Worker# This is the size of the compression buffer, and thus the size of
809*a67afe4dSAndroid Build Coastguard Worker# an IDAT chunk.  Make this whatever size you feel is best for your
810*a67afe4dSAndroid Build Coastguard Worker# machine.  One of these will be allocated per png_struct.  When this
811*a67afe4dSAndroid Build Coastguard Worker# is full, it writes the data to the disk, and does some other
812*a67afe4dSAndroid Build Coastguard Worker# calculations.  Making this an extremely small size may slow
813*a67afe4dSAndroid Build Coastguard Worker# the library down, but you may want to experiment to determine
814*a67afe4dSAndroid Build Coastguard Worker# where it becomes significant, if you are concerned with memory
815*a67afe4dSAndroid Build Coastguard Worker# usage.  Note that zlib allocates at least 32Kb also.  For readers,
816*a67afe4dSAndroid Build Coastguard Worker# this describes the size of the buffer available to read the data in.
817*a67afe4dSAndroid Build Coastguard Worker# Unless this gets smaller than the size of a row (compressed),
818*a67afe4dSAndroid Build Coastguard Worker# it should not make much difference how big this is.
819*a67afe4dSAndroid Build Coastguard Worker
820*a67afe4dSAndroid Build Coastguard Workersetting ZBUF_SIZE default 8192
821*a67afe4dSAndroid Build Coastguard Worker
822*a67afe4dSAndroid Build Coastguard Worker# This is the size of the decompression buffer used when counting or checking
823*a67afe4dSAndroid Build Coastguard Worker# the decompressed size of an LZ stream from a compressed ancillary chunk; the
824*a67afe4dSAndroid Build Coastguard Worker# decompressed data is never used so a different size may be optimal.  This size
825*a67afe4dSAndroid Build Coastguard Worker# was determined using contrib/libtests/timepng.c with compressed zTXt data
826*a67afe4dSAndroid Build Coastguard Worker# around 11MByte in size.  Slight speed improvements (up to about 14% in
827*a67afe4dSAndroid Build Coastguard Worker# timepng) can be achieved by very large increases (to 32kbyte) on regular data,
828*a67afe4dSAndroid Build Coastguard Worker# but highly compressible data shows only around 2% improvement.   The size is
829*a67afe4dSAndroid Build Coastguard Worker# chosen to minimize the effects of DoS attacks based on using very large
830*a67afe4dSAndroid Build Coastguard Worker# amounts of highly compressible data.
831*a67afe4dSAndroid Build Coastguard Worker
832*a67afe4dSAndroid Build Coastguard Workersetting INFLATE_BUF_SIZE default 1024
833*a67afe4dSAndroid Build Coastguard Worker
834*a67afe4dSAndroid Build Coastguard Worker# This is the maximum amount of IDAT data that the sequential reader will
835*a67afe4dSAndroid Build Coastguard Worker# process at one time.  The setting does not affect the size of IDAT chunks
836*a67afe4dSAndroid Build Coastguard Worker# read, just the amount read at once.  Neither does it affect the progressive
837*a67afe4dSAndroid Build Coastguard Worker# reader, which processes just the amount of data the application gives it.
838*a67afe4dSAndroid Build Coastguard Worker# The sequential reader is currently unable to process more than one IDAT at
839*a67afe4dSAndroid Build Coastguard Worker# once - it has to read and process each one in turn.  There is no point setting
840*a67afe4dSAndroid Build Coastguard Worker# this to a value larger than the IDAT chunks typically encountered (it would
841*a67afe4dSAndroid Build Coastguard Worker# just waste memory) but there may be some point in reducing it below the value
842*a67afe4dSAndroid Build Coastguard Worker# of ZBUF_SIZE (the size of IDAT chunks written by libpng.)
843*a67afe4dSAndroid Build Coastguard Worker
844*a67afe4dSAndroid Build Coastguard Workersetting IDAT_READ_SIZE default PNG_ZBUF_SIZE
845*a67afe4dSAndroid Build Coastguard Worker
846*a67afe4dSAndroid Build Coastguard Worker# Ancillary chunks
847*a67afe4dSAndroid Build Coastguard Workerchunk bKGD
848*a67afe4dSAndroid Build Coastguard Workerchunk cHRM enables COLORSPACE
849*a67afe4dSAndroid Build Coastguard Workerchunk eXIf
850*a67afe4dSAndroid Build Coastguard Workerchunk gAMA enables GAMMA
851*a67afe4dSAndroid Build Coastguard Workerchunk hIST
852*a67afe4dSAndroid Build Coastguard Workerchunk iCCP enables COLORSPACE, GAMMA
853*a67afe4dSAndroid Build Coastguard Workerchunk iTXt enables TEXT
854*a67afe4dSAndroid Build Coastguard Workerchunk oFFs
855*a67afe4dSAndroid Build Coastguard Workerchunk pCAL
856*a67afe4dSAndroid Build Coastguard Workerchunk pHYs
857*a67afe4dSAndroid Build Coastguard Workerchunk sBIT
858*a67afe4dSAndroid Build Coastguard Workerchunk sCAL
859*a67afe4dSAndroid Build Coastguard Workerchunk sPLT
860*a67afe4dSAndroid Build Coastguard Workerchunk sRGB enables COLORSPACE, GAMMA, SET_OPTION
861*a67afe4dSAndroid Build Coastguard Workerchunk tEXt requires TEXT
862*a67afe4dSAndroid Build Coastguard Workerchunk tIME
863*a67afe4dSAndroid Build Coastguard Workerchunk tRNS
864*a67afe4dSAndroid Build Coastguard Workerchunk zTXt enables TEXT
865*a67afe4dSAndroid Build Coastguard Worker
866*a67afe4dSAndroid Build Coastguard Worker# This only affects support of the optional PLTE chunk in RGB and RGBA
867*a67afe4dSAndroid Build Coastguard Worker# images.  Notice that READ_ANCILLARY_CHUNKS therefore disables part
868*a67afe4dSAndroid Build Coastguard Worker# of the regular chunk reading too.
869*a67afe4dSAndroid Build Coastguard Worker
870*a67afe4dSAndroid Build Coastguard Workeroption READ_OPT_PLTE requires READ_ANCILLARY_CHUNKS
871*a67afe4dSAndroid Build Coastguard Worker
872*a67afe4dSAndroid Build Coastguard Worker# Unknown chunk handling
873*a67afe4dSAndroid Build Coastguard Worker#
874*a67afe4dSAndroid Build Coastguard Worker# 'UNKNOWN_CHUNKS' is a global option to disable all unknown chunk handling on
875*a67afe4dSAndroid Build Coastguard Worker# read or write; everything else below requires it (directly or indirectly).
876*a67afe4dSAndroid Build Coastguard Workeroption UNKNOWN_CHUNKS
877*a67afe4dSAndroid Build Coastguard Worker
878*a67afe4dSAndroid Build Coastguard Worker# There are three main options to control the ability to read and write unknown
879*a67afe4dSAndroid Build Coastguard Worker# chunks.  If either read option is turned on then unknown chunks will be read,
880*a67afe4dSAndroid Build Coastguard Worker# otherwise they are skipped.  If the write option is turned on unknown chunks
881*a67afe4dSAndroid Build Coastguard Worker# set by png_set_unknown_chunks will be written otherwise it is an error to call
882*a67afe4dSAndroid Build Coastguard Worker# that API on a write struct.
883*a67afe4dSAndroid Build Coastguard Workeroption WRITE_UNKNOWN_CHUNKS requires WRITE requires UNKNOWN_CHUNKS
884*a67afe4dSAndroid Build Coastguard Workeroption WRITE_UNKNOWN_CHUNKS enables STORE_UNKNOWN_CHUNKS
885*a67afe4dSAndroid Build Coastguard Worker
886*a67afe4dSAndroid Build Coastguard Worker# The first way to read user chunks is to have libpng save them for a later call
887*a67afe4dSAndroid Build Coastguard Worker# to png_get_unknown_chunks, the application must call
888*a67afe4dSAndroid Build Coastguard Worker# png_set_keep_unknown_chunks to cause this to actually happen (see png.h)
889*a67afe4dSAndroid Build Coastguard Workeroption SAVE_UNKNOWN_CHUNKS requires READ requires SET_UNKNOWN_CHUNKS
890*a67afe4dSAndroid Build Coastguard Workeroption SAVE_UNKNOWN_CHUNKS enables READ_UNKNOWN_CHUNKS, STORE_UNKNOWN_CHUNKS
891*a67afe4dSAndroid Build Coastguard Worker
892*a67afe4dSAndroid Build Coastguard Worker# The second approach is to use an application provided callback to process the
893*a67afe4dSAndroid Build Coastguard Worker# chunks, the callback can either handle the chunk entirely itself or request
894*a67afe4dSAndroid Build Coastguard Worker# that libpng store the chunk for later retrieval via png_get_unknown_chunks.
895*a67afe4dSAndroid Build Coastguard Worker#
896*a67afe4dSAndroid Build Coastguard Worker# NOTE: If STORE_UNKNOWN_CHUNKS is not enabled (which is the default if
897*a67afe4dSAndroid Build Coastguard Worker# both SAVE_UNKNOWN_CHUNKS and WRITE_UNKNOWN_CHUNKS are disabled) then a
898*a67afe4dSAndroid Build Coastguard Worker# 0 result from the callback will be ignored because no support for saving
899*a67afe4dSAndroid Build Coastguard Worker# unknown chunks has been compiled in.  The normal symptom is that your app
900*a67afe4dSAndroid Build Coastguard Worker# fails to compile because png_get_unknown_chunks is no longer defined in png.h.
901*a67afe4dSAndroid Build Coastguard Worker# If you encounter this issue simply enable STORE_UNKNOWN_CHUNKS in your build.
902*a67afe4dSAndroid Build Coastguard Worker#
903*a67afe4dSAndroid Build Coastguard Worker# Note that there is no 'WRITE_USER_CHUNKS' so the USER_CHUNKS option is always
904*a67afe4dSAndroid Build Coastguard Worker# the same as READ_USER_CHUNKS at present
905*a67afe4dSAndroid Build Coastguard Workeroption READ_USER_CHUNKS requires READ, UNKNOWN_CHUNKS
906*a67afe4dSAndroid Build Coastguard Workeroption READ_USER_CHUNKS enables READ_UNKNOWN_CHUNKS, USER_CHUNKS
907*a67afe4dSAndroid Build Coastguard Worker
908*a67afe4dSAndroid Build Coastguard Worker# Two further options are provided to allow detailed control of the handling.
909*a67afe4dSAndroid Build Coastguard Worker# The first enables png_set_keep_unknown_chunks; this allows the default to be
910*a67afe4dSAndroid Build Coastguard Worker# changed from discarding unknown chunks and allows per-chunk control.  This is
911*a67afe4dSAndroid Build Coastguard Worker# required to use the SAVE_UNKNOWN_CHUNKS option.  If enabled this option also
912*a67afe4dSAndroid Build Coastguard Worker# applies to write (see png.h), otherwise the write API simply writes all the
913*a67afe4dSAndroid Build Coastguard Worker# chunks it is given.
914*a67afe4dSAndroid Build Coastguard Worker#
915*a67afe4dSAndroid Build Coastguard Worker# The second option extends the unknown handling to allow known chunks to be
916*a67afe4dSAndroid Build Coastguard Worker# handled as though they were unknown.  This option doesn't change any APIs, it
917*a67afe4dSAndroid Build Coastguard Worker# merely turns on the code to check known as well as unknown chunks.
918*a67afe4dSAndroid Build Coastguard Worker#
919*a67afe4dSAndroid Build Coastguard Worker# This option no longer affects the write code.  It can be safely disabled and
920*a67afe4dSAndroid Build Coastguard Worker# will prevent applications stopping libpng reading known chunks.
921*a67afe4dSAndroid Build Coastguard Workeroption SET_UNKNOWN_CHUNKS requires UNKNOWN_CHUNKS
922*a67afe4dSAndroid Build Coastguard Workeroption HANDLE_AS_UNKNOWN requires SET_UNKNOWN_CHUNKS
923*a67afe4dSAndroid Build Coastguard Worker
924*a67afe4dSAndroid Build Coastguard Worker# The following options are derived from the above and should not be turned on
925*a67afe4dSAndroid Build Coastguard Worker# explicitly.
926*a67afe4dSAndroid Build Coastguard Workeroption READ_UNKNOWN_CHUNKS requires UNKNOWN_CHUNKS disabled
927*a67afe4dSAndroid Build Coastguard Workeroption STORE_UNKNOWN_CHUNKS requires UNKNOWN_CHUNKS disabled
928*a67afe4dSAndroid Build Coastguard Worker
929*a67afe4dSAndroid Build Coastguard Workeroption CONVERT_tIME requires WRITE_ANCILLARY_CHUNKS
930*a67afe4dSAndroid Build Coastguard Worker# The "tm" structure is not supported on WindowsCE
931*a67afe4dSAndroid Build Coastguard Worker
932*a67afe4dSAndroid Build Coastguard Worker@#ifdef _WIN32_WCE
933*a67afe4dSAndroid Build Coastguard Worker@#   define PNG_NO_CONVERT_tIME
934*a67afe4dSAndroid Build Coastguard Worker@#endif
935*a67afe4dSAndroid Build Coastguard Worker
936*a67afe4dSAndroid Build Coastguard Workeroption WRITE_FILTER requires WRITE
937*a67afe4dSAndroid Build Coastguard Worker
938*a67afe4dSAndroid Build Coastguard Workeroption SAVE_INT_32 disabled
939*a67afe4dSAndroid Build Coastguard Worker# png_save_int_32 is required internally for writing the ancillary chunks oFFs
940*a67afe4dSAndroid Build Coastguard Worker# and pCAL and for both reading and writing iCCP (for the generation/checking of
941*a67afe4dSAndroid Build Coastguard Worker# the corresponding cHRM/gAMA chunks) if full ICC is supported.
942*a67afe4dSAndroid Build Coastguard Worker
943*a67afe4dSAndroid Build Coastguard Worker# added at libpng-1.5.4
944*a67afe4dSAndroid Build Coastguard Worker
945*a67afe4dSAndroid Build Coastguard Workeroption WRITE_OPTIMIZE_CMF requires WRITE
946*a67afe4dSAndroid Build Coastguard Worker
947*a67afe4dSAndroid Build Coastguard Workeroption READ_COMPRESSED_TEXT disabled
948*a67afe4dSAndroid Build Coastguard Workeroption READ_iCCP enables READ_COMPRESSED_TEXT
949*a67afe4dSAndroid Build Coastguard Workeroption READ_iTXt enables READ_COMPRESSED_TEXT
950*a67afe4dSAndroid Build Coastguard Workeroption READ_zTXt enables READ_COMPRESSED_TEXT
951*a67afe4dSAndroid Build Coastguard Worker
952*a67afe4dSAndroid Build Coastguard Workeroption WRITE_oFFs enables SAVE_INT_32
953*a67afe4dSAndroid Build Coastguard Workeroption WRITE_pCAL enables SAVE_INT_32
954*a67afe4dSAndroid Build Coastguard Workeroption WRITE_cHRM enables SAVE_INT_32
955*a67afe4dSAndroid Build Coastguard Worker
956*a67afe4dSAndroid Build Coastguard Workeroption WRITE_COMPRESSED_TEXT disabled
957*a67afe4dSAndroid Build Coastguard Workeroption WRITE_iCCP enables WRITE_COMPRESSED_TEXT
958*a67afe4dSAndroid Build Coastguard Workeroption WRITE_iTXt enables WRITE_COMPRESSED_TEXT
959*a67afe4dSAndroid Build Coastguard Workeroption WRITE_zTXt enables WRITE_COMPRESSED_TEXT
960*a67afe4dSAndroid Build Coastguard Worker
961*a67afe4dSAndroid Build Coastguard Worker# Turn this off to disable png_read_png() and png_write_png() and
962*a67afe4dSAndroid Build Coastguard Worker# leave the row_pointers member out of the info structure.
963*a67afe4dSAndroid Build Coastguard Worker
964*a67afe4dSAndroid Build Coastguard Workeroption INFO_IMAGE
965*a67afe4dSAndroid Build Coastguard Worker
966*a67afe4dSAndroid Build Coastguard Worker# added at libpng-1.5.10
967*a67afe4dSAndroid Build Coastguard Worker# Turn this off to disable warning about invalid palette index and
968*a67afe4dSAndroid Build Coastguard Worker# leave the num_palette_max member out of the png structure.
969*a67afe4dSAndroid Build Coastguard Worker
970*a67afe4dSAndroid Build Coastguard Workeroption CHECK_FOR_INVALID_INDEX enables READ_CHECK_FOR_INVALID_INDEX
971*a67afe4dSAndroid Build Coastguard Workeroption CHECK_FOR_INVALID_INDEX enables WRITE_CHECK_FOR_INVALID_INDEX
972*a67afe4dSAndroid Build Coastguard Workeroption READ_CHECK_FOR_INVALID_INDEX requires READ, CHECK_FOR_INVALID_INDEX
973*a67afe4dSAndroid Build Coastguard Workeroption WRITE_CHECK_FOR_INVALID_INDEX requires WRITE, CHECK_FOR_INVALID_INDEX
974*a67afe4dSAndroid Build Coastguard Worker
975*a67afe4dSAndroid Build Coastguard Worker# added at libpng-1.5.15
976*a67afe4dSAndroid Build Coastguard Workeroption GET_PALETTE_MAX enables READ_GET_PALETTE_MAX WRITE_GET_PALETTE_MAX
977*a67afe4dSAndroid Build Coastguard Workeroption READ_GET_PALETTE_MAX requires READ_CHECK_FOR_INVALID_INDEX disabled
978*a67afe4dSAndroid Build Coastguard Workeroption WRITE_GET_PALETTE_MAX requires WRITE_CHECK_FOR_INVALID_INDEX disabled
979*a67afe4dSAndroid Build Coastguard Worker
980*a67afe4dSAndroid Build Coastguard Worker# Simplified API options (added at libpng-1.6.0)
981*a67afe4dSAndroid Build Coastguard Worker#  In libpng 1.6.8 the handling of these options was changed to used 'requires'
982*a67afe4dSAndroid Build Coastguard Worker#  throughout, so that disabling some of the low level support always disables
983*a67afe4dSAndroid Build Coastguard Worker#  the base simplified read/write API.  This much simplifies the handling and
984*a67afe4dSAndroid Build Coastguard Worker#  makes 'everything = off' work in a more intuitive way.  It eliminates a
985*a67afe4dSAndroid Build Coastguard Worker#  previously reported feature that APIs previously enabled by the simplified
986*a67afe4dSAndroid Build Coastguard Worker#  API couldn't be turned off without explicitly turning off the simplified
987*a67afe4dSAndroid Build Coastguard Worker#  APIs.
988*a67afe4dSAndroid Build Coastguard Worker#
989*a67afe4dSAndroid Build Coastguard Worker# Read:
990*a67afe4dSAndroid Build Coastguard Workeroption SIMPLIFIED_READ,
991*a67afe4dSAndroid Build Coastguard Worker   requires SEQUENTIAL_READ, READ_TRANSFORMS, SETJMP, BENIGN_ERRORS,
992*a67afe4dSAndroid Build Coastguard Worker      READ_EXPAND, READ_16BIT, READ_EXPAND_16, READ_SCALE_16_TO_8,
993*a67afe4dSAndroid Build Coastguard Worker      READ_RGB_TO_GRAY, READ_ALPHA_MODE, READ_BACKGROUND, READ_STRIP_ALPHA,
994*a67afe4dSAndroid Build Coastguard Worker      READ_FILLER, READ_SWAP, READ_PACK, READ_GRAY_TO_RGB, READ_GAMMA,
995*a67afe4dSAndroid Build Coastguard Worker      READ_tRNS, READ_bKGD, READ_gAMA, READ_cHRM, READ_sRGB, READ_sBIT
996*a67afe4dSAndroid Build Coastguard Worker
997*a67afe4dSAndroid Build Coastguard Worker# AFIRST and BGR read options:
998*a67afe4dSAndroid Build Coastguard Worker#  Prior to libpng 1.6.8 these were disabled but switched on if the low level
999*a67afe4dSAndroid Build Coastguard Worker#  libpng routines that do the swaps were enabled.  This worked but was
1000*a67afe4dSAndroid Build Coastguard Worker#  confusing.  In libpng 1.6.8 the options were changed to simple 'requires'
1001*a67afe4dSAndroid Build Coastguard Worker#  and are enabled by default.  This should work the same way in practice.
1002*a67afe4dSAndroid Build Coastguard Workeroption SIMPLIFIED_READ_AFIRST enables FORMAT_AFIRST,
1003*a67afe4dSAndroid Build Coastguard Worker   requires SIMPLIFIED_READ READ_SWAP_ALPHA
1004*a67afe4dSAndroid Build Coastguard Worker
1005*a67afe4dSAndroid Build Coastguard Workeroption SIMPLIFIED_READ_BGR enables FORMAT_BGR,
1006*a67afe4dSAndroid Build Coastguard Worker   requires SIMPLIFIED_READ READ_BGR
1007*a67afe4dSAndroid Build Coastguard Worker
1008*a67afe4dSAndroid Build Coastguard Worker# Write:
1009*a67afe4dSAndroid Build Coastguard Workeroption SIMPLIFIED_WRITE,
1010*a67afe4dSAndroid Build Coastguard Worker   requires WRITE, SETJMP, WRITE_SWAP, WRITE_PACK,
1011*a67afe4dSAndroid Build Coastguard Worker      WRITE_tRNS, WRITE_gAMA, WRITE_sRGB, WRITE_cHRM
1012*a67afe4dSAndroid Build Coastguard Worker
1013*a67afe4dSAndroid Build Coastguard Worker# 1.6.22: allow simplified write without stdio support:
1014*a67afe4dSAndroid Build Coastguard Workeroption SIMPLIFIED_WRITE_STDIO requires SIMPLIFIED_WRITE STDIO
1015*a67afe4dSAndroid Build Coastguard Worker
1016*a67afe4dSAndroid Build Coastguard Workeroption SIMPLIFIED_WRITE_AFIRST enables FORMAT_AFIRST,
1017*a67afe4dSAndroid Build Coastguard Worker   requires SIMPLIFIED_WRITE WRITE_SWAP_ALPHA
1018*a67afe4dSAndroid Build Coastguard Worker
1019*a67afe4dSAndroid Build Coastguard Workeroption SIMPLIFIED_WRITE_BGR enables FORMAT_BGR,
1020*a67afe4dSAndroid Build Coastguard Worker   requires SIMPLIFIED_WRITE WRITE_BGR
1021*a67afe4dSAndroid Build Coastguard Worker
1022*a67afe4dSAndroid Build Coastguard Worker# Formats:
1023*a67afe4dSAndroid Build Coastguard Workeroption FORMAT_AFIRST disabled
1024*a67afe4dSAndroid Build Coastguard Workeroption FORMAT_BGR disabled
1025