mystro256 29ba7aa
Index: configure.in
mystro256 29ba7aa
===================================================================
mystro256 29ba7aa
--- configure.in.orig
mystro256 29ba7aa
+++ configure.in
mystro256 29ba7aa
@@ -34,7 +34,7 @@ AC_SEARCH_LIBS([ilInit], [IL], [], AC_MS
mystro256 29ba7aa
 AC_SEARCH_LIBS([FT_Load_Glyph], [freetype], [], AC_MSG_ERROR([Can't LÖVE without FreeType]))
mystro256 29ba7aa
 AC_SEARCH_LIBS([PHYSFS_init], [physfs], [], AC_MSG_ERROR([Can't LÖVE without PhysicsFS]))
mystro256 29ba7aa
 AC_SEARCH_LIBS([ModPlug_Load], [modplug], [], AC_MSG_ERROR([Can't LÖVE without ModPlug]))
mystro256 29ba7aa
-AC_SEARCH_LIBS([mpg123_open_feed], [mpg123], [], AC_MSG_ERROR([Can't LÖVE without Mpg123]))
mystro256 29ba7aa
+AC_SEARCH_LIBS([mpg123_open_feed], [mpg123], [AC_DEFINE([WITH_MPG123], [], [Description for mpg123])], AC_MSG_WARN([Mpg123 is not available]))
mystro256 29ba7aa
 AC_SEARCH_LIBS([mpg123_seek_64], [mpg123], AC_SUBST([FILE_OFFSET],[-D_FILE_OFFSET_BITS=64]), AC_SUBST([FILE_OFFSET],[]))
mystro256 29ba7aa
 AC_SEARCH_LIBS([ov_open], [vorbisfile], [], AC_MSG_ERROR([Can't LÖVE without VorbisFile]))
mystro256 29ba7aa
 AC_ARG_ENABLE([headless],
mystro256 29ba7aa
Index: src/modules/sound/lullaby/Mpg123Decoder.cpp
mystro256 29ba7aa
===================================================================
mystro256 29ba7aa
--- src/modules/sound/lullaby/Mpg123Decoder.cpp.orig
mystro256 29ba7aa
+++ src/modules/sound/lullaby/Mpg123Decoder.cpp
mystro256 29ba7aa
@@ -18,6 +18,10 @@
mystro256 29ba7aa
 * 3. This notice may not be removed or altered from any source distribution.
mystro256 29ba7aa
 **/
mystro256 29ba7aa
 
mystro256 29ba7aa
+#include "../config.h"
mystro256 29ba7aa
+
mystro256 29ba7aa
+#ifdef WITH_MPG123
mystro256 29ba7aa
+
mystro256 29ba7aa
 #include "Mpg123Decoder.h"
mystro256 29ba7aa
 
mystro256 29ba7aa
 #include <common/Exception.h>
mystro256 29ba7aa
@@ -227,3 +231,4 @@ namespace lullaby
mystro256 29ba7aa
 } // lullaby
mystro256 29ba7aa
 } // sound
mystro256 29ba7aa
 } // love
mystro256 29ba7aa
+#endif
mystro256 29ba7aa
Index: src/modules/sound/lullaby/Mpg123Decoder.h
mystro256 29ba7aa
===================================================================
mystro256 29ba7aa
--- src/modules/sound/lullaby/Mpg123Decoder.h.orig
mystro256 29ba7aa
+++ src/modules/sound/lullaby/Mpg123Decoder.h
mystro256 29ba7aa
@@ -17,7 +17,9 @@
mystro256 29ba7aa
 *    misrepresented as being the original software.
mystro256 29ba7aa
 * 3. This notice may not be removed or altered from any source distribution.
mystro256 29ba7aa
 **/
mystro256 29ba7aa
+#include "../config.h"
mystro256 29ba7aa
 
mystro256 29ba7aa
+#ifdef WITH_MPG123
mystro256 29ba7aa
 #ifndef LOVE_SOUND_LULLABY_LIBMPG123_DECODER_H
mystro256 29ba7aa
 #define LOVE_SOUND_LULLABY_LIBMPG123_DECODER_H
mystro256 29ba7aa
 
mystro256 29ba7aa
@@ -77,3 +79,4 @@ namespace lullaby
mystro256 29ba7aa
 } // love
mystro256 29ba7aa
 
mystro256 29ba7aa
 #endif // LOVE_SOUND_LULLABY_LIBMPG123_DECODER_H
mystro256 29ba7aa
+#endif
mystro256 29ba7aa
Index: src/modules/sound/lullaby/Sound.cpp
mystro256 29ba7aa
===================================================================
mystro256 29ba7aa
--- src/modules/sound/lullaby/Sound.cpp.orig
mystro256 29ba7aa
+++ src/modules/sound/lullaby/Sound.cpp
mystro256 29ba7aa
@@ -18,10 +18,14 @@
mystro256 29ba7aa
 * 3. This notice may not be removed or altered from any source distribution.
mystro256 29ba7aa
 **/
mystro256 29ba7aa
 
mystro256 29ba7aa
+#include "../config.h"
mystro256 29ba7aa
+
mystro256 29ba7aa
 #include "Sound.h"
mystro256 29ba7aa
 
mystro256 29ba7aa
 #include "ModPlugDecoder.h"
mystro256 29ba7aa
+#ifdef WITH_MPG123
mystro256 29ba7aa
 #include "Mpg123Decoder.h"
mystro256 29ba7aa
+#endif
mystro256 29ba7aa
 #include "VorbisDecoder.h"
mystro256 29ba7aa
 //#include "FLACDecoder.h"
mystro256 29ba7aa
 
mystro256 29ba7aa
@@ -37,7 +41,9 @@ namespace lullaby
mystro256 29ba7aa
 
mystro256 29ba7aa
 	Sound::~Sound()
mystro256 29ba7aa
 	{
mystro256 29ba7aa
+		#ifdef WITH_MPG123
mystro256 29ba7aa
 		Mpg123Decoder::quit();
mystro256 29ba7aa
+		#endif
mystro256 29ba7aa
 	}
mystro256 29ba7aa
 
mystro256 29ba7aa
 	const char * Sound::getName() const
mystro256 29ba7aa
@@ -55,8 +61,10 @@ namespace lullaby
mystro256 29ba7aa
 		// Find a suitable decoder here, and return it.
mystro256 29ba7aa
 		if (ModPlugDecoder::accepts(ext))
mystro256 29ba7aa
 			decoder = new ModPlugDecoder(data, ext, bufferSize);
mystro256 29ba7aa
+		#ifdef WITH_MPG123
mystro256 29ba7aa
 		else if (Mpg123Decoder::accepts(ext))
mystro256 29ba7aa
 			decoder = new Mpg123Decoder(data, ext, bufferSize);
mystro256 29ba7aa
+		#endif
mystro256 29ba7aa
 		else if (VorbisDecoder::accepts(ext))
mystro256 29ba7aa
 			decoder = new VorbisDecoder(data, ext, bufferSize);
mystro256 29ba7aa
 		/*else if (FLACDecoder::accepts(ext))