+#if defined(_WIN32) || defined(__OS2__)
+#include "jconfig.vc"
+#else
+
/* jconfig.h. Generated automatically by configure. */
/* jconfig.cfg --- source file edited by configure script */
/* see jconfig.doc for explanations */
-#define HAVE_PROTOTYPES
-#define HAVE_UNSIGNED_CHAR
-#define HAVE_UNSIGNED_SHORT
+/* If using MetroWerks on Mac define __WXMAC__ if it isn't already
+ FIXME: Is this necessary any longer? */
+#ifdef __MWERKS__
+#if (__MWERKS__ < 0x0900) || macintosh || defined ( __MACH__ )
+# ifndef __WXMAC__
+# define __WXMAC__
+# endif
+#endif
+#endif
+
+/* use wxWidgets' configure */
+#include "wx/setup.h"
+
+/* If using Metrowerks and not using configure-generated setup */
+#if defined(__MWERKS__) && !defined(__WX_SETUP_H__)
+#if (__MWERKS__ < 0x0900) || macintosh || defined ( __MACH__ )
+
+# define USE_MAC_MEMMGR
+
+# ifdef __MACH__
+# include <ansi_prefix.mach.h>
+# include <msl_c_version.h>
+# include <stdint.h>
+# undef WCHAR_MAX
+# include <machine/ansi.h>
+# endif
+
+/* automatically includes MacHeaders */
+#elif (__MWERKS__ >= 0x0900) && __INTEL__
+ #define __WXMSW__
+#endif
+#endif
+
+#define HAVE_PROTOTYPES
+#define HAVE_UNSIGNED_CHAR
+#define HAVE_UNSIGNED_SHORT
#undef void
#undef const
-#undef CHAR_IS_UNSIGNED
-#define HAVE_STDDEF_H
-#define HAVE_STDLIB_H
+
+/* use wxWidgets' configure */
+/* #undef CHAR_IS_UNSIGNED */
+#ifdef __CHAR_UNSIGNED__
+ #ifndef CHAR_IS_UNSIGNED
+ #define CHAR_IS_UNSIGNED
+ #endif
+#else
+ #undef CHAR_IS_UNSIGNED
+#endif
+
+#define HAVE_STDDEF_H
+#define HAVE_STDLIB_H
#undef NEED_BSD_STRINGS
#undef NEED_SYS_TYPES_H
#undef NEED_FAR_POINTERS
#ifdef JPEG_INTERNALS
#undef RIGHT_SHIFT_IS_UNSIGNED
-#define INLINE __inline__
+
+/* use wxWidgets' configure */
+/* #define INLINE __inline__ */
+#if defined(__VISAGECPP__) && (__IBMCPP__ >= 400 || __IBMC__ >= 400)
+#define INLINE
+#elif defined(__WATCOMC__)
+#define INLINE
+#else
+#define INLINE inline
+#endif
+
/* These are for configuring the JPEG memory manager. */
#undef DEFAULT_MAX_MEM
#undef NO_MKTEMP
#undef PROGRESS_REPORT
#endif /* JPEG_CJPEG_DJPEG */
+#endif
+ /* _MSC_VER */
+