From 512c2bde936869baa5cd540b968bd5230f950658 Mon Sep 17 00:00:00 2001 From: Sjoerd van der Berg Date: Sun, 17 Oct 2004 17:56:53 +0000 Subject: [PATCH] Fix some sdl_sound linking and detection issues Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2030 --- configure.in | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/configure.in b/configure.in index a749e10b..d7b020ae 100644 --- a/configure.in +++ b/configure.in @@ -179,10 +179,15 @@ fi AH_TEMPLATE(C_SDL_SOUND,[Define to 1 to enable SDL_sound support]) AC_CHECK_HEADER(SDL/SDL_sound.h,have_SDL_sound_h=yes,) -AC_CHECK_LIB(SDL_sound, Sound_Init, have_SDL_sound_lib=yes,,) -if test x$have_SDL_sound_h = xyes -a x$have_SDL_sound_lib = xyes ; then - LIBS="$LIBS -lSDL_sound" - AC_DEFINE(C_SDL_SOUND,1) +AC_CHECK_LIB(SDL_sound, Sound_Init, have_SDL_sound_init=yes,,) +AC_CHECK_LIB(SDL_sound, Sound_Seek, have_SDL_sound_seek=yes,,) +if test x$have_SDL_sound_h = xyes -a x$have_SDL_sound_init = xyes ; then + if test x$have_SDL_sound_seek = xyes ; then + LIBS="-lSDL_sound $LIBS" + AC_DEFINE(C_SDL_SOUND,1) + else + AC_MSG_WARN([Can't find SoundSeek in libSDL_Sound, libSDL_sound support disabled]) + fi else AC_MSG_WARN([Can't find libSDL_sound, libSDL_sound support disabled]) fi