diff options
author | Jenkins2 <jenkins2@gerrit.asterisk.org> | 2018-03-20 06:45:35 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2018-03-20 06:45:35 -0500 |
commit | beab57a57622ce95037088e2f438c0e5e45083bc (patch) | |
tree | f81a47b013c0ca52c1f9beb6b628a003b2850396 | |
parent | 0bfc83ee4ffa59e3cb7f6d5cf26e30986f9e4809 (diff) | |
parent | 00789174f6cdac4630ba01030186ac252bdb96c5 (diff) |
Merge "BuildSystem: Enable Advanced Linux Sound Architecture (ALSA) in NetBSD."
-rw-r--r-- | channels/chan_alsa.c | 4 | ||||
-rwxr-xr-x | configure | 24 | ||||
-rw-r--r-- | configure.ac | 2 |
3 files changed, 17 insertions, 13 deletions
diff --git a/channels/chan_alsa.c b/channels/chan_alsa.c index ed7d5cfe3..a5dead1a2 100644 --- a/channels/chan_alsa.c +++ b/channels/chan_alsa.c @@ -39,6 +39,10 @@ #include "asterisk.h" +#include <errno.h> +#ifndef ESTRPIPE +#define ESTRPIPE EPIPE +#endif #include <fcntl.h> #include <sys/ioctl.h> #include <sys/time.h> @@ -19603,13 +19603,13 @@ if test "x${PBX_ALSA}" != "x1" -a "${USE_ALSA}" != "no"; then ast_ext_lib_check_save_CFLAGS="${CFLAGS}" CFLAGS="${CFLAGS} " - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for snd_spcm_init in -lasound" >&5 -$as_echo_n "checking for snd_spcm_init in -lasound... " >&6; } -if ${ac_cv_lib_asound_snd_spcm_init+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for snd_pcm_open in -lasound" >&5 +$as_echo_n "checking for snd_pcm_open in -lasound... " >&6; } +if ${ac_cv_lib_asound_snd_pcm_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lasound ${pbxlibdir} -lm -ldl $LIBS" +LIBS="-lasound ${pbxlibdir} $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19619,27 +19619,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char snd_spcm_init (); +char snd_pcm_open (); int main () { -return snd_spcm_init (); +return snd_pcm_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_asound_snd_spcm_init=yes + ac_cv_lib_asound_snd_pcm_open=yes else - ac_cv_lib_asound_snd_spcm_init=no + ac_cv_lib_asound_snd_pcm_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_asound_snd_spcm_init" >&5 -$as_echo "$ac_cv_lib_asound_snd_spcm_init" >&6; } -if test "x$ac_cv_lib_asound_snd_spcm_init" = xyes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_asound_snd_pcm_open" >&5 +$as_echo "$ac_cv_lib_asound_snd_pcm_open" >&6; } +if test "x$ac_cv_lib_asound_snd_pcm_open" = xyes; then : AST_ALSA_FOUND=yes else AST_ALSA_FOUND=no @@ -19650,7 +19650,7 @@ fi # now check for the header. if test "${AST_ALSA_FOUND}" = "yes"; then - ALSA_LIB="${pbxlibdir} -lasound -lm -ldl" + ALSA_LIB="${pbxlibdir} -lasound " # if --with-ALSA=DIR has been specified, use it. if test "x${ALSA_DIR}" != "x"; then ALSA_INCLUDE="-I${ALSA_DIR}/include" diff --git a/configure.ac b/configure.ac index d39b57cb7..787c50708 100644 --- a/configure.ac +++ b/configure.ac @@ -1486,7 +1486,7 @@ PKG_PROG_PKG_CONFIG() # do the package library checks now -AST_EXT_LIB_CHECK([ALSA], [asound], [snd_spcm_init], [alsa/asoundlib.h], [-lm -ldl]) +AST_EXT_LIB_CHECK([ALSA], [asound], [snd_pcm_open], [alsa/asoundlib.h]) AST_EXT_LIB_CHECK([BFD], [bfd], [bfd_openr], [bfd.h]) # Fedora/RedHat/CentOS require extra libraries |