1 /* ************************************************************************** */ 2 /* * * */ 3 /* * project : libmng * */ 4 /* * file : mozlibmngconf.h copyright (c) G.R-P 2003-2005 * */ 5 /* * version : 1.0.10 * */ 6 /* * * */ 7 /* * purpose : special config file for Mozilla * */ 8 /* * * */ 9 /* * author : Glenn Randers-Pehrson * */ 10 /* * * */ 11 /* * comment : This is the configuration file designed to minimize * */ 12 /* * footprint for the integration with Mozilla. * */ 13 /* * * */ 14 /* * changes : * */ 15 /* * * */ 16 /* ************************************************************************** */ 17 18 #ifndef _mozlibmng_conf_h_ 19 #define _mozlibmng_conf_h_ 20 21 /* Mozilla defines */ 22 23 /* One or none of these may be defined via MNG_CFLAGS in "configure" */ 24 25 #if defined(MNG_BUILD_RAW_MNG) || \ 26 defined(MNG_BUILD_FULL_MNG) || \ 27 defined(MNG_BUILD_MOZ_MNG) || \ 28 defined(MNG_BUILD_MOZ_NO_JNG) || \ 29 defined(MNG_BUILD_WEB_MNG) || \ 30 defined(MNG_BUILD_WEB_NO_JNG) || \ 31 defined(MNG_BUILD_LC) || \ 32 defined(MNG_BUILD_LC_NO_JNG) || \ 33 defined(MNG_BUILD_VLC) 34 # define MNG_BUILD_DEFINED 35 #endif 36 37 #ifndef MNG_BUILD_DEFINED 38 #define MNG_BUILD_FULL_MNG 39 #define MNG_BUILD_DEFINED 40 #endif 41 42 #if defined(MNG_BUILD_FULL_MNG) 43 #define MNG_DISABLE_UNUSED 44 #endif 45 46 #if defined(MNG_BUILD_MOZ_MNG) 47 #define MNG_DISABLE_UNUSED 48 #define MNG_ENABLE_FOOTPRINT 49 #endif 50 51 #if defined(MNG_BUILD_MOZ_NO_JNG) 52 #define MNG_DISABLE_UNUSED 53 #define MNG_ENABLE_FOOTPRINT 54 #define MNG_DISABLE_JNG 55 #endif 56 57 #if defined(MNG_BUILD_WEB_MNG) 58 #define MNG_DISABLE_UNUSED 59 #define MNG_DISABLE_DELTA_PNG 60 #define MNG_ENABLE_FOOTPRINT 61 #define MNG_SKIPCHUNK_MAGN 62 #endif 63 64 #if defined(MNG_BUILD_WEB_NO_JNG) 65 #define MNG_DISABLE_UNUSED 66 #define MNG_DISABLE_DELTA_PNG 67 #define MNG_ENABLE_FOOTPRINT 68 #define MNG_SKIPCHUNK_MAGN 69 #define MNG_DISABLE_JNG 70 #endif 71 72 #if defined(MNG_BUILD_LC) 73 #define MNG_DISABLE_DELTA_PNG 74 #define MNG_DISABLE_UNUSED 75 #define MNG_ENABLE_FOOTPRINT 76 #define MNG_DISABLE_16_BIT 77 #define MNG_DISABLE_NON_LC 78 #endif 79 80 #if defined(MNG_BUILD_LC_NO_JNG) 81 #define MNG_DISABLE_DELTA_PNG 82 #define MNG_DISABLE_UNUSED 83 #define MNG_ENABLE_FOOTPRINT 84 #define MNG_DISABLE_16_BIT 85 #define MNG_DISABLE_JNG 86 #define MNG_DISABLE_NON_LC 87 #endif 88 89 #if defined(MNG_BUILD_VLC) 90 #define MNG_DISABLE_DELTA_PNG 91 #define MNG_DISABLE_UNUSED 92 #define MNG_ENABLE_FOOTPRINT 93 #define MNG_DISABLE_16_BIT 94 #define MNG_DISABLE_JNG 95 #define MNG_DISABLE_NON_LC 96 #define MNG_DISABLE_NON_VLC 97 #endif 98 99 #if defined(MNG_ENABLE_FOOTPRINT) 100 /* Perform footprint optimizations */ 101 #define MNG_OPTIMIZE_FOOTPRINT_COMPOSE 102 #define MNG_OPTIMIZE_FOOTPRINT_DIV 103 #define MNG_OPTIMIZE_FOOTPRINT_SWITCH 104 #define MNG_DECREMENT_LOOPS 105 #define MNG_USE_ZLIB_CRC 106 #define MNG_OPTIMIZE_FOOTPRINT_INIT 107 #define MNG_OPTIMIZE_FOOTPRINT_MAGN 108 #define MNG_OPTIMIZE_OBJCLEANUP 109 #define MNG_OPTIMIZE_CHUNKINITFREE 110 #define MNG_OPTIMIZE_CHUNKASSIGN 111 #endif 112 113 #if defined(MNG_DISABLE_UNUSED) 114 /* Eliminate unused features from libmng */ 115 #define MNG_NO_VERSION_QUERY_SUPPORT 116 #define MNG_NO_OLD_VERSIONS 117 118 #ifdef MOZ_CAIRO_GFX 119 #define MNG_SKIPCANVAS_RGB8 120 #define MNG_SKIPCANVAS_RGB8_A8 121 #else 122 #define MNG_SKIPCANVAS_BGRA8_PM 123 #endif 124 125 #define MNG_SKIPCANVAS_ABGR8 126 #define MNG_SKIPCANVAS_ARGB8 127 #define MNG_SKIPCANVAS_BGR8 128 #define MNG_SKIPCANVAS_BGRX8 129 #define MNG_SKIPCANVAS_BGRA8 130 #define MNG_SKIPCANVAS_RGBA8_PM 131 #define MNG_SKIPCANVAS_ARGB8_PM 132 #define MNG_SKIPCANVAS_ABGR8_PM 133 #define MNG_SKIPCANVAS_RGBA8 134 #define MNG_SKIPCANVAS_RGB555 135 #define MNG_SKIPCANVAS_BGR555 136 #define MNG_SKIPCANVAS_RGB565 137 #define MNG_SKIPCANVAS_BGR565 138 #define MNG_SKIPCANVAS_RGBA565 139 #define MNG_SKIPCANVAS_BGRA565 140 #define MNG_SKIPCANVAS_BGR565_A8 141 #define MNG_SKIP_MAXCANVAS 142 #define MNG_SKIPCHUNK_tEXt 143 #define MNG_SKIPCHUNK_zTXt 144 #define MNG_SKIPCHUNK_iTXt 145 #define MNG_SKIPCHUNK_bKGD 146 #define MNG_SKIPCHUNK_cHRM 147 #define MNG_SKIPCHUNK_hIST 148 #define MNG_SKIPCHUNK_iCCP 149 #define MNG_SKIPCHUNK_pHYs 150 #define MNG_SKIPCHUNK_sBIT 151 #define MNG_SKIPCHUNK_sPLT 152 #define MNG_SKIPCHUNK_tIME 153 #define MNG_SKIPCHUNK_evNT 154 #define MNG_SKIPCHUNK_eXPI 155 #define MNG_SKIPCHUNK_fPRI 156 #define MNG_SKIPCHUNK_nEED 157 #define MNG_SKIPCHUNK_pHYg 158 /* Eliminate "critical" but safe-to-ignore chunks (see mng_read_unknown()) */ 159 #define MNG_SKIPCHUNK_SAVE 160 #define MNG_SKIPCHUNK_SEEK 161 #define MNG_SKIPCHUNK_DBYK 162 #define MNG_SKIPCHUNK_ORDR 163 /* Eliminate unused zlib and jpeg "get" and "set" accessors */ 164 #define MNG_NO_ACCESS_ZLIB 165 #define MNG_NO_ACCESS_JPEG 166 /* Eliminate other unused features */ 167 #define MNG_NO_SUPPORT_FUNCQUERY 168 #define MNG_NO_DISPLAY_GO_SUPPORTED 169 #define MNG_NO_CURRENT_INFO 170 #define MNG_NO_DFLT_INFO 171 #define MNG_NO_LOOP_SIGNALS_SUPPORTED 172 #define MNG_NO_OPEN_CLOSE_STREAM 173 #endif 174 175 #if defined(MNG_DISABLE_16_BIT) 176 /* Eliminate 16-bit support from libmng */ 177 #define MNG_NO_16BIT_SUPPORT 178 #endif 179 180 #if defined(MNG_DISABLE_DELTA_PNG) 181 /* Eliminate Delta-PNG feature from libmng */ 182 #define MNG_NO_DELTA_PNG 183 #endif 184 185 #if defined(MNG_DISABLE_NON_LC) 186 /* Eliminate non-MNG-LC chunks */ 187 #define MNG_SKIPCHUNK_BASI 188 #define MNG_SKIPCHUNK_CLIP 189 #define MNG_SKIPCHUNK_CLON 190 #define MNG_SKIPCHUNK_DISC 191 #define MNG_SKIPCHUNK_MOVE 192 #define MNG_SKIPCHUNK_SHOW 193 #define MNG_SKIPCHUNK_PAST 194 #endif 195 196 #if defined(MNG_DISABLE_JNG) 197 /* If you change this you should also manually remove or restore 198 jng-recognition in mozilla/modules/libpr0n/src/imgLoader.cpp */ 199 #define MNG_NO_INCLUDE_JNG 200 #endif 201 202 #if defined(MNG_DISABLE_NON_VLC) 203 /* Eliminate non-MNG-VLC chunks */ 204 #define MNG_SKIPCHUNK_DEFI 205 #define MNG_SKIPCHUNK_FRAM 206 #define MNG_SKIPCHUNK_LOOP 207 #define MNG_SKIPCHUNK_MAGN 208 #endif 209 210 #if defined(MNG_DISABLE_OPTIONAL_VLC) 211 /* Eliminate optional MNG-VLC chunks */ 212 #define MNG_SKIPCHUNK_TERM 213 #define MNG_SKIPCHUNK_BACK 214 #define MNG_SKIPCHUNK_gAMA 215 #define MNG_SKIPCHUNK_sRGB 216 #endif 217 218 #endif /* _mozlibmng_conf_h */ 219