--- a/jpeg/jpeglib.h
+++ b/jpeg/jpeglib.h
@@ -887,60 +887,169 @@
  * characters, you are out of luck.  Get a better compiler.)
  */
 
+#ifndef NEED_SHORT_EXTERNAL_NAMES
+#define NEED_SHORT_EXTERNAL_NAMES
+#endif
 #ifdef NEED_SHORT_EXTERNAL_NAMES
-#define jpeg_std_error		jStdError
-#define jpeg_CreateCompress	jCreaCompress
-#define jpeg_CreateDecompress	jCreaDecompress
-#define jpeg_destroy_compress	jDestCompress
-#define jpeg_destroy_decompress	jDestDecompress
-#define jpeg_stdio_dest		jStdDest
-#define jpeg_stdio_src		jStdSrc
-#define jpeg_mem_dest		jMemDest
-#define jpeg_mem_src		jMemSrc
-#define jpeg_set_defaults	jSetDefaults
-#define jpeg_set_colorspace	jSetColorspace
-#define jpeg_default_colorspace	jDefColorspace
-#define jpeg_set_quality	jSetQuality
-#define jpeg_set_linear_quality	jSetLQuality
-#define jpeg_default_qtables	jDefQTables
-#define jpeg_add_quant_table	jAddQuantTable
-#define jpeg_quality_scaling	jQualityScaling
-#define jpeg_simple_progression	jSimProgress
-#define jpeg_suppress_tables	jSuppressTables
-#define jpeg_alloc_quant_table	jAlcQTable
-#define jpeg_alloc_huff_table	jAlcHTable
-#define jpeg_start_compress	jStrtCompress
-#define jpeg_write_scanlines	jWrtScanlines
-#define jpeg_finish_compress	jFinCompress
-#define jpeg_calc_jpeg_dimensions	jCjpegDimensions
-#define jpeg_write_raw_data	jWrtRawData
-#define jpeg_write_marker	jWrtMarker
-#define jpeg_write_m_header	jWrtMHeader
-#define jpeg_write_m_byte	jWrtMByte
-#define jpeg_write_tables	jWrtTables
-#define jpeg_read_header	jReadHeader
-#define jpeg_start_decompress	jStrtDecompress
-#define jpeg_read_scanlines	jReadScanlines
-#define jpeg_finish_decompress	jFinDecompress
-#define jpeg_read_raw_data	jReadRawData
-#define jpeg_has_multiple_scans	jHasMultScn
-#define jpeg_start_output	jStrtOutput
-#define jpeg_finish_output	jFinOutput
-#define jpeg_input_complete	jInComplete
-#define jpeg_new_colormap	jNewCMap
-#define jpeg_consume_input	jConsumeInput
-#define jpeg_core_output_dimensions	jCoreDimensions
-#define jpeg_calc_output_dimensions	jCalcDimensions
-#define jpeg_save_markers	jSaveMarkers
-#define jpeg_set_marker_processor	jSetMarker
-#define jpeg_read_coefficients	jReadCoefs
-#define jpeg_write_coefficients	jWrtCoefs
-#define jpeg_copy_critical_parameters	jCopyCrit
-#define jpeg_abort_compress	jAbrtCompress
-#define jpeg_abort_decompress	jAbrtDecompress
-#define jpeg_abort		jAbort
-#define jpeg_destroy		jDestroy
-#define jpeg_resync_to_restart	jResyncRestart
+#define jpeg_std_error	yourprefixhere_jStdError
+#define jpeg_CreateCompress	yourprefixhere_jCreaCompress
+#define jpeg_CreateDecompress	yourprefixhere_jCreaDecompress
+#define jpeg_destroy_compress	yourprefixhere_jDestCompress
+#define jpeg_destroy_decompress	yourprefixhere_jDestDecompress
+#define jpeg_stdio_dest	yourprefixhere_jStdDest
+#define jpeg_stdio_src	yourprefixhere_jStdSrc
+#define jpeg_mem_dest	yourprefixhere_jMemDest
+#define jpeg_mem_src	yourprefixhere_jMemSrc
+#define jpeg_set_defaults	yourprefixhere_jSetDefaults
+#define jpeg_set_colorspace	yourprefixhere_jSetColorspace
+#define jpeg_default_colorspace	yourprefixhere_jDefColorspace
+#define jpeg_set_quality	yourprefixhere_jSetQuality
+#define jpeg_set_linear_quality	yourprefixhere_jSetLQuality
+#define jpeg_default_qtables	yourprefixhere_jDefQTables
+#define jpeg_add_quant_table	yourprefixhere_jAddQuantTable
+#define jpeg_quality_scaling	yourprefixhere_jQualityScaling
+#define jpeg_simple_progression	yourprefixhere_jSimProgress
+#define jpeg_suppress_tables	yourprefixhere_jSuppressTables
+#define jpeg_alloc_quant_table	yourprefixhere_jAlcQTable
+#define jpeg_alloc_huff_table	yourprefixhere_jAlcHTable
+#define jpeg_start_compress	yourprefixhere_jStrtCompress
+#define jpeg_write_scanlines	yourprefixhere_jWrtScanlines
+#define jpeg_finish_compress	yourprefixhere_jFinCompress
+#define jpeg_calc_jpeg_dimensions	yourprefixhere_jCjpegDimensions
+#define jpeg_write_raw_data	yourprefixhere_jWrtRawData
+#define jpeg_write_marker	yourprefixhere_jWrtMarker
+#define jpeg_write_m_header	yourprefixhere_jWrtMHeader
+#define jpeg_write_m_byte	yourprefixhere_jWrtMByte
+#define jpeg_write_tables	yourprefixhere_jWrtTables
+#define jpeg_read_header	yourprefixhere_jReadHeader
+#define jpeg_start_decompress	yourprefixhere_jStrtDecompress
+#define jpeg_read_scanlines	yourprefixhere_jReadScanlines
+#define jpeg_finish_decompress	yourprefixhere_jFinDecompress
+#define jpeg_read_raw_data	yourprefixhere_jReadRawData
+#define jpeg_has_multiple_scans	yourprefixhere_jHasMultScn
+#define jpeg_start_output	yourprefixhere_jStrtOutput
+#define jpeg_finish_output	yourprefixhere_jFinOutput
+#define jpeg_input_complete	yourprefixhere_jInComplete
+#define jpeg_new_colormap	yourprefixhere_jNewCMap
+#define jpeg_consume_input	yourprefixhere_jConsumeInput
+#define jpeg_core_output_dimensions	yourprefixhere_jCoreDimensions
+#define jpeg_calc_output_dimensions	yourprefixhere_jCalcDimensions
+#define jpeg_save_markers	yourprefixhere_jSaveMarkers
+#define jpeg_set_marker_processor	yourprefixhere_jSetMarker
+#define jpeg_read_coefficients	yourprefixhere_jReadCoefs
+#define jpeg_write_coefficients	yourprefixhere_jWrtCoefs
+#define jpeg_copy_critical_parameters	yourprefixhere_jCopyCrit
+#define jpeg_abort_compress	yourprefixhere_jAbrtCompress
+#define jpeg_abort_decompress	yourprefixhere_jAbrtDecompress
+#define jpeg_abort	yourprefixhere_jAbort
+#define jpeg_destroy	yourprefixhere_jDestroy
+#define jpeg_resync_to_restart	yourprefixhere_jResyncRestart
+#define jFreeLarge	yourprefixhere_jFreeLarge
+#define jFreeSmall	yourprefixhere_jFreeSmall
+#define jGetLarge	yourprefixhere_jGetLarge
+#define jGetSmall	yourprefixhere_jGetSmall
+#define jMemAvail	yourprefixhere_jMemAvail
+#define jMemInit	yourprefixhere_jMemInit
+#define jMemTerm	yourprefixhere_jMemTerm
+#define jOpenBackStore	yourprefixhere_jOpenBackStore
+#define jCopyBlocks	yourprefixhere_jCopyBlocks
+#define jCopySamples	yourprefixhere_jCopySamples
+#define jDivRound	yourprefixhere_jDivRound
+#define jRound	yourprefixhere_jRound
+#define jIMemMgr	yourprefixhere_jIMemMgr
+#define jIAEncoder	yourprefixhere_jIAEncoder
+#define jICompress	yourprefixhere_jICompress
+#define jICMaster	yourprefixhere_jICMaster
+#define jIMWriter	yourprefixhere_jIMWriter
+#define jICMainC	yourprefixhere_jICMainC
+#define jICPrepC	yourprefixhere_jICPrepC
+#define jICCoefC	yourprefixhere_jICCoefC
+#define jICColor	yourprefixhere_jICColor
+#define jIDownsampler	yourprefixhere_jIDownsampler
+#define jIHEncoder	yourprefixhere_jIHEncoder
+#define jIFDCT	yourprefixhere_jIFDCT
+#define jFDifast	yourprefixhere_jFDifast
+#define jFDfloat	yourprefixhere_jFDfloat
+#define jFD10x10	yourprefixhere_jFD10x10
+#define jFD10x5	yourprefixhere_jFD10x5
+#define jFD11x11	yourprefixhere_jFD11x11
+#define jFD12x12	yourprefixhere_jFD12x12
+#define jFD12x6	yourprefixhere_jFD12x6
+#define jFD13x13	yourprefixhere_jFD13x13
+#define jFD14x14	yourprefixhere_jFD14x14
+#define jFD14x7	yourprefixhere_jFD14x7
+#define jFD15x15	yourprefixhere_jFD15x15
+#define jFD16x16	yourprefixhere_jFD16x16
+#define jFD16x8	yourprefixhere_jFD16x8
+#define jFD1x1	yourprefixhere_jFD1x1
+#define jFD1x2	yourprefixhere_jFD1x2
+#define jFD2x1	yourprefixhere_jFD2x1
+#define jFD2x2	yourprefixhere_jFD2x2
+#define jFD2x4	yourprefixhere_jFD2x4
+#define jFD3x3	yourprefixhere_jFD3x3
+#define jFD3x6	yourprefixhere_jFD3x6
+#define jFD4x2	yourprefixhere_jFD4x2
+#define jFD4x4	yourprefixhere_jFD4x4
+#define jFD4x8	yourprefixhere_jFD4x8
+#define jFD5x10	yourprefixhere_jFD5x10
+#define jFD5x5	yourprefixhere_jFD5x5
+#define jFD6x12	yourprefixhere_jFD6x12
+#define jFD6x3	yourprefixhere_jFD6x3
+#define jFD6x6	yourprefixhere_jFD6x6
+#define jFD7x14	yourprefixhere_jFD7x14
+#define jFD7x7	yourprefixhere_jFD7x7
+#define jFD8x16	yourprefixhere_jFD8x16
+#define jFD8x4	yourprefixhere_jFD8x4
+#define jFD9x9	yourprefixhere_jFD9x9
+#define jFDislow	yourprefixhere_jFDislow
+#define jIADecoder	yourprefixhere_jIADecoder
+#define jIDMaster	yourprefixhere_jIDMaster
+#define jIInCtlr	yourprefixhere_jIInCtlr
+#define jIMReader	yourprefixhere_jIMReader
+#define jIHDecoder	yourprefixhere_jIHDecoder
+#define jIDMainC	yourprefixhere_jIDMainC
+#define jIDCoefC	yourprefixhere_jIDCoefC
+#define jIDPostC	yourprefixhere_jIDPostC
+#define jIIDCT	yourprefixhere_jIIDCT
+#define jRDifast	yourprefixhere_jRDifast
+#define jRDfloat	yourprefixhere_jRDfloat
+#define jRD10x10	yourprefixhere_jRD10x10
+#define jRD10x5	yourprefixhere_jRD10x5
+#define jRD11x11	yourprefixhere_jRD11x11
+#define jRD12x12	yourprefixhere_jRD12x12
+#define jRD12x6	yourprefixhere_jRD12x6
+#define jRD13x13	yourprefixhere_jRD13x13
+#define jRD14x14	yourprefixhere_jRD14x14
+#define jRD14x7	yourprefixhere_jRD14x7
+#define jRD15x15	yourprefixhere_jRD15x15
+#define jRD16x16	yourprefixhere_jRD16x16
+#define jRD16x8	yourprefixhere_jRD16x8
+#define jRD1x1	yourprefixhere_jRD1x1
+#define jRD1x2	yourprefixhere_jRD1x2
+#define jRD2x1	yourprefixhere_jRD2x1
+#define jRD2x2	yourprefixhere_jRD2x2
+#define jRD2x4	yourprefixhere_jRD2x4
+#define jRD3x3	yourprefixhere_jRD3x3
+#define jRD3x8	yourprefixhere_jRD3x8
+#define jRD4x2	yourprefixhere_jRD4x2
+#define jRD4x4	yourprefixhere_jRD4x4
+#define jRD4x8	yourprefixhere_jRD4x8
+#define jRD5x10	yourprefixhere_jRD5x10
+#define jRD5x5	yourprefixhere_jRD5x5
+#define jRD6x12	yourprefixhere_jRD6x12
+#define jRD6x3	yourprefixhere_jRD6x3
+#define jRD6x6	yourprefixhere_jRD6x6
+#define jRD7x14	yourprefixhere_jRD7x14
+#define jRD7x7	yourprefixhere_jRD7x7
+#define jRD8x16	yourprefixhere_jRD8x16
+#define jRD8x4	yourprefixhere_jRD8x4
+#define jRD9x9	yourprefixhere_jRD9x9
+#define jRDislow	yourprefixhere_jRDislow
+#define jIUpsampler	yourprefixhere_jIUpsampler
+#define jIDColor	yourprefixhere_jIDColor
+#define jI1Quant	yourprefixhere_jI1Quant
+#define jI2Quant	yourprefixhere_jI2Quant
+#define jIMUpsampler	yourprefixhere_jIMUpsampler
 #endif /* NEED_SHORT_EXTERNAL_NAMES */
 
 
--- a/zlib/zconf.h.cmakein
+++ b/zlib/zconf.h.cmakein
@@ -16,141 +16,144 @@
  * Even better than compiling with -DZ_PREFIX would be to use configure to set
  * this permanently in zconf.h using "./configure --zprefix".
  */
+#ifndef Z_PREFIX
+#  define Z_PREFIX
+#endif
 #ifdef Z_PREFIX     /* may be set to #if 1 by ./configure */
 #  define Z_PREFIX_SET
 
 /* all linked symbols */
-#  define _dist_code            z__dist_code
-#  define _length_code          z__length_code
-#  define _tr_align             z__tr_align
-#  define _tr_flush_bits        z__tr_flush_bits
-#  define _tr_flush_block       z__tr_flush_block
-#  define _tr_init              z__tr_init
-#  define _tr_stored_block      z__tr_stored_block
-#  define _tr_tally             z__tr_tally
-#  define adler32               z_adler32
-#  define adler32_combine       z_adler32_combine
-#  define adler32_combine64     z_adler32_combine64
+#  define _dist_code            yourprefixhere__dist_code
+#  define _length_code          yourprefixhere__length_code
+#  define _tr_align             yourprefixhere__tr_align
+#  define _tr_flush_bits        yourprefixhere__tr_flush_bits
+#  define _tr_flush_block       yourprefixhere__tr_flush_block
+#  define _tr_init              yourprefixhere__tr_init
+#  define _tr_stored_block      yourprefixhere__tr_stored_block
+#  define _tr_tally             yourprefixhere__tr_tally
+#  define adler32               yourprefixhere_adler32
+#  define adler32_combine       yourprefixhere_adler32_combine
+#  define adler32_combine64     yourprefixhere_adler32_combine64
 #  ifndef Z_SOLO
-#    define compress              z_compress
-#    define compress2             z_compress2
-#    define compressBound         z_compressBound
+#    define compress              yourprefixhere_compress
+#    define compress2             yourprefixhere_compress2
+#    define compressBound         yourprefixhere_compressBound
 #  endif
-#  define crc32                 z_crc32
-#  define crc32_combine         z_crc32_combine
-#  define crc32_combine64       z_crc32_combine64
-#  define deflate               z_deflate
-#  define deflateBound          z_deflateBound
-#  define deflateCopy           z_deflateCopy
-#  define deflateEnd            z_deflateEnd
-#  define deflateInit2_         z_deflateInit2_
-#  define deflateInit_          z_deflateInit_
-#  define deflateParams         z_deflateParams
-#  define deflatePending        z_deflatePending
-#  define deflatePrime          z_deflatePrime
-#  define deflateReset          z_deflateReset
-#  define deflateResetKeep      z_deflateResetKeep
-#  define deflateSetDictionary  z_deflateSetDictionary
-#  define deflateSetHeader      z_deflateSetHeader
-#  define deflateTune           z_deflateTune
-#  define deflate_copyright     z_deflate_copyright
-#  define get_crc_table         z_get_crc_table
+#  define crc32                 yourprefixhere_crc32
+#  define crc32_combine         yourprefixhere_crc32_combine
+#  define crc32_combine64       yourprefixhere_crc32_combine64
+#  define deflate               yourprefixhere_deflate
+#  define deflateBound          yourprefixhere_deflateBound
+#  define deflateCopy           yourprefixhere_deflateCopy
+#  define deflateEnd            yourprefixhere_deflateEnd
+#  define deflateInit2_         yourprefixhere_deflateInit2_
+#  define deflateInit_          yourprefixhere_deflateInit_
+#  define deflateParams         yourprefixhere_deflateParams
+#  define deflatePending        yourprefixhere_deflatePending
+#  define deflatePrime          yourprefixhere_deflatePrime
+#  define deflateReset          yourprefixhere_deflateReset
+#  define deflateResetKeep      yourprefixhere_deflateResetKeep
+#  define deflateSetDictionary  yourprefixhere_deflateSetDictionary
+#  define deflateSetHeader      yourprefixhere_deflateSetHeader
+#  define deflateTune           yourprefixhere_deflateTune
+#  define deflate_copyright     yourprefixhere_deflate_copyright
+#  define get_crc_table         yourprefixhere_get_crc_table
 #  ifndef Z_SOLO
-#    define gz_error              z_gz_error
-#    define gz_intmax             z_gz_intmax
-#    define gz_strwinerror        z_gz_strwinerror
-#    define gzbuffer              z_gzbuffer
-#    define gzclearerr            z_gzclearerr
-#    define gzclose               z_gzclose
-#    define gzclose_r             z_gzclose_r
-#    define gzclose_w             z_gzclose_w
-#    define gzdirect              z_gzdirect
-#    define gzdopen               z_gzdopen
-#    define gzeof                 z_gzeof
-#    define gzerror               z_gzerror
-#    define gzflush               z_gzflush
-#    define gzgetc                z_gzgetc
-#    define gzgetc_               z_gzgetc_
-#    define gzgets                z_gzgets
-#    define gzoffset              z_gzoffset
-#    define gzoffset64            z_gzoffset64
-#    define gzopen                z_gzopen
-#    define gzopen64              z_gzopen64
+#    define gz_error              yourprefixhere_gz_error
+#    define gz_intmax             yourprefixhere_gz_intmax
+#    define gz_strwinerror        yourprefixhere_gz_strwinerror
+#    define gzbuffer              yourprefixhere_gzbuffer
+#    define gzclearerr            yourprefixhere_gzclearerr
+#    define gzclose               yourprefixhere_gzclose
+#    define gzclose_r             yourprefixhere_gzclose_r
+#    define gzclose_w             yourprefixhere_gzclose_w
+#    define gzdirect              yourprefixhere_gzdirect
+#    define gzdopen               yourprefixhere_gzdopen
+#    define gzeof                 yourprefixhere_gzeof
+#    define gzerror               yourprefixhere_gzerror
+#    define gzflush               yourprefixhere_gzflush
+#    define gzgetc                yourprefixhere_gzgetc
+#    define gzgetc_               yourprefixhere_gzgetc_
+#    define gzgets                yourprefixhere_gzgets
+#    define gzoffset              yourprefixhere_gzoffset
+#    define gzoffset64            yourprefixhere_gzoffset64
+#    define gzopen                yourprefixhere_gzopen
+#    define gzopen64              yourprefixhere_gzopen64
 #    ifdef _WIN32
-#      define gzopen_w              z_gzopen_w
+#      define gzopen_w              yourprefixhere_gzopen_w
 #    endif
-#    define gzprintf              z_gzprintf
-#    define gzvprintf             z_gzvprintf
-#    define gzputc                z_gzputc
-#    define gzputs                z_gzputs
-#    define gzread                z_gzread
-#    define gzrewind              z_gzrewind
-#    define gzseek                z_gzseek
-#    define gzseek64              z_gzseek64
-#    define gzsetparams           z_gzsetparams
-#    define gztell                z_gztell
-#    define gztell64              z_gztell64
-#    define gzungetc              z_gzungetc
-#    define gzwrite               z_gzwrite
+#    define gzprintf              yourprefixhere_gzprintf
+#    define gzvprintf             yourprefixhere_gzvprintf
+#    define gzputc                yourprefixhere_gzputc
+#    define gzputs                yourprefixhere_gzputs
+#    define gzread                yourprefixhere_gzread
+#    define gzrewind              yourprefixhere_gzrewind
+#    define gzseek                yourprefixhere_gzseek
+#    define gzseek64              yourprefixhere_gzseek64
+#    define gzsetparams           yourprefixhere_gzsetparams
+#    define gztell                yourprefixhere_gztell
+#    define gztell64              yourprefixhere_gztell64
+#    define gzungetc              yourprefixhere_gzungetc
+#    define gzwrite               yourprefixhere_gzwrite
 #  endif
-#  define inflate               z_inflate
-#  define inflateBack           z_inflateBack
-#  define inflateBackEnd        z_inflateBackEnd
-#  define inflateBackInit_      z_inflateBackInit_
-#  define inflateCopy           z_inflateCopy
-#  define inflateEnd            z_inflateEnd
-#  define inflateGetHeader      z_inflateGetHeader
-#  define inflateInit2_         z_inflateInit2_
-#  define inflateInit_          z_inflateInit_
-#  define inflateMark           z_inflateMark
-#  define inflatePrime          z_inflatePrime
-#  define inflateReset          z_inflateReset
-#  define inflateReset2         z_inflateReset2
-#  define inflateSetDictionary  z_inflateSetDictionary
-#  define inflateGetDictionary  z_inflateGetDictionary
-#  define inflateSync           z_inflateSync
-#  define inflateSyncPoint      z_inflateSyncPoint
-#  define inflateUndermine      z_inflateUndermine
-#  define inflateResetKeep      z_inflateResetKeep
-#  define inflate_copyright     z_inflate_copyright
-#  define inflate_fast          z_inflate_fast
-#  define inflate_table         z_inflate_table
+#  define inflate               yourprefixhere_inflate
+#  define inflateBack           yourprefixhere_inflateBack
+#  define inflateBackEnd        yourprefixhere_inflateBackEnd
+#  define inflateBackInit_      yourprefixhere_inflateBackInit_
+#  define inflateCopy           yourprefixhere_inflateCopy
+#  define inflateEnd            yourprefixhere_inflateEnd
+#  define inflateGetHeader      yourprefixhere_inflateGetHeader
+#  define inflateInit2_         yourprefixhere_inflateInit2_
+#  define inflateInit_          yourprefixhere_inflateInit_
+#  define inflateMark           yourprefixhere_inflateMark
+#  define inflatePrime          yourprefixhere_inflatePrime
+#  define inflateReset          yourprefixhere_inflateReset
+#  define inflateReset2         yourprefixhere_inflateReset2
+#  define inflateSetDictionary  yourprefixhere_inflateSetDictionary
+#  define inflateGetDictionary  yourprefixhere_inflateGetDictionary
+#  define inflateSync           yourprefixhere_inflateSync
+#  define inflateSyncPoint      yourprefixhere_inflateSyncPoint
+#  define inflateUndermine      yourprefixhere_inflateUndermine
+#  define inflateResetKeep      yourprefixhere_inflateResetKeep
+#  define inflate_copyright     yourprefixhere_inflate_copyright
+#  define inflate_fast          yourprefixhere_inflate_fast
+#  define inflate_table         yourprefixhere_inflate_table
 #  ifndef Z_SOLO
-#    define uncompress            z_uncompress
+#    define uncompress            yourprefixhere_uncompress
 #  endif
-#  define zError                z_zError
+#  define zError                yourprefixhere_zError
 #  ifndef Z_SOLO
-#    define zcalloc               z_zcalloc
-#    define zcfree                z_zcfree
+#    define zcalloc               yourprefixhere_zcalloc
+#    define zcfree                yourprefixhere_zcfree
 #  endif
-#  define zlibCompileFlags      z_zlibCompileFlags
-#  define zlibVersion           z_zlibVersion
+#  define zlibCompileFlags      yourprefixhere_zlibCompileFlags
+#  define zlibVersion           yourprefixhere_zlibVersion
 
 /* all zlib typedefs in zlib.h and zconf.h */
-#  define Byte                  z_Byte
-#  define Bytef                 z_Bytef
-#  define alloc_func            z_alloc_func
-#  define charf                 z_charf
-#  define free_func             z_free_func
+#  define Byte                  yourprefixhere_Byte
+#  define Bytef                 yourprefixhere_Bytef
+#  define alloc_func            yourprefixhere_alloc_func
+#  define charf                 yourprefixhere_charf
+#  define free_func             yourprefixhere_free_func
 #  ifndef Z_SOLO
-#    define gzFile                z_gzFile
+#    define gzFile                yourprefixhere_gzFile
 #  endif
-#  define gz_header             z_gz_header
-#  define gz_headerp            z_gz_headerp
-#  define in_func               z_in_func
-#  define intf                  z_intf
-#  define out_func              z_out_func
-#  define uInt                  z_uInt
-#  define uIntf                 z_uIntf
-#  define uLong                 z_uLong
-#  define uLongf                z_uLongf
-#  define voidp                 z_voidp
-#  define voidpc                z_voidpc
-#  define voidpf                z_voidpf
+#  define gz_header             yourprefixhere_gz_header
+#  define gz_headerp            yourprefixhere_gz_headerp
+#  define in_func               yourprefixhere_in_func
+#  define intf                  yourprefixhere_intf
+#  define out_func              yourprefixhere_out_func
+#  define uInt                  yourprefixhere_uInt
+#  define uIntf                 yourprefixhere_uIntf
+#  define uLong                 yourprefixhere_uLong
+#  define uLongf                yourprefixhere_uLongf
+#  define voidp                 yourprefixhere_voidp
+#  define voidpc                yourprefixhere_voidpc
+#  define voidpf                yourprefixhere_voidpf
 
 /* all zlib structs in zlib.h and zconf.h */
-#  define gz_header_s           z_gz_header_s
-#  define internal_state        z_internal_state
+#  define gz_header_s           yourprefixhere_gz_header_s
+#  define internal_state        yourprefixhere_internal_state
 
 #endif
 
