Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Forward port from stable branch: fix modplug header detection.
  • Loading branch information
icculus committed Oct 12, 2005
1 parent d49c7c1 commit b778868
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG
Expand Up @@ -2,6 +2,7 @@
* CHANGELOG.
*/

10122005 - Check for libmodplug headers in two possible places (thanks, Tyler!)
10012005 - Added playsound_simple.c.
09142005 - Happy September. Patched smpeg.c and some other things to compile.
01062005 - Fixed Project Builder project files (Thanks, Martin!)
Expand Down
1 change: 1 addition & 0 deletions acconfig.h
Expand Up @@ -17,4 +17,5 @@
#undef SOUND_SUPPORTS_MPGLIB
#undef SOUND_SUPPORTS_QUICKTIME
#undef SOUND_SUPPORTS_SPEEX
#undef SOUND_MODPLUG_IN_OWN_PATH

9 changes: 9 additions & 0 deletions configure.in
Expand Up @@ -214,7 +214,16 @@ AC_ARG_ENABLE(modplug,
[ --enable-modplug enable MOD decoding via modplug [default=yes]],
, enable_modplug=yes)
if test x$enable_modplug = xyes; then
have_modplug_hdr=no
AC_CHECK_HEADER(modplug.h, have_modplug_hdr=yes)
if test x$have_modplug_hdr = xno; then
AC_CHECK_HEADER(libmodplug/modplug.h, have_modplug_hdr=yes)
if test x$have_modplug_hdr = xyes; then
have_modplug_hdr=yes
AC_DEFINE(SOUND_MODPLUG_IN_OWN_PATH)
fi
fi

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"
Expand Down
5 changes: 4 additions & 1 deletion decoders/modplug.c
Expand Up @@ -46,8 +46,11 @@
#define __SDL_SOUND_INTERNAL__
#include "SDL_sound_internal.h"

#if SOUND_MODPLUG_IN_OWN_PATH
#include "libmodplug/modplug.h"
#else
#include "modplug.h"

#endif

static int MODPLUG_init(void);
static void MODPLUG_quit(void);
Expand Down

0 comments on commit b778868

Please sign in to comment.