Fixed building mod support on UNIX
authorSam Lantinga <slouken@libsdl.org>
Tue, 21 Dec 2004 17:38:38 +0000
changeset 2541ad5ff083036
parent 253 15358f57b98e
child 255 16119b6dc45a
Fixed building mod support on UNIX
We always build in music SDL_RWops support
SDL_mixer.h
configure.in
mikmod/mikmod.h
mikmod/mikmod_internals.h
mikmod/mloader.c
mikmod/mmio.c
music.c
     1.1 --- a/SDL_mixer.h	Thu Dec 16 05:29:55 2004 +0000
     1.2 +++ b/SDL_mixer.h	Tue Dec 21 17:38:38 2004 +0000
     1.3 @@ -130,11 +130,9 @@
     1.4  #define Mix_LoadWAV(file)	Mix_LoadWAV_RW(SDL_RWFromFile(file, "rb"), 1)
     1.5  extern DECLSPEC Mix_Music * SDLCALL Mix_LoadMUS(const char *file);
     1.6  
     1.7 -#ifdef USE_RWOPS /* This hasn't been hooked into music.c yet */
     1.8 -/* Load a music file from an SDL_RWop object (MikMod-specific currently)
     1.9 +/* Load a music file from an SDL_RWop object (Ogg and MikMod specific currently)
    1.10     Matt Campbell (matt@campbellhome.dhs.org) April 2000 */
    1.11  extern DECLSPEC Mix_Music * SDLCALL Mix_LoadMUS_RW(SDL_RWops *rw);
    1.12 -#endif
    1.13  
    1.14  /* Load a wave file of the mixer format from a memory buffer */
    1.15  extern DECLSPEC Mix_Chunk * SDLCALL Mix_QuickLoad_WAV(Uint8 *mem);
     2.1 --- a/configure.in	Thu Dec 16 05:29:55 2004 +0000
     2.2 +++ b/configure.in	Tue Dec 21 17:38:38 2004 +0000
     2.3 @@ -85,10 +85,6 @@
     2.4  )
     2.5  CFLAGS="$CFLAGS $SDL_CFLAGS"
     2.6  
     2.7 -dnl Flag for using SDL_RWops
     2.8 -dnl Matt Campbell (matt@campbellhome.dhs.org)
     2.9 -CFLAGS="$CFLAGS -DUSE_RWOPS"
    2.10 -
    2.11  dnl Check command-line options
    2.12  
    2.13  AC_ARG_ENABLE(music-cmd,
    2.14 @@ -114,7 +110,7 @@
    2.15  if test x$enable_music_libmikmod = xyes; then
    2.16  	AC_PATH_PROG(LIBMIKMOD_CONFIG, libmikmod-config, no, [$PATH])
    2.17  	if test "$LIBMIKMOD_CONFIG" = "no" ; then
    2.18 -		no_libmikmod==yes
    2.19 +		no_libmikmod=yes
    2.20  	else
    2.21  		CFLAGS_SAVED="$CFLAGS"
    2.22  		LIBS_SAVED="$LIBS"
     3.1 --- a/mikmod/mikmod.h	Thu Dec 16 05:29:55 2004 +0000
     3.2 +++ b/mikmod/mikmod.h	Tue Dec 21 17:38:38 2004 +0000
     3.3 @@ -522,10 +522,8 @@
     3.4   */
     3.5  
     3.6  /* SDL_RWops compatability */
     3.7 -#ifdef USE_RWOPS
     3.8  #include "SDL_rwops.h"
     3.9  MIKMODAPI extern MODULE* Player_LoadRW(SDL_RWops*,int,BOOL);
    3.10 -#endif /* USE_RWOPS */
    3.11  /* End SDL_RWops compatability */
    3.12  MIKMODAPI extern MODULE* Player_Load(CHAR*,int,BOOL);
    3.13  MIKMODAPI extern MODULE* Player_LoadFP(FILE*,int,BOOL);
     4.1 --- a/mikmod/mikmod_internals.h	Thu Dec 16 05:29:55 2004 +0000
     4.2 +++ b/mikmod/mikmod_internals.h	Tue Dec 21 17:38:38 2004 +0000
     4.3 @@ -136,10 +136,8 @@
     4.4  /*========== Portable file I/O */
     4.5  
     4.6  /* SDL_RWops compatability */
     4.7 -#ifdef USE_RWOPS
     4.8  extern MREADER *_mm_new_rwops_reader(SDL_RWops * rw);
     4.9  extern void _mm_delete_rwops_reader (MREADER*);
    4.10 -#endif /* USE_RWOPS */
    4.11  /* End SDL_RWops compatability */
    4.12  
    4.13  extern MREADER* _mm_new_file_reader(FILE* fp);
     5.1 --- a/mikmod/mloader.c	Thu Dec 16 05:29:55 2004 +0000
     5.2 +++ b/mikmod/mloader.c	Tue Dec 21 17:38:38 2004 +0000
     5.3 @@ -538,7 +538,6 @@
     5.4  }
     5.5  
     5.6  /* SDL_RWops compatability */
     5.7 -#ifdef USE_RWOPS
     5.8  
     5.9  /* Open a module via an SDL_rwop.  The loader will initialize the specified
    5.10     song-player 'player'. */
    5.11 @@ -554,7 +553,6 @@
    5.12  	return result;
    5.13  }
    5.14  
    5.15 -#endif /* USE_RWOPS */
    5.16  /* End SDL_RWops compatability */
    5.17  
    5.18  /* ex:set ts=4: */
     6.1 --- a/mikmod/mmio.c	Thu Dec 16 05:29:55 2004 +0000
     6.2 +++ b/mikmod/mmio.c	Tue Dec 21 17:38:38 2004 +0000
     6.3 @@ -74,8 +74,6 @@
     6.4  
     6.5  */
     6.6  
     6.7 -#ifdef USE_RWOPS
     6.8 -
     6.9  typedef struct MRWOPSREADER {
    6.10  	MREADER core;
    6.11  	SDL_RWops* rw;
    6.12 @@ -138,8 +136,6 @@
    6.13  	if(reader) free(reader);
    6.14  }
    6.15  
    6.16 -#endif /* USE_RWOPS */
    6.17 -
    6.18  /*
    6.19  
    6.20    End SDL_rwops section
     7.1 --- a/music.c	Thu Dec 16 05:29:55 2004 +0000
     7.2 +++ b/music.c	Tue Dec 21 17:38:38 2004 +0000
     7.3 @@ -56,10 +56,8 @@
     7.4  #    define UNIMOD			MODULE
     7.5  #    define MikMod_Init()		MikMod_Init(NULL)
     7.6  #    define MikMod_LoadSong(a,b)	Player_Load(a,b,0)
     7.7 -#    ifdef USE_RWOPS
     7.8 -#      ifndef LIBMIKMOD_MUSIC
     7.9 -#      define MikMod_LoadSongRW(a,b)	Player_LoadRW(a,b,0)
    7.10 -#    endif
    7.11 +#    ifndef LIBMIKMOD_MUSIC
    7.12 +#    define MikMod_LoadSongRW(a,b)	Player_LoadRW(a,b,0)
    7.13  #    endif
    7.14  #    define MikMod_FreeSong		Player_Free
    7.15       extern int MikMod_errno;
    7.16 @@ -1228,8 +1226,6 @@
    7.17  #endif
    7.18  }
    7.19  
    7.20 -#ifdef USE_RWOPS
    7.21 -
    7.22  # ifdef LIBMIKMOD_MUSIC
    7.23  typedef struct
    7.24  {
    7.25 @@ -1354,5 +1350,3 @@
    7.26  	}
    7.27  	return(music);
    7.28  }
    7.29 -
    7.30 -#endif /* USE_RWOPS */