changeset 496:67d785044411

Forward port from stable branch: fix modplug header detection.
author Ryan C. Gordon <icculus@icculus.org>
date Wed, 12 Oct 2005 22:20:58 +0000
parents 355129c687b7
children 0b244f36049e
files CHANGELOG acconfig.h configure.in decoders/modplug.c
diffstat 4 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGELOG	Sat Oct 01 15:38:51 2005 +0000
+++ b/CHANGELOG	Wed Oct 12 22:20:58 2005 +0000
@@ -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!)
--- a/acconfig.h	Sat Oct 01 15:38:51 2005 +0000
+++ b/acconfig.h	Wed Oct 12 22:20:58 2005 +0000
@@ -17,4 +17,5 @@
 #undef SOUND_SUPPORTS_MPGLIB
 #undef SOUND_SUPPORTS_QUICKTIME
 #undef SOUND_SUPPORTS_SPEEX
+#undef SOUND_MODPLUG_IN_OWN_PATH
 
--- a/configure.in	Sat Oct 01 15:38:51 2005 +0000
+++ b/configure.in	Wed Oct 12 22:20:58 2005 +0000
@@ -214,7 +214,16 @@
 [  --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"
--- a/decoders/modplug.c	Sat Oct 01 15:38:51 2005 +0000
+++ b/decoders/modplug.c	Wed Oct 12 22:20:58 2005 +0000
@@ -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);