mirror of https://github.com/encounter/SDL.git
Fixed bug 3043 - fix alsa configury and cmake checks
Ozkan Sezer SDL's alsa uses snd_pcm_recover() which has been available only since alsa-lib-1.0.11.
This commit is contained in:
parent
9c48365524
commit
abefe78507
|
@ -105,7 +105,9 @@ macro(CheckALSA)
|
||||||
if(ALSA)
|
if(ALSA)
|
||||||
CHECK_INCLUDE_FILE(alsa/asoundlib.h HAVE_ASOUNDLIB_H)
|
CHECK_INCLUDE_FILE(alsa/asoundlib.h HAVE_ASOUNDLIB_H)
|
||||||
if(HAVE_ASOUNDLIB_H)
|
if(HAVE_ASOUNDLIB_H)
|
||||||
CHECK_LIBRARY_EXISTS(asound snd_pcm_open "" HAVE_LIBASOUND)
|
CHECK_LIBRARY_EXISTS(asound snd_pcm_recover "" HAVE_LIBASOUND)
|
||||||
|
endif()
|
||||||
|
if(HAVE_LIBASOUND)
|
||||||
set(HAVE_ALSA TRUE)
|
set(HAVE_ALSA TRUE)
|
||||||
file(GLOB ALSA_SOURCES ${SDL2_SOURCE_DIR}/src/audio/alsa/*.c)
|
file(GLOB ALSA_SOURCES ${SDL2_SOURCE_DIR}/src/audio/alsa/*.c)
|
||||||
set(SOURCE_FILES ${SOURCE_FILES} ${ALSA_SOURCES})
|
set(SOURCE_FILES ${SOURCE_FILES} ${ALSA_SOURCES})
|
||||||
|
|
|
@ -17604,7 +17604,7 @@ LIBS="$ALSA_LIBS $LIBS"
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_LIBS" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_LIBS" >&5
|
||||||
$as_echo "$ALSA_LIBS" >&6; }
|
$as_echo "$ALSA_LIBS" >&6; }
|
||||||
|
|
||||||
min_alsa_version=0.9.0
|
min_alsa_version=1.0.11
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libasound headers version >= $min_alsa_version" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libasound headers version >= $min_alsa_version" >&5
|
||||||
$as_echo_n "checking for libasound headers version >= $min_alsa_version... " >&6; }
|
$as_echo_n "checking for libasound headers version >= $min_alsa_version... " >&6; }
|
||||||
no_alsa=""
|
no_alsa=""
|
||||||
|
|
|
@ -770,7 +770,7 @@ CheckALSA()
|
||||||
AC_HELP_STRING([--enable-alsa], [support the ALSA audio API [[default=yes]]]),
|
AC_HELP_STRING([--enable-alsa], [support the ALSA audio API [[default=yes]]]),
|
||||||
, enable_alsa=yes)
|
, enable_alsa=yes)
|
||||||
if test x$enable_audio = xyes -a x$enable_alsa = xyes; then
|
if test x$enable_audio = xyes -a x$enable_alsa = xyes; then
|
||||||
AM_PATH_ALSA(0.9.0, have_alsa=yes, have_alsa=no)
|
AM_PATH_ALSA(1.0.11, have_alsa=yes, have_alsa=no)
|
||||||
# Restore all flags from before the ALSA detection runs
|
# Restore all flags from before the ALSA detection runs
|
||||||
CFLAGS="$alsa_save_CFLAGS"
|
CFLAGS="$alsa_save_CFLAGS"
|
||||||
LDFLAGS="$alsa_save_LDFLAGS"
|
LDFLAGS="$alsa_save_LDFLAGS"
|
||||||
|
|
Loading…
Reference in New Issue