From 31c4bf14cc78a34e201ef5cec1529d9e1e6421bd Mon Sep 17 00:00:00 2001 From: stpohle Date: Sun, 4 Jan 2004 00:22:19 +0000 Subject: [PATCH] added option to disable sdl mixer support --- configure.in | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/configure.in b/configure.in index 6e6a023..01755e4 100644 --- a/configure.in +++ b/configure.in @@ -68,26 +68,30 @@ esac dnl SDL_mixer ********************************** +AC_ARG_ENABLE(sdlmixer, [ --disable-sdlmixer Do not compile with SDL Mixer support ]) AC_ARG_WITH(sdlmixer-prefix, [ --with-sdlmixer-prefix=PFX prefix where SDL_mixer library is installed], sdlmixer_prefix="$withval", sdlmixer_prefix="") +if test x$enable_sdlmixer = xno ; then + AC_MSG_WARN(Disable SDLMixer support) + have_sdl_mixer=no +else + if test x"$sdlmixer_prefix" != "x"; then + SDLMIXER_LIB="-L$sdlmixer_prefix/lib" + SDLMIXER_CFLAGS="-I$sdlmixer_prefix/include" + LDFLAGS="$SDLMIXER_LIB $LDFLAGS" + CFLAGS="$CFLAGS $SDLMIXER_CFLAGS" + fi -if test x"$sdlmixer_prefix" != "x"; then - SDLMIXER_LIB="-L$sdlmixer_prefix/lib" - SDLMIXER_CFLAGS="-I$sdlmixer_prefix/include" - LDFLAGS="$SDLMIXER_LIB $LDFLAGS" - CFLAGS="$CFLAGS $SDLMIXER_CFLAGS" -fi - -AC_CHECK_LIB(SDL_mixer, Mix_OpenAudio, have_sdl_mixer="yes", have_sdl_mixer="no" , ) + AC_CHECK_LIB(SDL_mixer, Mix_OpenAudio, have_sdl_mixer="yes", have_sdl_mixer="no" , ) -if test "x$have_sdl_mixer" = "xyes"; then - AC_DEFINE(HAVE_SDL_MIXER, [1], [SDL_mixer]) - LIBS="$LIBS -lSDL_mixer" -else - AC_MSG_WARN([*** libSDL_mixer not found. Make sure you have the development package of SDL_mixer installed - (www.libsdl.org) - or try to use --with-sdlmixer-prefix option]) + if test "x$have_sdl_mixer" = "xyes"; then + AC_DEFINE(HAVE_SDL_MIXER, [1], [SDL_mixer]) + LIBS="$LIBS -lSDL_mixer" + else + AC_MSG_WARN([*** libSDL_mixer not found. Make sure you have the development package of SDL_mixer installed - (www.libsdl.org) - or try to use --with-sdlmixer-prefix option]) + fi fi - dnl Checks for library functions. dnl Check for rintf and functions like that AC_MSG_CHECKING(for rintf)