changeset 201:56bc776f0563

Midi support.
author Ryan C. Gordon <icculus@icculus.org>
date Fri, 04 Jan 2002 06:51:12 +0000
parents f75ed2d72238
children ace10a8e632b
files Makefile.am configure.in decoders/Makefile.am
diffstat 3 files changed, 18 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.am	Fri Jan 04 06:50:37 2002 +0000
+++ b/Makefile.am	Fri Jan 04 06:51:12 2002 +0000
@@ -13,14 +13,20 @@
 	extra_rwops.h	\
 	audio_convert.c
 
+if USE_TIMIDITY
+TIMIDITY_LIB = decoders/timidity/libtimidity.la
+else
+TIMIDITY_LIB =
+endif
+
 libSDL_sound_la_LDFLAGS = 		\
 	-release $(LT_RELEASE)	\
 	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
-libSDL_sound_la_LIBADD = decoders/libdecoders.la
-
+libSDL_sound_la_LIBADD =	\
+	decoders/libdecoders.la	\
+	$(TIMIDITY_LIB)
 
 EXTRA_DIST =	\
 	CREDITS \
 	COPYING \
 	CHANGELOG
-        
--- a/configure.in	Fri Jan 04 06:50:37 2002 +0000
+++ b/configure.in	Fri Jan 04 06:51:12 2002 +0000
@@ -137,8 +137,8 @@
 
 dnl Check for the MIDI pipe decoder...
 AC_ARG_ENABLE(midi,
-[  --enable-midi              enable MIDI music via a pipe [default=no]],
-              , enable_midi=no)
+[  --enable-midi              enable software MIDI music [default=yes]],
+              , enable_midi=yes)
 if test x$enable_midi = xyes; then
   AC_DEFINE(SOUND_SUPPORTS_MIDI)
 fi
@@ -221,9 +221,12 @@
 AC_FUNC_MEMCMP
 AC_CHECK_FUNCS([memset strrchr])
 
+dnl Add Makefile conditionals
+AM_CONDITIONAL(USE_TIMIDITY, test x$enable_midi = xyes)
 
 AC_OUTPUT([
 Makefile
 decoders/Makefile
+decoders/timidity/Makefile
 test/Makefile
 ])
--- a/decoders/Makefile.am	Fri Jan 04 06:50:37 2002 +0000
+++ b/decoders/Makefile.am	Fri Jan 04 06:51:12 2002 +0000
@@ -1,6 +1,8 @@
 noinst_LTLIBRARIES = libdecoders.la
 
-INCLUDES = -I$(top_srcdir)
+SUBDIRS = timidity
+
+INCLUDES = -I$(top_srcdir) -Itimidity
 
 libdecoders_la_SOURCES =	\
 	aiff.c		\
@@ -8,7 +10,7 @@
 	mp3.c		\
 	ogg.c		\
 	raw.c		\
-    shn.c		\
+	shn.c		\
 	voc.c		\
 	midi.c		\
 	flac.c		\