if ( SDL::Config->has('SDL_mixer') ) {
plan ( tests => 3 );
-} else {
+}
+elsif ( SDL::Init(SDL_INIT_AUDIO) < 0) {
+ plan( skip_all => "Cannot initialize audio!!" );
+ }
+else {
plan ( skip_all => 'SDL_mixer support not compiled' );
}
/);
-if ( SDL::Init(SDL_INIT_AUDIO) < 0) {
- plan( skip_all => "Cannot initialize audio!!" );
- }
-
# these are exported by default, so main:: should know them:
my $mixer = SDL::Mixer->new();
isa_ok($mixer, 'SDL::Mixer', 'Checking if mixer can be build');