- if check_alsa -lasound; then sound_drivers="$sound_drivers alsa"; fi
- if check_sdl; then sound_drivers="$sound_drivers sdl"; fi
+ if check_alsa -lasound; then
+ sound_drivers="$sound_drivers alsa"
+ MAIN_LDLIBS="-lasound $MAIN_LDLIBS"
+ fi
+ if check_pulseaudio -lpulse; then
+ sound_drivers="$sound_drivers pulseaudio"
+ MAIN_LDLIBS="-lpulse $MAIN_LDLIBS"
+ fi
+ if [ "$need_sdl" = "yes" ] || check_sdl `sdl-config --cflags --libs`; then
+ sound_drivers="$sound_drivers sdl"
+ need_sdl="yes"
+ fi
+else
+ if echo $sound_drivers | grep -q "\<oss\>"; then
+ check_oss || fail "oss support is missing"
+ fi
+ if echo $sound_drivers | grep -q "\<alsa\>"; then
+ MAIN_LDLIBS="-lasound $MAIN_LDLIBS"
+ check_alsa || fail "please install libasound2-dev"
+ fi
+ if echo $sound_drivers | grep -q "\<pulseaudio\>"; then
+ MAIN_LDLIBS="-lpulse $MAIN_LDLIBS"
+ check_pulseaudio || fail "pulseaudio support is missing"
+ fi