| @@ -200,6 +200,14 @@ | |||||
| #define JUCE_INCLUDE_OGGVORBIS_CODE 1 | #define JUCE_INCLUDE_OGGVORBIS_CODE 1 | ||||
| #endif | #endif | ||||
| #ifndef JUCE_INCLUDE_PNGLIB_CODE | |||||
| #define JUCE_INCLUDE_PNGLIB_CODE 1 | |||||
| #endif | |||||
| #ifndef JUCE_INCLUDE_JPEGLIB_CODE | |||||
| #define JUCE_INCLUDE_JPEGLIB_CODE 1 | |||||
| #endif | |||||
| //============================================================================= | //============================================================================= | ||||
| /** Enable this to add extra memory-leak info to the new and delete operators. | /** Enable this to add extra memory-leak info to the new and delete operators. | ||||
| @@ -37,6 +37,7 @@ | |||||
| namespace jpeglibNamespace | namespace jpeglibNamespace | ||||
| { | { | ||||
| #if JUCE_INCLUDE_JPEGLIB_CODE | |||||
| extern "C" | extern "C" | ||||
| { | { | ||||
| #define JPEG_INTERNALS | #define JPEG_INTERNALS | ||||
| @@ -112,6 +113,11 @@ namespace jpeglibNamespace | |||||
| #include "jpglib/jutils.c" | #include "jpglib/jutils.c" | ||||
| #include "jpglib/transupp.c" | #include "jpglib/transupp.c" | ||||
| } | } | ||||
| #else | |||||
| #define JPEG_INTERNALS | |||||
| #undef FAR | |||||
| #include <jpeglib.h> | |||||
| #endif | |||||
| } | } | ||||
| #if JUCE_MSVC | #if JUCE_MSVC | ||||
| @@ -38,15 +38,21 @@ | |||||
| namespace zlibNamespace | namespace zlibNamespace | ||||
| { | { | ||||
| #if JUCE_INCLUDE_ZLIB_CODE | |||||
| #undef OS_CODE | #undef OS_CODE | ||||
| #undef fdopen | #undef fdopen | ||||
| #include "../../../../../juce_core/io/streams/zlib/zlib.h" | #include "../../../../../juce_core/io/streams/zlib/zlib.h" | ||||
| #undef OS_CODE | #undef OS_CODE | ||||
| #else | |||||
| #include <zlib.h> | |||||
| #endif | |||||
| } | } | ||||
| namespace pnglibNamespace | namespace pnglibNamespace | ||||
| { | { | ||||
| using namespace zlibNamespace; | using namespace zlibNamespace; | ||||
| #if JUCE_INCLUDE_PNGLIB_CODE | |||||
| using ::malloc; | using ::malloc; | ||||
| using ::free; | using ::free; | ||||
| @@ -77,6 +83,13 @@ namespace pnglibNamespace | |||||
| #include "pnglib/pngwtran.c" | #include "pnglib/pngwtran.c" | ||||
| #include "pnglib/pngwutil.c" | #include "pnglib/pngwutil.c" | ||||
| } | } | ||||
| #else | |||||
| #define PNG_INTERNAL | |||||
| #define PNG_SETJMP_NOT_SUPPORTED | |||||
| #include <png.h> | |||||
| #include <pngconf.h> | |||||
| #endif | |||||
| } | } | ||||
| #ifdef _MSC_VER | #ifdef _MSC_VER | ||||
| @@ -33,10 +33,14 @@ | |||||
| namespace zlibNamespace | namespace zlibNamespace | ||||
| { | { | ||||
| #if JUCE_INCLUDE_ZLIB_CODE | |||||
| #undef OS_CODE | #undef OS_CODE | ||||
| #undef fdopen | #undef fdopen | ||||
| #include "zlib/zlib.h" | #include "zlib/zlib.h" | ||||
| #undef OS_CODE | #undef OS_CODE | ||||
| #else | |||||
| #include <zlib.h> | |||||
| #endif | |||||
| } | } | ||||
| BEGIN_JUCE_NAMESPACE | BEGIN_JUCE_NAMESPACE | ||||