Skip to content

Commit

Permalink
Fixed bug 2136 and 2624, include directives are wrong for tremor and …
Browse files Browse the repository at this point in the history
…modplug on Debian
  • Loading branch information
slouken committed Aug 17, 2014
1 parent 2500db9 commit 6cb06bc
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Android.mk
Expand Up @@ -47,7 +47,7 @@ endif

ifeq ($(SUPPORT_MOD_MODPLUG),true)
LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(MODPLUG_LIBRARY_PATH)/src $(LOCAL_PATH)/$(MODPLUG_LIBRARY_PATH)/src/libmodplug
LOCAL_CFLAGS += -DMODPLUG_MUSIC -DHAVE_SETENV -DHAVE_SINF
LOCAL_CFLAGS += -DMODPLUG_MUSIC -DMODPLUG_HEADER="<modplug.h>" -DHAVE_SETENV -DHAVE_SINF
LOCAL_SRC_FILES += \
$(MODPLUG_LIBRARY_PATH)/src/fastmix.cpp \
$(MODPLUG_LIBRARY_PATH)/src/load_669.cpp \
Expand Down Expand Up @@ -99,7 +99,7 @@ endif

ifeq ($(SUPPORT_OGG),true)
LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(OGG_LIBRARY_PATH)/include $(LOCAL_PATH)/$(VORBIS_LIBRARY_PATH)
LOCAL_CFLAGS += -DOGG_MUSIC -DOGG_USE_TREMOR
LOCAL_CFLAGS += -DOGG_MUSIC -DOGG_USE_TREMOR -DOGG_HEADER="<ivorbisfile.h>"
ifeq ($(TARGET_ARCH_ABI),armeabi)
LOCAL_CFLAGS += -D_ARM_ASSEM_
endif
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions Xcode-iOS/SDL_mixer.xcodeproj/project.pbxproj
Expand Up @@ -740,9 +740,11 @@
GCC_PREPROCESSOR_DEFINITIONS = (
WAV_MUSIC,
MODPLUG_MUSIC,
"MODPLUG_HEADER=\"<modplug.h>\"",
MID_MUSIC,
OGG_MUSIC,
OGG_USE_TREMOR,
"OGG_HEADER=\"<ivorbisfile.h>\"",
HAVE_STDINT_H,
HAVE_SETENV,
HAVE_SINF,
Expand All @@ -768,9 +770,11 @@
GCC_PREPROCESSOR_DEFINITIONS = (
WAV_MUSIC,
MODPLUG_MUSIC,
"MODPLUG_HEADER=\"<modplug.h>\"",
MID_MUSIC,
OGG_MUSIC,
OGG_USE_TREMOR,
"OGG_HEADER=\"<ivorbisfile.h>\"",
HAVE_STDINT_H,
HAVE_SETENV,
HAVE_SINF,
Expand Down
2 changes: 2 additions & 0 deletions Xcode/SDL_mixer.xcodeproj/project.pbxproj
Expand Up @@ -830,6 +830,7 @@
CMD_MUSIC,
WAV_MUSIC,
MODPLUG_MUSIC,
"MODPLUG_HEADER=\"<modplug.h>\"",
MP3_MUSIC,
MID_MUSIC,
USE_NATIVE_MIDI,
Expand Down Expand Up @@ -866,6 +867,7 @@
CMD_MUSIC,
WAV_MUSIC,
MODPLUG_MUSIC,
"MODPLUG_HEADER=\"<modplug.h>\"",
MP3_MUSIC,
MID_MUSIC,
USE_NATIVE_MIDI,
Expand Down
8 changes: 4 additions & 4 deletions configure
Expand Up @@ -11817,8 +11817,8 @@ fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
ac_fn_c_check_header_mongrel "$LINENO" "modplug.h" "ac_cv_header_modplug_h" "$ac_includes_default"
if test "x$ac_cv_header_modplug_h" = xyes; then :
ac_fn_c_check_header_mongrel "$LINENO" "libmodplug/modplug.h" "ac_cv_header_libmodplug_modplug_h" "$ac_includes_default"
if test "x$ac_cv_header_libmodplug_modplug_h" = xyes; then :
have_libmodplug_hdr=yes
fi

Expand Down Expand Up @@ -11870,8 +11870,8 @@ fi


elif test $pkg_failed = untried; then
ac_fn_c_check_header_mongrel "$LINENO" "modplug.h" "ac_cv_header_modplug_h" "$ac_includes_default"
if test "x$ac_cv_header_modplug_h" = xyes; then :
ac_fn_c_check_header_mongrel "$LINENO" "libmodplug/modplug.h" "ac_cv_header_libmodplug_modplug_h" "$ac_includes_default"
if test "x$ac_cv_header_libmodplug_modplug_h" = xyes; then :
have_libmodplug_hdr=yes
fi

Expand Down
2 changes: 1 addition & 1 deletion configure.in
Expand Up @@ -257,7 +257,7 @@ if test x$enable_music_mod = xyes -a x$enable_music_mod_modplug = xyes; then
have_libmodplug_hdr=yes
have_libmodplug_lib=yes
], [dnl
AC_CHECK_HEADER([modplug.h], [have_libmodplug_hdr=yes])
AC_CHECK_HEADER([libmodplug/modplug.h], [have_libmodplug_hdr=yes])
AC_CHECK_LIB([modplug], [have_libmodplug_lib=yes])
])

Expand Down
6 changes: 5 additions & 1 deletion dynamic_modplug.h
Expand Up @@ -21,7 +21,11 @@

#ifdef MODPLUG_MUSIC

#include "modplug.h"
#ifdef MODPLUG_HEADER
#include MODPLUG_HEADER
#else
#include <libmodplug/modplug.h>
#endif

typedef struct {
int loaded;
Expand Down
6 changes: 4 additions & 2 deletions dynamic_ogg.h
Expand Up @@ -20,8 +20,10 @@
*/

#ifdef OGG_MUSIC
#ifdef OGG_USE_TREMOR
#include <ivorbisfile.h>
#if defined(OGG_HEADER)
#include OGG_HEADER
#elif defined(OGG_USE_TREMOR)
#include <tremor/ivorbisfile.h>
#else
#include <vorbis/vorbisfile.h>
#endif
Expand Down
6 changes: 5 additions & 1 deletion music_modplug.h
Expand Up @@ -21,7 +21,11 @@

#ifdef MODPLUG_MUSIC

#include "modplug.h"
#ifdef MODPLUG_HEADER
#include MODPLUG_HEADER
#else
#include <libmodplug/modplug.h>
#endif
#include "SDL_rwops.h"
#include "SDL_audio.h"
#include "SDL_mixer.h"
Expand Down
6 changes: 4 additions & 2 deletions music_ogg.h
Expand Up @@ -25,8 +25,10 @@

/* This file supports Ogg Vorbis music streams */

#ifdef OGG_USE_TREMOR
#include <ivorbisfile.h>
#if defined(OGG_HEADER)
#include OGG_HEADER
#elif defined(OGG_USE_TREMOR)
#include <tremor/ivorbisfile.h>
#else
#include <vorbis/vorbisfile.h>
#endif
Expand Down

0 comments on commit 6cb06bc

Please sign in to comment.