package SDL::ConfigData;
use strict;
my $arrayref = eval do {local $/; <DATA>}
  or die "Couldn't load ConfigData data: $@";
close DATA;
my ($config, $features, $auto_features) = @$arrayref;

sub config { $config->{$_[1]} }

sub set_config { $config->{$_[1]} = $_[2] }
sub set_feature { $features->{$_[1]} = 0+!!$_[2] }  # Constrain to 1 or 0

sub auto_feature_names { grep !exists $features->{$_}, keys %$auto_features }

sub feature_names {
  my @features = (keys %$features, auto_feature_names());
  @features;
}

sub config_names  { keys %$config }

sub write {
  my $me = __FILE__;
  require IO::File;

  # Can't use Module::Build::Dumper here because M::B is only a
  # build-time prereq of this module
  require Data::Dumper;

  my $mode_orig = (stat $me)[2] & 07777;
  chmod($mode_orig | 0222, $me); # Make it writeable
  my $fh = IO::File->new($me, 'r+') or die "Can't rewrite $me: $!";
  seek($fh, 0, 0);
  while (<$fh>) {
    last if /^__DATA__$/;
  }
  die "Couldn't find __DATA__ token in $me" if eof($fh);

  seek($fh, tell($fh), 0);
  my $data = [$config, $features, $auto_features];
  $fh->print( 'do{ my '
	      . Data::Dumper->new([$data],['x'])->Purity(1)->Dump()
	      . '$x; }' );
  truncate($fh, tell($fh));
  $fh->close;

  chmod($mode_orig, $me)
    or warn "Couldn't restore permissions on $me: $!";
}

sub feature {
  my ($package, $key) = @_;
  return $features->{$key} if exists $features->{$key};

  my $info = $auto_features->{$key} or return 0;

  # Under perl 5.005, each(%$foo) isn't working correctly when $foo
  # was reanimated with Data::Dumper and eval().  Not sure why, but
  # copying to a new hash seems to solve it.
  my %info = %$info;

  require Module::Build;  # XXX should get rid of this
  while (my ($type, $prereqs) = each %info) {
    next if $type eq 'description' || $type eq 'recommends';

    my %p = %$prereqs;  # Ditto here.
    while (my ($modname, $spec) = each %p) {
      my $status = Module::Build->check_installed_status($modname, $spec);
      if ((!$status->{ok}) xor ($type =~ /conflicts$/)) { return 0; }
      if ( ! eval "require $modname; 1" ) { return 0; }
    }
  }
  return 1;
}


=head1 NAME

SDL::ConfigData - Configuration for SDL

=head1 SYNOPSIS

  use SDL::ConfigData;
  $value = SDL::ConfigData->config('foo');
  $value = SDL::ConfigData->feature('bar');

  @names = SDL::ConfigData->config_names;
  @names = SDL::ConfigData->feature_names;

  SDL::ConfigData->set_config(foo => $new_value);
  SDL::ConfigData->set_feature(bar => $new_value);
  SDL::ConfigData->write;  # Save changes


=head1 DESCRIPTION

This module holds the configuration data for the C<SDL>
module.  It also provides a programmatic interface for getting or
setting that configuration data.  Note that in order to actually make
changes, you'll have to have write access to the C<SDL::ConfigData>
module, and you should attempt to understand the repercussions of your
actions.


=head1 METHODS

=over 4

=item config($name)

Given a string argument, returns the value of the configuration item
by that name, or C<undef> if no such item exists.

=item feature($name)

Given a string argument, returns the value of the feature by that
name, or C<undef> if no such feature exists.

=item set_config($name, $value)

Sets the configuration item with the given name to the given value.
The value may be any Perl scalar that will serialize correctly using
C<Data::Dumper>.  This includes references, objects (usually), and
complex data structures.  It probably does not include transient
things like filehandles or sockets.

=item set_feature($name, $value)

Sets the feature with the given name to the given boolean value.  The
value will be converted to 0 or 1 automatically.

=item config_names()

Returns a list of all the names of config items currently defined in
C<SDL::ConfigData>, or in scalar context the number of items.

=item feature_names()

Returns a list of all the names of features currently defined in
C<SDL::ConfigData>, or in scalar context the number of features.

=item auto_feature_names()

Returns a list of all the names of features whose availability is
dynamically determined, or in scalar context the number of such
features.  Does not include such features that have later been set to
a fixed value.

=item write()

Commits any changes from C<set_config()> and C<set_feature()> to disk.
Requires write access to the C<SDL::ConfigData> module.

=back


=head1 AUTHOR

C<SDL::ConfigData> was automatically created using C<Module::Build>.
C<Module::Build> was written by Ken Williams, but he holds no
authorship claim or copyright claim to the contents of C<SDL::ConfigData>.

=cut


__DATA__
do{ my $x = [
  {
    'subsystems' => {
      'MixerGroups' => {
        'file' => {
          'to' => 'lib/SDL/Mixer/Groups.xs',
          'from' => 'src/Mixer/Groups.xs'
        },
        'libraries' => [
          'SDL',
          'SDL_mixer'
        ]
      },
      'FPSManager' => {
        'file' => {
          'to' => 'lib/SDL/GFX/FPSManager.xs',
          'from' => 'src/GFX/FPSManager.xs'
        },
        'libraries' => [
          'SDL',
          'SDL_gfx_framerate'
        ]
      },
      'BlitFunc' => {
        'file' => {
          'to' => 'lib/SDL/GFX/BlitFunc.xs',
          'from' => 'src/GFX/BlitFunc.xs'
        },
        'libraries' => [
          'SDL',
          'SDL_gfx_blitfunc'
        ]
      },
      'Time' => {
        'libraries' => [
          'SDL'
        ],
        'file' => {
          'from' => 'src/Core/Time.xs',
          'to' => 'lib/SDL/Time.xs'
        }
      },
      'Overlay' => {
        'libraries' => [
          'SDL'
        ],
        'file' => {
          'from' => 'src/Core/objects/Overlay.xs',
          'to' => 'lib/SDL/Overlay.xs'
        }
      },
      'GFX' => {
        'file' => {
          'from' => 'src/GFX/GFX.xs',
          'to' => 'lib/SDL/GFX.xs'
        },
        'libraries' => [
          'SDL',
          'SDL_gfx_primitives'
        ]
      },
      'MixMusic' => {
        'file' => {
          'from' => 'src/Mixer/objects/MixMusic.xs',
          'to' => 'lib/SDL/Mixer/MixMusic.xs'
        },
        'libraries' => [
          'SDL',
          'SDL_mixer'
        ]
      },
      'MultiThread' => {
        'file' => {
          'to' => 'lib/SDL/MultiThread.xs',
          'from' => 'src/Core/MultiThread.xs'
        },
        'libraries' => [
          'SDL'
        ]
      },
      'AudioCVT' => {
        'file' => {
          'from' => 'src/Core/objects/AudioCVT.xs',
          'to' => 'lib/SDL/AudioCVT.xs'
        },
        'libraries' => [
          'SDL'
        ]
      },
      'MixerChannels' => {
        'libraries' => [
          'SDL',
          'SDL_mixer'
        ],
        'file' => {
          'from' => 'src/Mixer/Channels.xs',
          'to' => 'lib/SDL/Mixer/Channels.xs'
        }
      },
      'Event' => {
        'libraries' => [
          'SDL'
        ],
        'file' => {
          'to' => 'lib/SDL/Event.xs',
          'from' => 'src/Core/objects/Event.xs'
        }
      },
      'SDL' => {
        'libraries' => [
          'SDL'
        ],
        'file' => {
          'from' => 'src/SDL.xs',
          'to' => 'lib/SDL_perl.xs'
        }
      },
      'ValidateX' => {
        'file' => {
          'from' => 'src/SDLx/Validate.xs',
          'to' => 'lib/SDLx/Validate.xs'
        },
        'libraries' => [
          'SDL'
        ]
      },
      'Events' => {
        'file' => {
          'from' => 'src/Core/Events.xs',
          'to' => 'lib/SDL/Events.xs'
        },
        'libraries' => [
          'SDL'
        ]
      },
      'Video' => {
        'file' => {
          'from' => 'src/Core/Video.xs',
          'to' => 'lib/SDL/Video.xs'
        },
        'libraries' => [
          'SDL'
        ]
      },
      'InterfaceX' => {
        'libraries' => [
          'SDL'
        ],
        'file' => {
          'from' => 'src/SDLx/Controller/Interface.xs',
          'to' => 'lib/SDLx/Controller/Interface.xs'
        }
      },
      'MixerMusic' => {
        'libraries' => [
          'SDL',
          'SDL_mixer'
        ],
        'file' => {
          'from' => 'src/Mixer/Music.xs',
          'to' => 'lib/SDL/Mixer/Music.xs'
        }
      },
      'Audio' => {
        'libraries' => [
          'SDL'
        ],
        'file' => {
          'to' => 'lib/SDL/Audio.xs',
          'from' => 'src/Core/Audio.xs'
        }
      },
      'SFont' => {
        'file' => {
          'from' => 'src/SDLx/SFont.xs',
          'to' => 'lib/SDLx/SFont.xs'
        },
        'libraries' => [
          'SDL',
          'SDL_image'
        ]
      },
      'Version' => {
        'file' => {
          'to' => 'lib/SDL/Version.xs',
          'from' => 'src/Core/objects/Version.xs'
        },
        'libraries' => [
          'SDL'
        ]
      },
      'PixelFormat' => {
        'libraries' => [
          'SDL'
        ],
        'file' => {
          'to' => 'lib/SDL/PixelFormat.xs',
          'from' => 'src/Core/objects/PixelFormat.xs'
        }
      },
      'TTF' => {
        'file' => {
          'to' => 'lib/SDL/TTF.xs',
          'from' => 'src/TTF/TTF.xs'
        },
        'libraries' => [
          'SDL',
          'SDL_ttf'
        ]
      },
      'CDROM' => {
        'libraries' => [
          'SDL'
        ],
        'file' => {
          'to' => 'lib/SDL/CDROM.xs',
          'from' => 'src/Core/CDROM.xs'
        }
      },
      'CDTrack' => {
        'file' => {
          'from' => 'src/Core/objects/CDTrack.xs',
          'to' => 'lib/SDL/CDTrack.xs'
        },
        'libraries' => [
          'SDL'
        ]
      },
      'MixerSamples' => {
        'file' => {
          'from' => 'src/Mixer/Samples.xs',
          'to' => 'lib/SDL/Mixer/Samples.xs'
        },
        'libraries' => [
          'SDL',
          'SDL_mixer'
        ]
      },
      'ImageFilter' => {
        'file' => {
          'from' => 'src/GFX/ImageFilter.xs',
          'to' => 'lib/SDL/GFX/ImageFilter.xs'
        },
        'libraries' => [
          'SDL',
          'SDL_gfx_imagefilter'
        ]
      },
      'TimerX' => {
        'libraries' => [
          'SDL'
        ],
        'file' => {
          'to' => 'lib/SDLx/Controller/Timer.xs',
          'from' => 'src/SDLx/Timer.xs'
        }
      },
      'Mixer' => {
        'file' => {
          'from' => 'src/Mixer/Mixer.xs',
          'to' => 'lib/SDL/Mixer.xs'
        },
        'libraries' => [
          'SDL',
          'SDL_mixer'
        ]
      },
      'Pango' => {
        'file' => {
          'to' => 'lib/SDL/Pango.xs',
          'from' => 'src/Pango/Pango.xs'
        },
        'libraries' => [
          'SDL',
          'SDL_Pango'
        ]
      },
      'Framerate' => {
        'libraries' => [
          'SDL',
          'SDL_gfx_framerate'
        ],
        'file' => {
          'to' => 'lib/SDL/GFX/Framerate.xs',
          'from' => 'src/GFX/Framerate.xs'
        }
      },
      'Mouse' => {
        'libraries' => [
          'SDL'
        ],
        'file' => {
          'to' => 'lib/SDL/Mouse.xs',
          'from' => 'src/Core/Mouse.xs'
        }
      },
      'Cursor' => {
        'file' => {
          'from' => 'src/Core/objects/Cursor.xs',
          'to' => 'lib/SDL/Cursor.xs'
        },
        'libraries' => [
          'SDL'
        ]
      },
      'LayerX' => {
        'file' => {
          'to' => 'lib/SDLx/Layer.xs',
          'from' => 'src/SDLx/Layer.xs'
        },
        'libraries' => [
          'SDL',
          'SDL_image'
        ]
      },
      'AudioSpec' => {
        'file' => {
          'to' => 'lib/SDL/AudioSpec.xs',
          'from' => 'src/Core/objects/AudioSpec.xs'
        },
        'libraries' => [
          'SDL'
        ]
      },
      'Palette' => {
        'file' => {
          'to' => 'lib/SDL/Palette.xs',
          'from' => 'src/Core/objects/Palette.xs'
        },
        'libraries' => [
          'SDL'
        ]
      },
      'Context' => {
        'file' => {
          'to' => 'lib/SDL/Pango/Context.xs',
          'from' => 'src/Pango/objects/Context.xs'
        },
        'libraries' => [
          'SDL',
          'SDL_Pango'
        ]
      },
      'MixChunk' => {
        'file' => {
          'from' => 'src/Mixer/objects/MixChunk.xs',
          'to' => 'lib/SDL/Mixer/MixChunk.xs'
        },
        'libraries' => [
          'SDL',
          'SDL_mixer'
        ]
      },
      'RWOps' => {
        'file' => {
          'to' => 'lib/SDL/RWOps.xs',
          'from' => 'src/Core/objects/RWOps.xs'
        },
        'libraries' => [
          'SDL'
        ]
      },
      'TTF_Font' => {
        'file' => {
          'to' => 'lib/SDL/TTF/Font.xs',
          'from' => 'src/TTF/objects/Font.xs'
        },
        'libraries' => [
          'SDL',
          'SDL_ttf'
        ]
      },
      'Primitives' => {
        'file' => {
          'from' => 'src/GFX/Primitives.xs',
          'to' => 'lib/SDL/GFX/Primitives.xs'
        },
        'libraries' => [
          'SDL',
          'SDL_gfx_primitives'
        ]
      },
      'Rotozoom' => {
        'file' => {
          'to' => 'lib/SDL/GFX/Rotozoom.xs',
          'from' => 'src/GFX/Rotozoom.xs'
        },
        'libraries' => [
          'SDL',
          'SDL_gfx_rotozoom'
        ]
      },
      'VideoInfo' => {
        'libraries' => [
          'SDL'
        ],
        'file' => {
          'from' => 'src/Core/objects/VideoInfo.xs',
          'to' => 'lib/SDL/VideoInfo.xs'
        }
      },
      'CD' => {
        'file' => {
          'to' => 'lib/SDL/CD.xs',
          'from' => 'src/Core/objects/CD.xs'
        },
        'libraries' => [
          'SDL'
        ]
      },
      'Color' => {
        'libraries' => [
          'SDL'
        ],
        'file' => {
          'to' => 'lib/SDL/Color.xs',
          'from' => 'src/Core/objects/Color.xs'
        }
      },
      'LayerManagerX' => {
        'file' => {
          'from' => 'src/SDLx/LayerManager.xs',
          'to' => 'lib/SDLx/LayerManager.xs'
        },
        'libraries' => [
          'SDL'
        ]
      },
      'Rect' => {
        'libraries' => [
          'SDL'
        ],
        'file' => {
          'to' => 'lib/SDL/Rect.xs',
          'from' => 'src/Core/objects/Rect.xs'
        }
      },
      'Joystick' => {
        'libraries' => [
          'SDL'
        ],
        'file' => {
          'from' => 'src/Core/Joystick.xs',
          'to' => 'lib/SDL/Joystick.xs'
        }
      },
      'SurfaceX' => {
        'libraries' => [
          'SDL',
          'SDL_gfx_primitives'
        ],
        'file' => {
          'to' => 'lib/SDLx/Surface.xs',
          'from' => 'src/SDLx/Surface.xs'
        }
      },
      'Surface' => {
        'libraries' => [
          'SDL'
        ],
        'file' => {
          'to' => 'lib/SDL/Surface.xs',
          'from' => 'src/Core/objects/Surface.xs'
        }
      },
      'Image' => {
        'file' => {
          'to' => 'lib/SDL/Image.xs',
          'from' => 'src/Image.xs'
        },
        'libraries' => [
          'SDL',
          'SDL_image'
        ]
      },
      'StateX' => {
        'file' => {
          'to' => 'lib/SDLx/Controller/State.xs',
          'from' => 'src/SDLx/Controller/State.xs'
        },
        'libraries' => [
          'SDL'
        ]
      },
      'MixerEffects' => {
        'libraries' => [
          'SDL',
          'SDL_mixer'
        ],
        'file' => {
          'from' => 'src/Mixer/Effects.xs',
          'to' => 'lib/SDL/Mixer/Effects.xs'
        }
      }
    },
    'SDL_lib_translate' => {
      'SDL::Pango::Context' => [
        'SDL',
        'SDL_Pango'
      ],
      'SDLx::Controller::Timer' => [
        'SDL'
      ],
      'SDL::Mixer::Groups' => [
        'SDL',
        'SDL_mixer'
      ],
      'SDL::Cursor' => [
        'SDL'
      ],
      'SDL::TTF::Font' => [
        'SDL',
        'SDL_ttf'
      ],
      'SDL::Surface' => [
        'SDL'
      ],
      'SDL::Pango' => [
        'SDL',
        'SDL_Pango'
      ],
      'SDLx::Validate' => [
        'SDL'
      ],
      'SDL::GFX::BlitFunc' => [
        'SDL',
        'SDL_gfx'
      ],
      'SDL::Rect' => [
        'SDL'
      ],
      'SDLx::SFont' => [
        'SDL',
        'SDL_image'
      ],
      'SDL::TTF' => [
        'SDL',
        'SDL_ttf'
      ],
      'SDL::Event' => [
        'SDL'
      ],
      'SDL::Palette' => [
        'SDL'
      ],
      'SDL::Events' => [
        'SDL'
      ],
      'SDL::CDTrack' => [
        'SDL'
      ],
      'SDL::Mixer::MixChunk' => [
        'SDL',
        'SDL_mixer'
      ],
      'SDL::VideoInfo' => [
        'SDL'
      ],
      'SDLx::Layer' => [
        'SDL',
        'SDL_image'
      ],
      'SDL::GFX::Primitives' => [
        'SDL',
        'SDL_gfx'
      ],
      'SDLx::Controller::State' => [
        'SDL'
      ],
      'SDLx::Surface' => [
        'SDL',
        'SDL_gfx'
      ],
      'SDL::CDROM' => [
        'SDL'
      ],
      'SDL::Mixer::Effects' => [
        'SDL',
        'SDL_mixer'
      ],
      'SDL::Mixer::Channels' => [
        'SDL',
        'SDL_mixer'
      ],
      'SDL::Joystick' => [
        'SDL'
      ],
      'SDLx::Controller::Interface' => [
        'SDL'
      ],
      'SDL::Mixer::Samples' => [
        'SDL',
        'SDL_mixer'
      ],
      'SDL::Mixer::Music' => [
        'SDL',
        'SDL_mixer'
      ],
      'SDL::Time' => [
        'SDL'
      ],
      'SDL::Video' => [
        'SDL'
      ],
      'SDL::RWOps' => [
        'SDL'
      ],
      'SDL::GFX::ImageFilter' => [
        'SDL',
        'SDL_gfx'
      ],
      'SDL::GFX::FPSManager' => [
        'SDL',
        'SDL_gfx'
      ],
      'SDL::Version' => [
        'SDL'
      ],
      'SDL::Mixer' => [
        'SDL',
        'SDL_mixer'
      ],
      'SDL::AudioCVT' => [
        'SDL'
      ],
      'SDL::GFX' => [
        'SDL',
        'SDL_gfx'
      ],
      'SDL::PixelFormat' => [
        'SDL'
      ],
      'SDL::GFX::Framerate' => [
        'SDL',
        'SDL_gfx'
      ],
      'SDL::Audio' => [
        'SDL'
      ],
      'SDL::Mixer::MixMusic' => [
        'SDL',
        'SDL_mixer'
      ],
      'SDL::Mouse' => [
        'SDL'
      ],
      'SDL::AudioSpec' => [
        'SDL'
      ],
      'SDL::MultiThread' => [
        'SDL'
      ],
      'SDL_perl' => [
        'SDL'
      ],
      'SDL::Overlay' => [
        'SDL'
      ],
      'SDL::CD' => [
        'SDL'
      ],
      'SDL::GFX::Rotozoom' => [
        'SDL',
        'SDL_gfx'
      ],
      'SDL::Image' => [
        'SDL',
        'SDL_image'
      ],
      'SDL::Color' => [
        'SDL'
      ],
      'SDLx::LayerManager' => [
        'SDL'
      ]
    },
    'libraries' => {
      'SDL_image' => {
        'define' => 'HAVE_SDL_IMAGE',
        'header' => 'SDL_image.h',
        'lib' => 'SDL_image'
      },
      'SDL' => {
        'lib' => 'SDL',
        'define' => 'HAVE_SDL',
        'header' => 'SDL.h'
      },
      'SDL_gfx_blitfunc' => {
        'header' => 'SDL_gfxBlitFunc.h',
        'define' => 'HAVE_SDL_GFX_BLITFUNC',
        'lib' => 'SDL_gfx'
      },
      'tiff' => {
        'lib' => 'tiff',
        'define' => 'HAVE_TIFF',
        'header' => 'tiff.h'
      },
      'SDL_Pango' => {
        'header' => 'SDL_Pango.h',
        'define' => 'HAVE_SDL_PANGO',
        'lib' => 'SDL_Pango'
      },
      'SDL_mixer' => {
        'define' => 'HAVE_SDL_MIXER',
        'header' => 'SDL_mixer.h',
        'lib' => 'SDL_mixer'
      },
      'GLU' => {
        'lib' => 'GLU',
        'header' => 'GL/glu.h',
        'define' => 'HAVE_GLU'
      },
      'GL' => {
        'header' => [
          'GL/gl.h',
          'GL/glext.h'
        ],
        'define' => 'HAVE_GL',
        'lib' => 'GL'
      },
      'SDL_gfx_rotozoom' => {
        'header' => 'SDL_rotozoom.h',
        'define' => 'HAVE_SDL_GFX_ROTOZOOM',
        'lib' => 'SDL_gfx'
      },
      'SDL_gfx_imagefilter' => {
        'define' => 'HAVE_SDL_GFX_IMAGEFILTER',
        'header' => 'SDL_imageFilter.h',
        'lib' => 'SDL_gfx'
      },
      'smpeg' => {
        'lib' => 'smpeg',
        'define' => 'HAVE_SMPEG',
        'header' => 'smpeg/smpeg.h'
      },
      'SDL_gfx' => {
        'lib' => 'SDL_gfx',
        'define' => 'HAVE_SDL_GFX',
        'header' => 'SDL_gfxPrimitives.h'
      },
      'SDL_gfx_framerate' => {
        'define' => 'HAVE_SDL_GFX_FRAMERATE',
        'header' => 'SDL_framerate.h',
        'lib' => 'SDL_gfx'
      },
      'SDL_ttf' => {
        'lib' => 'SDL_ttf',
        'define' => 'HAVE_SDL_TTF',
        'header' => 'SDL_ttf.h'
      },
      'png' => {
        'define' => 'HAVE_PNG',
        'header' => 'png.h',
        'lib' => 'png'
      },
      'jpeg' => {
        'define' => 'HAVE_JPEG',
        'header' => 'jpeglib.h',
        'lib' => 'jpeg'
      },
      'SDL_gfx_primitives' => {
        'define' => 'HAVE_SDL_GFX_PRIMITIVES',
        'header' => 'SDL_gfxPrimitives.h',
        'lib' => 'SDL_gfx'
      }
    },
    'SDL_cfg' => {
      'CDTrack' => {
        'libs' => {
          'SDL' => 1
        },
        'links' => [
          '-lSDL'
        ],
        'defines' => [
          '-DHAVE_SDL'
        ]
      },
      'CDROM' => {
        'libs' => {
          'SDL' => 1
        },
        'defines' => [
          '-DHAVE_SDL'
        ],
        'links' => [
          '-lSDL'
        ]
      },
      'MixerSamples' => {
        'libs' => {
          'SDL_mixer' => 1,
          'SDL' => 1
        },
        'defines' => [
          '-DHAVE_SDL',
          '-DHAVE_SDL_MIXER'
        ],
        'links' => [
          '-lSDL',
          '-lSDL_mixer'
        ]
      },
      'ImageFilter' => {
        'libs' => {
          'SDL_gfx_imagefilter' => 1,
          'SDL' => 1
        },
        'links' => [
          '-lSDL',
          '-lSDL_gfx'
        ],
        'defines' => [
          '-DHAVE_SDL',
          '-DHAVE_SDL_GFX_IMAGEFILTER'
        ]
      },
      'TimerX' => {
        'defines' => [
          '-DHAVE_SDL'
        ],
        'links' => [
          '-lSDL'
        ],
        'libs' => {
          'SDL' => 1
        }
      },
      'Mixer' => {
        'defines' => [
          '-DHAVE_SDL',
          '-DHAVE_SDL_MIXER'
        ],
        'links' => [
          '-lSDL',
          '-lSDL_mixer'
        ],
        'libs' => {
          'SDL_mixer' => 1,
          'SDL' => 1
        }
      },
      'MixerMusic' => {
        'defines' => [
          '-DHAVE_SDL',
          '-DHAVE_SDL_MIXER'
        ],
        'links' => [
          '-lSDL',
          '-lSDL_mixer'
        ],
        'libs' => {
          'SDL_mixer' => 1,
          'SDL' => 1
        }
      },
      'SFont' => {
        'libs' => {
          'SDL_image' => 1,
          'SDL' => 1
        },
        'links' => [
          '-lSDL',
          '-lSDL_image'
        ],
        'defines' => [
          '-DHAVE_SDL',
          '-DHAVE_SDL_IMAGE'
        ]
      },
      'Audio' => {
        'defines' => [
          '-DHAVE_SDL'
        ],
        'links' => [
          '-lSDL'
        ],
        'libs' => {
          'SDL' => 1
        }
      },
      'TTF' => {
        'defines' => [
          '-DHAVE_SDL',
          '-DHAVE_SDL_TTF'
        ],
        'links' => [
          '-lSDL',
          '-lSDL_ttf'
        ],
        'libs' => {
          'SDL_ttf' => 1,
          'SDL' => 1
        }
      },
      'PixelFormat' => {
        'defines' => [
          '-DHAVE_SDL'
        ],
        'links' => [
          '-lSDL'
        ],
        'libs' => {
          'SDL' => 1
        }
      },
      'Version' => {
        'libs' => {
          'SDL' => 1
        },
        'defines' => [
          '-DHAVE_SDL'
        ],
        'links' => [
          '-lSDL'
        ]
      },
      'ValidateX' => {
        'defines' => [
          '-DHAVE_SDL'
        ],
        'links' => [
          '-lSDL'
        ],
        'libs' => {
          'SDL' => 1
        }
      },
      'SDL' => {
        'libs' => {
          'SDL' => 1
        },
        'defines' => [
          '-DHAVE_SDL'
        ],
        'links' => [
          '-lSDL'
        ]
      },
      'Video' => {
        'defines' => [
          '-DHAVE_SDL'
        ],
        'links' => [
          '-lSDL'
        ],
        'libs' => {
          'SDL' => 1
        }
      },
      'Events' => {
        'libs' => {
          'SDL' => 1
        },
        'links' => [
          '-lSDL'
        ],
        'defines' => [
          '-DHAVE_SDL'
        ]
      },
      'InterfaceX' => {
        'links' => [
          '-lSDL'
        ],
        'defines' => [
          '-DHAVE_SDL'
        ],
        'libs' => {
          'SDL' => 1
        }
      },
      'FPSManager' => {
        'libs' => {
          'SDL' => 1,
          'SDL_gfx_framerate' => 1
        },
        'defines' => [
          '-DHAVE_SDL',
          '-DHAVE_SDL_GFX_FRAMERATE'
        ],
        'links' => [
          '-lSDL',
          '-lSDL_gfx'
        ]
      },
      'MixerGroups' => {
        'libs' => {
          'SDL_mixer' => 1,
          'SDL' => 1
        },
        'defines' => [
          '-DHAVE_SDL',
          '-DHAVE_SDL_MIXER'
        ],
        'links' => [
          '-lSDL',
          '-lSDL_mixer'
        ]
      },
      'Overlay' => {
        'links' => [
          '-lSDL'
        ],
        'defines' => [
          '-DHAVE_SDL'
        ],
        'libs' => {
          'SDL' => 1
        }
      },
      'GFX' => {
        'links' => [
          '-lSDL',
          '-lSDL_gfx'
        ],
        'defines' => [
          '-DHAVE_SDL',
          '-DHAVE_SDL_GFX_PRIMITIVES'
        ],
        'libs' => {
          'SDL_gfx_primitives' => 1,
          'SDL' => 1
        }
      },
      'Time' => {
        'links' => [
          '-lSDL'
        ],
        'defines' => [
          '-DHAVE_SDL'
        ],
        'libs' => {
          'SDL' => 1
        }
      },
      'BlitFunc' => {
        'links' => [
          '-lSDL',
          '-lSDL_gfx'
        ],
        'defines' => [
          '-DHAVE_SDL',
          '-DHAVE_SDL_GFX_BLITFUNC'
        ],
        'libs' => {
          'SDL' => 1,
          'SDL_gfx_blitfunc' => 1
        }
      },
      'MultiThread' => {
        'libs' => {
          'SDL' => 1
        },
        'links' => [
          '-lSDL'
        ],
        'defines' => [
          '-DHAVE_SDL'
        ]
      },
      'MixMusic' => {
        'defines' => [
          '-DHAVE_SDL',
          '-DHAVE_SDL_MIXER'
        ],
        'links' => [
          '-lSDL',
          '-lSDL_mixer'
        ],
        'libs' => {
          'SDL_mixer' => 1,
          'SDL' => 1
        }
      },
      'AudioCVT' => {
        'defines' => [
          '-DHAVE_SDL'
        ],
        'links' => [
          '-lSDL'
        ],
        'libs' => {
          'SDL' => 1
        }
      },
      'Event' => {
        'libs' => {
          'SDL' => 1
        },
        'links' => [
          '-lSDL'
        ],
        'defines' => [
          '-DHAVE_SDL'
        ]
      },
      'MixerChannels' => {
        'libs' => {
          'SDL' => 1,
          'SDL_mixer' => 1
        },
        'links' => [
          '-lSDL',
          '-lSDL_mixer'
        ],
        'defines' => [
          '-DHAVE_SDL',
          '-DHAVE_SDL_MIXER'
        ]
      },
      'Image' => {
        'libs' => {
          'SDL' => 1,
          'SDL_image' => 1
        },
        'defines' => [
          '-DHAVE_SDL',
          '-DHAVE_SDL_IMAGE'
        ],
        'links' => [
          '-lSDL',
          '-lSDL_image'
        ]
      },
      'Surface' => {
        'defines' => [
          '-DHAVE_SDL'
        ],
        'links' => [
          '-lSDL'
        ],
        'libs' => {
          'SDL' => 1
        }
      },
      'StateX' => {
        'links' => [
          '-lSDL'
        ],
        'defines' => [
          '-DHAVE_SDL'
        ],
        'libs' => {
          'SDL' => 1
        }
      },
      'MixerEffects' => {
        'links' => [
          '-lSDL',
          '-lSDL_mixer'
        ],
        'defines' => [
          '-DHAVE_SDL',
          '-DHAVE_SDL_MIXER'
        ],
        'libs' => {
          'SDL_mixer' => 1,
          'SDL' => 1
        }
      },
      'LayerManagerX' => {
        'links' => [
          '-lSDL'
        ],
        'defines' => [
          '-DHAVE_SDL'
        ],
        'libs' => {
          'SDL' => 1
        }
      },
      'Joystick' => {
        'defines' => [
          '-DHAVE_SDL'
        ],
        'links' => [
          '-lSDL'
        ],
        'libs' => {
          'SDL' => 1
        }
      },
      'Rect' => {
        'defines' => [
          '-DHAVE_SDL'
        ],
        'links' => [
          '-lSDL'
        ],
        'libs' => {
          'SDL' => 1
        }
      },
      'SurfaceX' => {
        'defines' => [
          '-DHAVE_SDL',
          '-DHAVE_SDL_GFX_PRIMITIVES'
        ],
        'links' => [
          '-lSDL',
          '-lSDL_gfx'
        ],
        'libs' => {
          'SDL_gfx_primitives' => 1,
          'SDL' => 1
        }
      },
      'MixChunk' => {
        'defines' => [
          '-DHAVE_SDL',
          '-DHAVE_SDL_MIXER'
        ],
        'links' => [
          '-lSDL',
          '-lSDL_mixer'
        ],
        'libs' => {
          'SDL_mixer' => 1,
          'SDL' => 1
        }
      },
      'RWOps' => {
        'defines' => [
          '-DHAVE_SDL'
        ],
        'links' => [
          '-lSDL'
        ],
        'libs' => {
          'SDL' => 1
        }
      },
      'Context' => {
        'links' => [
          '-lSDL',
          '-lSDL_Pango'
        ],
        'defines' => [
          '-DHAVE_SDL',
          '-DHAVE_SDL_PANGO'
        ],
        'libs' => {
          'SDL' => 1,
          'SDL_Pango' => 1
        }
      },
      'TTF_Font' => {
        'libs' => {
          'SDL_ttf' => 1,
          'SDL' => 1
        },
        'links' => [
          '-lSDL',
          '-lSDL_ttf'
        ],
        'defines' => [
          '-DHAVE_SDL',
          '-DHAVE_SDL_TTF'
        ]
      },
      'CD' => {
        'defines' => [
          '-DHAVE_SDL'
        ],
        'links' => [
          '-lSDL'
        ],
        'libs' => {
          'SDL' => 1
        }
      },
      'VideoInfo' => {
        'links' => [
          '-lSDL'
        ],
        'defines' => [
          '-DHAVE_SDL'
        ],
        'libs' => {
          'SDL' => 1
        }
      },
      'Rotozoom' => {
        'libs' => {
          'SDL' => 1,
          'SDL_gfx_rotozoom' => 1
        },
        'links' => [
          '-lSDL',
          '-lSDL_gfx'
        ],
        'defines' => [
          '-DHAVE_SDL',
          '-DHAVE_SDL_GFX_ROTOZOOM'
        ]
      },
      'Primitives' => {
        'defines' => [
          '-DHAVE_SDL',
          '-DHAVE_SDL_GFX_PRIMITIVES'
        ],
        'links' => [
          '-lSDL',
          '-lSDL_gfx'
        ],
        'libs' => {
          'SDL' => 1,
          'SDL_gfx_primitives' => 1
        }
      },
      'Color' => {
        'defines' => [
          '-DHAVE_SDL'
        ],
        'links' => [
          '-lSDL'
        ],
        'libs' => {
          'SDL' => 1
        }
      },
      'Mouse' => {
        'defines' => [
          '-DHAVE_SDL'
        ],
        'links' => [
          '-lSDL'
        ],
        'libs' => {
          'SDL' => 1
        }
      },
      'Pango' => {
        'links' => [
          '-lSDL',
          '-lSDL_Pango'
        ],
        'defines' => [
          '-DHAVE_SDL',
          '-DHAVE_SDL_PANGO'
        ],
        'libs' => {
          'SDL' => 1,
          'SDL_Pango' => 1
        }
      },
      'Framerate' => {
        'links' => [
          '-lSDL',
          '-lSDL_gfx'
        ],
        'defines' => [
          '-DHAVE_SDL',
          '-DHAVE_SDL_GFX_FRAMERATE'
        ],
        'libs' => {
          'SDL_gfx_framerate' => 1,
          'SDL' => 1
        }
      },
      'Cursor' => {
        'links' => [
          '-lSDL'
        ],
        'defines' => [
          '-DHAVE_SDL'
        ],
        'libs' => {
          'SDL' => 1
        }
      },
      'LayerX' => {
        'links' => [
          '-lSDL',
          '-lSDL_image'
        ],
        'defines' => [
          '-DHAVE_SDL',
          '-DHAVE_SDL_IMAGE'
        ],
        'libs' => {
          'SDL_image' => 1,
          'SDL' => 1
        }
      },
      'Palette' => {
        'links' => [
          '-lSDL'
        ],
        'defines' => [
          '-DHAVE_SDL'
        ],
        'libs' => {
          'SDL' => 1
        }
      },
      'AudioSpec' => {
        'links' => [
          '-lSDL'
        ],
        'defines' => [
          '-DHAVE_SDL'
        ],
        'libs' => {
          'SDL' => 1
        }
      }
    }
  },
  {},
  {}
];
$x; }