// Defines for GNU/Linux
{$IFDEF LINUX}
  // custom -----------------
  {.$DEFINE USE_ZLIB_STATIC}
  {$DEFINE USE_OGG_STATIC}
  {$DEFINE USE_THEORA_STATIC}
  // ------------------------

  {$DEFINE USE_X11}
  {$DEFINE USE_LIBJPEG}
  {$DEFINE USE_OPENAL}
  {$DEFINE USE_VORBIS}

  {$IFDEF CPUARM} // Tricky and bad method, I know :)
    {$DEFINE ANDROID}
    {$DEFINE USE_GLES}
    {$DEFINE NO_EGL}
    {$UNDEF  USE_X11}
    {$UNDEF  USE_ZLIB_STATIC}
    {$UNDEF  USE_OGG_STATIC}
    {$UNDEF  USE_THEORA_STATIC}

    // custom ------------
    // If you don't need to decode theora, you can uncomment this DEFINE and comment UNDEF for USE_OGG_STATIC above
    // for better performance of decoding ogg audio
    {.$DEFINE USE_TREMOLO}
    // -------------------
  {$ENDIF}
{$ENDIF}

// Defines for Windows and Windows Mobile
{$IFDEF MSWINDOWS}
  {$DEFINE WINDOWS}
{$ENDIF}
{$IFDEF WINDOWS}
  // custom -----------------
  {$DEFINE USE_ZLIB_STATIC}
  {$DEFINE USE_LIBJPEG}
  {.$DEFINE USE_OPENAL}
  {$DEFINE USE_OGG_STATIC}
  {$DEFINE USE_THEORA_STATIC}
  // ------------------------

  {$DEFINE USE_VORBIS}

  {$IF DEFINED(WIN32) or DEFINED(WIN64)}
    {$DEFINE WINDESKTOP}
  {$ELSE}
    {$DEFINE WINMOBILE}
    {$DEFINE USE_GLES}
  {$IFEND}
{$ENDIF}

// Defines for MacOS X and iOS
{$IFDEF DARWIN}
  // custom -----------------
  {.$DEFINE USE_ZLIB_STATIC}
  {$DEFINE USE_OGG_STATIC}
  {$DEFINE USE_THEORA_STATIC}
  // ------------------------

  {$DEFINE USE_LIBJPEG}
  {$DEFINE USE_OPENAL}
  {$DEFINE USE_VORBIS}

  {$IF DEFINED(iPHONESIM) or (DEFINED(DARWIN) and DEFINED(CPUARM))}
    {$DEFINE iOS}
    {$DEFINE USE_GLES}
    {$DEFINE NO_EGL}
    {$UNDEF  USE_ZLIB_STATIC}
    {$UNDEF  USE_LIBJPEG}
    {$DEFINE USE_OGG_STATIC}
    {$DEFINE USE_THEORA_STATIC}

    {$IFNDEF iPHONESIM}
      // custom -----------
      // If you don't need to decode theora, you can uncomment this DEFINE
      {.$DEFINE USE_TREMOR}
      // ------------------
    {$ENDIF}
  {$ELSE}
    {$DEFINE MACOSX}
  {$IFEND}
{$ENDIF}

// OpenGL ES render for PC
{.$DEFINE USE_GLES}
{$IFDEF USE_GLES}
  {$IFDEF WINCE}
    {.$DEFINE USE_GLES_SOFTWARE}
  {$ENDIF}

  {.$DEFINE USE_GLES_ON_DESKTOP}
  {$IFDEF USE_GLES_ON_DESKTOP}
    {.$DEFINE USE_AMD_DRIVERS}
  {$ENDIF}
{$ENDIF}

// Functionality
{.$DEFINE USE_LOG_FLUSH}
{$DEFINE USE_ZIP}
{$DEFINE USE_JOYSTICK}
{$DEFINE USE_JPG}
{$DEFINE USE_PNG}
{$DEFINE USE_PVR}
{$DEFINE USE_TGA}
{$DEFINE USE_SENGINE}
{$DEFINE USE_PARTICLES}
{$DEFINE USE_SOUND}
{$IFDEF USE_SOUND}
  {$DEFINE USE_OGG}
  {$DEFINE USE_WAV}
{$ENDIF}
{$DEFINE USE_VIDEO}
{$IFDEF USE_VIDEO}
  {$DEFINE USE_THEORA}
{$ENDIF}
{$DEFINE USE_TRIANGULATION}

// Disable unsupported features
{$IF DEFINED(USE_TREMOLO) or DEFINED(USE_TREMOR)}
  {$UNDEF USE_VORBIS}
  {$UNDEF USE_THEORA}
{$IFEND}
{$IFNDEF FPC}
  {$UNDEF USE_OGG_STATIC}
  {$UNDEF USE_THEORA_STATIC}
{$ENDIF}
{$IFDEF WINMOBILE}
  {$UNDEF USE_ZIP}
  {$UNDEF USE_JPG}
  {$UNDEF USE_SOUND}
  {$UNDEF USE_VIDEO}
{$ENDIF}

// Specially for buggy Delphi, which trying to parse everything...
{$IFDEF FPC}
  {$I zgl_fpc.cfg}

  {$IFNDEF MACOSX}
    {$IFDEF cpui386}
      {$DEFINE USE_ASM}
    {$ENDIF}
  {$ENDIF}
{$ELSE}
  {$MINENUMSIZE 4}
  {$DEFINE USE_ASM}
  {$DEFINE CPUi386}
  {$WARN COMBINING_SIGNED_UNSIGNED OFF}
  {$WARN COMPARING_SIGNED_UNSIGNED OFF}
{$ENDIF}
