From 6cb06bc199ef133850a00139f60296deff1b83af Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 16 Aug 2014 22:46:16 -0700 Subject: [PATCH] Fixed bug 2136 and 2624, include directives are wrong for tremor and modplug on Debian --- Android.mk | 4 ++-- VisualC/external/include/{ => libmodplug}/modplug.h | 0 Xcode-iOS/SDL_mixer.xcodeproj/project.pbxproj | 4 ++++ Xcode/SDL_mixer.xcodeproj/project.pbxproj | 2 ++ configure | 8 ++++---- configure.in | 2 +- dynamic_modplug.h | 6 +++++- dynamic_ogg.h | 6 ++++-- music_modplug.h | 6 +++++- music_ogg.h | 6 ++++-- 10 files changed, 31 insertions(+), 13 deletions(-) rename VisualC/external/include/{ => libmodplug}/modplug.h (100%) diff --git a/Android.mk b/Android.mk index 7ef65426..a5b71008 100644 --- a/Android.mk +++ b/Android.mk @@ -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="" -DHAVE_SETENV -DHAVE_SINF LOCAL_SRC_FILES += \ $(MODPLUG_LIBRARY_PATH)/src/fastmix.cpp \ $(MODPLUG_LIBRARY_PATH)/src/load_669.cpp \ @@ -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="" ifeq ($(TARGET_ARCH_ABI),armeabi) LOCAL_CFLAGS += -D_ARM_ASSEM_ endif diff --git a/VisualC/external/include/modplug.h b/VisualC/external/include/libmodplug/modplug.h similarity index 100% rename from VisualC/external/include/modplug.h rename to VisualC/external/include/libmodplug/modplug.h diff --git a/Xcode-iOS/SDL_mixer.xcodeproj/project.pbxproj b/Xcode-iOS/SDL_mixer.xcodeproj/project.pbxproj index ea83b623..d669db52 100755 --- a/Xcode-iOS/SDL_mixer.xcodeproj/project.pbxproj +++ b/Xcode-iOS/SDL_mixer.xcodeproj/project.pbxproj @@ -740,9 +740,11 @@ GCC_PREPROCESSOR_DEFINITIONS = ( WAV_MUSIC, MODPLUG_MUSIC, + "MODPLUG_HEADER=\"\"", MID_MUSIC, OGG_MUSIC, OGG_USE_TREMOR, + "OGG_HEADER=\"\"", HAVE_STDINT_H, HAVE_SETENV, HAVE_SINF, @@ -768,9 +770,11 @@ GCC_PREPROCESSOR_DEFINITIONS = ( WAV_MUSIC, MODPLUG_MUSIC, + "MODPLUG_HEADER=\"\"", MID_MUSIC, OGG_MUSIC, OGG_USE_TREMOR, + "OGG_HEADER=\"\"", HAVE_STDINT_H, HAVE_SETENV, HAVE_SINF, diff --git a/Xcode/SDL_mixer.xcodeproj/project.pbxproj b/Xcode/SDL_mixer.xcodeproj/project.pbxproj index fc3be107..b71681f8 100755 --- a/Xcode/SDL_mixer.xcodeproj/project.pbxproj +++ b/Xcode/SDL_mixer.xcodeproj/project.pbxproj @@ -830,6 +830,7 @@ CMD_MUSIC, WAV_MUSIC, MODPLUG_MUSIC, + "MODPLUG_HEADER=\"\"", MP3_MUSIC, MID_MUSIC, USE_NATIVE_MIDI, @@ -866,6 +867,7 @@ CMD_MUSIC, WAV_MUSIC, MODPLUG_MUSIC, + "MODPLUG_HEADER=\"\"", MP3_MUSIC, MID_MUSIC, USE_NATIVE_MIDI, diff --git a/configure b/configure index b162be18..1e70684a 100755 --- a/configure +++ b/configure @@ -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 @@ -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 diff --git a/configure.in b/configure.in index ececb64b..6bacbc7d 100644 --- a/configure.in +++ b/configure.in @@ -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]) ]) diff --git a/dynamic_modplug.h b/dynamic_modplug.h index 21eeb335..2f27dcb9 100644 --- a/dynamic_modplug.h +++ b/dynamic_modplug.h @@ -21,7 +21,11 @@ #ifdef MODPLUG_MUSIC -#include "modplug.h" +#ifdef MODPLUG_HEADER +#include MODPLUG_HEADER +#else +#include +#endif typedef struct { int loaded; diff --git a/dynamic_ogg.h b/dynamic_ogg.h index d54705a3..5ff03666 100644 --- a/dynamic_ogg.h +++ b/dynamic_ogg.h @@ -20,8 +20,10 @@ */ #ifdef OGG_MUSIC -#ifdef OGG_USE_TREMOR -#include +#if defined(OGG_HEADER) +#include OGG_HEADER +#elif defined(OGG_USE_TREMOR) +#include #else #include #endif diff --git a/music_modplug.h b/music_modplug.h index d9cfb043..186f521a 100644 --- a/music_modplug.h +++ b/music_modplug.h @@ -21,7 +21,11 @@ #ifdef MODPLUG_MUSIC -#include "modplug.h" +#ifdef MODPLUG_HEADER +#include MODPLUG_HEADER +#else +#include +#endif #include "SDL_rwops.h" #include "SDL_audio.h" #include "SDL_mixer.h" diff --git a/music_ogg.h b/music_ogg.h index 5510064f..869194fe 100644 --- a/music_ogg.h +++ b/music_ogg.h @@ -25,8 +25,10 @@ /* This file supports Ogg Vorbis music streams */ -#ifdef OGG_USE_TREMOR -#include +#if defined(OGG_HEADER) +#include OGG_HEADER +#elif defined(OGG_USE_TREMOR) +#include #else #include #endif