# scripts/pnglibconf.dfa - library build configuration control # @/*- pnglibconf.dfn intermediate file @ * generated from scripts/pnglibconf.dfa @ */ # com pnglibconf.h - library build configuration com version com com Copyright (c) 1998-2015 Glenn Randers-Pehrson com com This code is released under the libpng license. com For conditions of distribution and use, see the disclaimer com and license in png.h com file pnglibconf.h scripts/pnglibconf.dfa PNGLCONF_H # This file is preprocessed by scripts/options.awk and the # C compiler to generate 'pnglibconf.h' - a list of all the # configuration options. The file lists the various options # that can *only* be specified during the libpng build; # pnglibconf.h freezes the definitions selected for the specific # build. # # The syntax is detailed in scripts/options.awk; this is a summary # only: # # setting [requires ...] [default] # #define PNG_ /* value comes from current setting */ # option [requires ...] [if ...] [enables ...] [disabled] # #define PNG__SUPPORTED if the requirements are met and # enable the other options listed # chunk [requires ...] [enables ...] [disabled] # Enable chunk processing for the given ancillary chunk; any # 'requires something' expands to READ_something for read and # WRITE_something for write, but the enables list members are # used as given (e.g. enables GAMMA just expands to that on the # correspond READ_name and WRITE_name lines.) # # "," may be used to separate options on an 'option' line and is ignored; it # doesn't change the meaning of the line. (NOT setting, where "," becomes # part of the setting!) A comma at the end of an option line causes a # continuation (the next line is included in the option too.) # # Note that the 'on' and 'off' keywords, while valid on both option # and chunk, should not be used in this file because they force the # relevant options on or off. #------------------------------------------------------------------------------- # The following setting, option and chunk values can all be changed # while building libpng: # # setting: change 'setting' lines to fine tune library performance; # changes to the settings don't affect the libpng API functionally # # option: change 'option' lines to remove or add capabilities from # or to the library; options change the library API # # chunk: change 'chunk' lines to remove capabilities to process # optional ('ancillary') chunks. This does not prevent PNG # decoding but does change the libpng API because some chunks # will be ignored. # # There are three ways of disabling features, in order of power: # # 1) Write a new '.dfa' file (say 'user.dfa') and in this file # provide override values for setting entries and turn options or # chunk values explicitly 'on' or 'off': # # setting FOO default VALUE # option BAR [on|off] # # Then add this file to the options.awk command line (the *first* # one) after this file. The make macro DFA_XTRA is provided to make # this easier (set it like CPPFLAGS prior to running ./configure). # Look at the builds below contrib/pngminim for some extreme examples # of how this can be used. # # When you set an option 'off' it will be off; if this is impossible you # will get an error when you build pnglibconf.h. If you just want to # set something off or on if it can be use 'disabled' or 'enabled' instead. # # The distributed file "user.dfa" is already included in a configure build # and you can edit this in place if you are prepared to modify the source. # # 2) Create 'pngusr.h', enter the required private build information # detailed below and #define PNG_NO_