# HG changeset patch # User Ryan C. Gordon # Date 1010625534 0 # Node ID e63b9393f6ce0dab3e2193319c784a232c82a961 # Parent 32376317eedbb6b3cabbbf8c15d2b57d7116b090 Added ModPlug support. diff -r 32376317eedb -r e63b9393f6ce SDL_sound.c --- a/SDL_sound.c Thu Jan 10 01:16:24 2002 +0000 +++ b/SDL_sound.c Thu Jan 10 01:18:54 2002 +0000 @@ -51,8 +51,12 @@ extern const Sound_DecoderFunctions __Sound_DecoderFunctions_MP3; #endif -#if (defined SOUND_SUPPORTS_MOD) -extern const Sound_DecoderFunctions __Sound_DecoderFunctions_MOD; +#if (defined SOUND_SUPPORTS_MIKMOD) +extern const Sound_DecoderFunctions __Sound_DecoderFunctions_MIKMOD; +#endif + +#if (defined SOUND_SUPPORTS_MODPLUG) +extern const Sound_DecoderFunctions __Sound_DecoderFunctions_MODPLUG; #endif #if (defined SOUND_SUPPORTS_WAV) @@ -101,8 +105,12 @@ { 0, &__Sound_DecoderFunctions_MP3 }, #endif -#if (defined SOUND_SUPPORTS_MOD) - { 0, &__Sound_DecoderFunctions_MOD }, +#if (defined SOUND_SUPPORTS_MIKMOD) + { 0, &__Sound_DecoderFunctions_MIKMOD }, +#endif + +#if (defined SOUND_SUPPORTS_MODPLUG) + { 0, &__Sound_DecoderFunctions_MODPLUG }, #endif #if (defined SOUND_SUPPORTS_WAV) diff -r 32376317eedb -r e63b9393f6ce acconfig.h --- a/acconfig.h Thu Jan 10 01:16:24 2002 +0000 +++ b/acconfig.h Thu Jan 10 01:18:54 2002 +0000 @@ -3,7 +3,8 @@ #undef DEBUG_CHATTER #undef NDEBUG #undef SOUND_SUPPORTS_AIFF -#undef SOUND_SUPPORTS_MOD +#undef SOUND_SUPPORTS_MIKMOD +#undef SOUND_SUPPORTS_MODPLUG #undef SOUND_SUPPORTS_MP3 #undef SOUND_SUPPORTS_OGG #undef SOUND_SUPPORTS_RAW diff -r 32376317eedb -r e63b9393f6ce configure.in --- a/configure.in Thu Jan 10 01:16:24 2002 +0000 +++ b/configure.in Thu Jan 10 01:18:54 2002 +0000 @@ -180,7 +180,20 @@ CFLAGS="$CFLAGS $LIBMIKMOD_CFLAGS" LIBS="$LIBS $LIBMIKMOD_LIBS" LDADD="$LDADD $LIBMIKMOD_LDADD" - AC_DEFINE(SOUND_SUPPORTS_MOD) + AC_DEFINE(SOUND_SUPPORTS_MIKMOD) + fi +fi + +dnl Check for libmodplug +AC_ARG_ENABLE(modplug, +[ --enable-modplug enable MOD decoding via modplug [default=yes]], + , enable_modplug=yes) +if test x$enable_modplug = xyes; then + AC_CHECK_HEADER(modplug.h, have_modplug_hdr=yes) + AC_CHECK_LIB(modplug, ModPlug_Load, have_modplug_lib=yes) + if test x$have_modplug_hdr = xyes -a x$have_modplug_lib = xyes; then + LIBS="$LIBS -lmodplug" + AC_DEFINE(SOUND_SUPPORTS_MODPLUG) fi fi diff -r 32376317eedb -r e63b9393f6ce decoders/Makefile.am --- a/decoders/Makefile.am Thu Jan 10 01:16:24 2002 +0000 +++ b/decoders/Makefile.am Thu Jan 10 01:18:54 2002 +0000 @@ -6,7 +6,8 @@ libdecoders_la_SOURCES = \ aiff.c \ - mod.c \ + mikmod.c \ + modplug.c \ mp3.c \ ogg.c \ raw.c \