diff --git a/stepmania/configure.ac b/stepmania/configure.ac index 7872f11c51..0d7ee92992 100644 --- a/stepmania/configure.ac +++ b/stepmania/configure.ac @@ -22,6 +22,15 @@ AC_PROG_CXX AM_PATH_SDL +AM_PATH_ALSA(0.9.0, alsa=true ,alsa=0 ) +AC_DEFINE_UNQUOTED([ALSA], $alsa) +AH_VERBATIM([ALSA], +[#if ALSA +#define HAVE_ALSA +#endif +]) +AM_CONDITIONAL(ALSA, test x$alsa = xtrue ) + # We could do this more cleanly with an AC_CHECK_FUNCS wrapper. AC_CHECK_FUNCS([powf sqrtf sinf tanf cosf acosf]) AH_VERBATIM([VA_ZZZ_NEEDED_FUNCS], diff --git a/stepmania/src/Makefile.am b/stepmania/src/Makefile.am index 6247464293..7d86e69f58 100644 --- a/stepmania/src/Makefile.am +++ b/stepmania/src/Makefile.am @@ -1,11 +1,13 @@ bin_PROGRAMS = stepmania -AM_CXXFLAGS = -ISDL-1.2.5/include -ISDL_sound-1.0.0 if DARWIN AM_LDFLAGS = -framework Cocoa -framework Quicktime -framework Carbon -framework OpenGL -framework IOKit +CXXFLAGS_EXTRA = else -AM_CXXFLAGS = $(AM_CXXFLAGS) -DLINUX +CXXFLAGS_EXTRA = -DLINUX endif +AM_CXXFLAGS = -ISDL-1.2.5/include -ISDL_sound-1.0.0 $(CXXFLAGS_EXTRA) + # This is a little hacky; we use our own version of SDL and SDL_sound, and I don't # want to have to integrate their entire build systems. SDL-1.2.5/src/.libs/libSDL.a: @@ -31,7 +33,7 @@ SDL_sound-1.0.0/.libs/libSDL_sound.a: --disable-modplug \ --enable-static --disable-shared make -C SDL_sound-1.0.0 - + #--enable-debug RageHelpers = SDL_dither.cpp SDL_dither.h SDL_rotozoom.cpp SDL_rotozoom.h SDL_utils.cpp SDL_utils.h @@ -134,10 +136,10 @@ Sound_Null = \ arch/Sound/RageSoundDriver_Null.cpp \ arch/Sound/RageSoundDriver_Null.h -if DARWIN -Sound = $(Sound_Null) +if ALSA +Sound = $(Sound_Null) $(Sound_ALSA9) else -Sound = $(Sound_null) $(Sound_ALSA9) +Sound = $(Sound_null) endif stepmania_SOURCES = $(Rage) $(DataStructures) $(FileTypes) $(StepMania) $(Transitions) \