diff --git a/.editorconfig b/.editorconfig index 1b42aeabd7..5bea015dce 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,7 +1,7 @@ root = true # properties -[*.{h,c,hpp,cpp,m,java}] +[*.{h,c,hpp,cpp,m,java,ac}] insert_final_newline = true indent_style = space indent_size = 4 diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index d929d2d7dc..a82564dd26 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -1,2 +1,5 @@ # expand tab to spaces and remove $Id$ (#3292) -5ac9104514499d648f68991ef796368c51b4dfec \ No newline at end of file +5ac9104514499d648f68991ef796368c51b4dfec + +# expand tab to spaces and cleanup formatting in aconfigure.ac (#4154) +22464d7a052ab5b7775496bb52211ea66dc2d62d diff --git a/aconfigure b/aconfigure index 47fce480ee..cead0631dc 100755 --- a/aconfigure +++ b/aconfigure @@ -1567,16 +1567,12 @@ Optional Features: Exclude Android MediaCodec (default: autodetect) --disable-darwin-ssl Exclude Darwin SSL (default: autodetect) --disable-ssl Exclude SSL support the build (default: autodetect) - --disable-opencore-amr Exclude OpenCORE AMR support from the build (default: autodetect) - --disable-silk Exclude SILK support from the build (default: autodetect) - --disable-opus Exclude OPUS support from the build (default: autodetect) - --disable-bcg729 Disable bcg729 (default: not disabled) --disable-lyra Disable lyra (default: not disabled) --disable-libsrtp Exclude libsrtp in the build @@ -3222,12 +3218,12 @@ test -n "$target_alias" && program_prefix=${target_alias}- ac_config_headers="$ac_config_headers pjlib/include/pj/compat/os_auto.h pjlib/include/pj/compat/m_auto.h pjmedia/include/pjmedia/config_auto.h pjmedia/include/pjmedia-codec/config_auto.h pjsip/include/pjsip/sip_autoconf.h" -ac_config_files="$ac_config_files build.mak build/os-auto.mak build/cc-auto.mak pjlib/build/os-auto.mak pjlib-util/build/os-auto.mak pjmedia/build/os-auto.mak pjsip/build/os-auto.mak third_party/build/os-auto.mak" +ac_config_files="$ac_config_files build.mak build/os-auto.mak build/cc-auto.mak pjlib/build/os-auto.mak pjlib-util/build/os-auto.mak pjmedia/build/os-auto.mak pjsip/build/os-auto.mak third_party/build/os-auto.mak" if test "$CFLAGS" = ""; then - CFLAGS="-O2" + CFLAGS="-O2" fi @@ -4505,11 +4501,11 @@ if test x$ac_prog_cxx_stdcxx = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5 printf %s "checking for $CXX option to enable C++11 features... " >&6; } -if test ${ac_cv_prog_cxx_11+y} +if test ${ac_cv_prog_cxx_cxx11+y} then : printf %s "(cached) " >&6 else $as_nop - ac_cv_prog_cxx_11=no + ac_cv_prog_cxx_cxx11=no ac_save_CXX=$CXX cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4551,11 +4547,11 @@ if test x$ac_prog_cxx_stdcxx = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5 printf %s "checking for $CXX option to enable C++98 features... " >&6; } -if test ${ac_cv_prog_cxx_98+y} +if test ${ac_cv_prog_cxx_cxx98+y} then : printf %s "(cached) " >&6 else $as_nop - ac_cv_prog_cxx_98=no + ac_cv_prog_cxx_cxx98=no ac_save_CXX=$CXX cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4882,29 +4878,29 @@ if test "$CC_CFLAGS" = ""; then CC_CFLAGS="-Wall"; fi case $host in *mingw* | *cygw* | *win32* | *w32* ) - if pwd -W 2&> /dev/null; then - ac_pjdir=`pwd -W` - else - # We're probably cross-compiling mingw on Linux - ac_pjdir=`pwd` - fi - ;; + if pwd -W 2&> /dev/null; then + ac_pjdir=`pwd -W` + else + # We're probably cross-compiling mingw on Linux + ac_pjdir=`pwd` + fi + ;; *) - ac_pjdir=`pwd` - ;; + ac_pjdir=`pwd` + ;; esac case $target in *mingw* | *cygw* | *win32* | *w32* ) - ac_shlib_suffix=dll - ;; + ac_shlib_suffix=dll + ;; *darwin*) - ac_shlib_suffix=dylib - ;; + ac_shlib_suffix=dylib + ;; *) - ac_shlib_suffix=so - ;; + ac_shlib_suffix=so + ;; esac @@ -5263,14 +5259,16 @@ fi # Check whether --enable-libuuid was given. if test ${enable_libuuid+y} then : - enableval=$enable_libuuid; if test "$enable_libuuid" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if libuuid disabled... yes" >&5 + enableval=$enable_libuuid; + if test "$enable_libuuid" = "no"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if libuuid disabled... yes" >&5 printf "%s\n" "Checking if libuuid disabled... yes" >&6; } - ac_has_uuid_lib=0 - fi + ac_has_uuid_lib=0 + fi + else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5 printf %s "checking for uuid_generate in -luuid... " >&6; } if test ${ac_cv_lib_uuid_uuid_generate+y} then : @@ -5313,7 +5311,7 @@ then : fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5 printf %s "checking for uuid_generate in -luuid... " >&6; } if test ${ac_cv_lib_uuid_uuid_generate+y} then : @@ -5354,6 +5352,7 @@ then : fi + fi @@ -5426,17 +5425,17 @@ printf "%s\n" "#define PJ_M_NAME \"$target_cpu\"" >>confdefs.h printf %s "checking memory alignment... " >&6; } case $target in sparc64-* | ia64-* | x86_64-* | arm64-* | aarch64-* | mips64* ) - printf "%s\n" "#define PJ_POOL_ALIGNMENT 8" >>confdefs.h + printf "%s\n" "#define PJ_POOL_ALIGNMENT 8" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 8 bytes" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 8 bytes" >&5 printf "%s\n" "8 bytes" >&6; } - ;; + ;; * ) - printf "%s\n" "#define PJ_POOL_ALIGNMENT 4" >>confdefs.h + printf "%s\n" "#define PJ_POOL_ALIGNMENT 4" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 4 bytes (default)" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 4 bytes (default)" >&5 printf "%s\n" "4 bytes (default)" >&6; } - ;; + ;; esac @@ -5704,77 +5703,80 @@ printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h if test "x$ac_cv_c_bigendian" = "xyes"; then - CFLAGS="$CFLAGS -DPJ_IS_BIG_ENDIAN=1 -DPJ_IS_LITTLE_ENDIAN=0" - ac_cflags="$ac_cflags -DPJ_IS_BIG_ENDIAN=1 -DPJ_IS_LITTLE_ENDIAN=0" + CFLAGS="$CFLAGS -DPJ_IS_BIG_ENDIAN=1 -DPJ_IS_LITTLE_ENDIAN=0" + ac_cflags="$ac_cflags -DPJ_IS_BIG_ENDIAN=1 -DPJ_IS_LITTLE_ENDIAN=0" else - CFLAGS="$CFLAGS -DPJ_IS_BIG_ENDIAN=0 -DPJ_IS_LITTLE_ENDIAN=1" - ac_cflags="$ac_cflags -DPJ_IS_BIG_ENDIAN=0 -DPJ_IS_LITTLE_ENDIAN=1" + CFLAGS="$CFLAGS -DPJ_IS_BIG_ENDIAN=0 -DPJ_IS_LITTLE_ENDIAN=1" + ac_cflags="$ac_cflags -DPJ_IS_BIG_ENDIAN=0 -DPJ_IS_LITTLE_ENDIAN=1" fi case $target in *android*) - printf "%s\n" "#define PJ_ANDROID 1" >>confdefs.h + printf "%s\n" "#define PJ_ANDROID 1" >>confdefs.h - ac_target_arch=$TARGET_ABI - ac_std_cpp_lib=$STD_CPP_LIB - ;; + ac_target_arch=$TARGET_ABI + ac_std_cpp_lib=$STD_CPP_LIB + ;; *mingw* | *cygw* | *win32* | *w32* ) - printf "%s\n" "#define PJ_WIN32 1" >>confdefs.h + printf "%s\n" "#define PJ_WIN32 1" >>confdefs.h - printf "%s\n" "#define PJ_WIN32_WINNT 0x0400" >>confdefs.h + printf "%s\n" "#define PJ_WIN32_WINNT 0x0400" >>confdefs.h - printf "%s\n" "#define WIN32_LEAN_AND_MEAN 1" >>confdefs.h + printf "%s\n" "#define WIN32_LEAN_AND_MEAN 1" >>confdefs.h - case $target in - *_64-w64-mingw* ) - printf "%s\n" "#define PJ_WIN64 1" >>confdefs.h + case $target in + *_64-w64-mingw* ) + printf "%s\n" "#define PJ_WIN64 1" >>confdefs.h - ;; - esac - ;; + ;; + esac + ;; *darwin*) - printf "%s\n" "#define PJ_DARWINOS 1" >>confdefs.h + printf "%s\n" "#define PJ_DARWINOS 1" >>confdefs.h - ac_target_arch=$ARCH_VAL - ;; + ac_target_arch=$ARCH_VAL + ;; *linux*) - printf "%s\n" "#define PJ_LINUX 1" >>confdefs.h + printf "%s\n" "#define PJ_LINUX 1" >>confdefs.h - ;; + ;; *bsd*) - printf "%s\n" "#define PJ_BSD 1" >>confdefs.h + printf "%s\n" "#define PJ_BSD 1" >>confdefs.h - ;; + ;; *rtems*) - printf "%s\n" "#define PJ_RTEMS 1" >>confdefs.h + printf "%s\n" "#define PJ_RTEMS 1" >>confdefs.h - ;; + ;; *sunos* | *solaris* ) - printf "%s\n" "#define PJ_SUNOS 1" >>confdefs.h + printf "%s\n" "#define PJ_SUNOS 1" >>confdefs.h - ;; + ;; *) - ;; + ;; esac # Check whether --enable-floating-point was given. if test ${enable_floating_point+y} then : - enableval=$enable_floating_point; if test "$enable_floating_point" = "no"; then - printf "%s\n" "#define PJ_HAS_FLOATING_POINT 0" >>confdefs.h + enableval=$enable_floating_point; + if test "$enable_floating_point" = "no"; then + printf "%s\n" "#define PJ_HAS_FLOATING_POINT 0" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if floating point is disabled... yes" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if floating point is disabled... yes" >&5 printf "%s\n" "Checking if floating point is disabled... yes" >&6; } - fi + fi + else $as_nop - printf "%s\n" "#define PJ_HAS_FLOATING_POINT 1" >>confdefs.h + printf "%s\n" "#define PJ_HAS_FLOATING_POINT 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if floating point is disabled... no" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if floating point is disabled... no" >&5 printf "%s\n" "Checking if floating point is disabled... no" >&6; } + fi @@ -5803,18 +5805,18 @@ fi case $target in *mingw* | *cygw* | *win32* | *w32* ) - printf "%s\n" "#define PJ_HAS_ERRNO_H 0" >>confdefs.h + printf "%s\n" "#define PJ_HAS_ERRNO_H 0" >>confdefs.h - ;; + ;; *) - ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" + ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" if test "x$ac_cv_header_errno_h" = xyes then : printf "%s\n" "#define PJ_HAS_ERRNO_H 1" >>confdefs.h fi - ;; + ;; esac ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" @@ -5866,15 +5868,17 @@ then : fi -ac_fn_c_check_header_compile "$LINENO" "netinet/ip.h" "ac_cv_header_netinet_ip_h" "#if PJ_HAS_SYS_TYPES_H - # include - #endif - #if PJ_HAS_NETINET_IN_SYSTM_H - # include - #endif - #if PJ_HAS_NETINET_IN_H - # include - #endif +ac_fn_c_check_header_compile "$LINENO" "netinet/ip.h" "ac_cv_header_netinet_ip_h" " + #if PJ_HAS_SYS_TYPES_H + # include + #endif + #if PJ_HAS_NETINET_IN_SYSTM_H + # include + #endif + #if PJ_HAS_NETINET_IN_H + # include + #endif + " if test "x$ac_cv_header_netinet_ip_h" = xyes @@ -5883,6 +5887,7 @@ then : fi + ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_tcp_h" = xyes then : @@ -6063,11 +6068,13 @@ then : fi -ac_fn_c_check_header_compile "$LINENO" "mswsock.h" "ac_cv_header_mswsock_h" "#if PJ_HAS_WINSOCK2_H - # include - #elif PJ_HAS_WINSOCK_H - # include - #endif +ac_fn_c_check_header_compile "$LINENO" "mswsock.h" "ac_cv_header_mswsock_h" " + #if PJ_HAS_WINSOCK2_H + # include + #elif PJ_HAS_WINSOCK_H + # include + #endif + " if test "x$ac_cv_header_mswsock_h" = xyes @@ -6076,6 +6083,7 @@ then : fi + ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" if test "x$ac_cv_header_ws2tcpip_h" = xyes then : @@ -6089,13 +6097,14 @@ then : ac_has_uuid_h=1 fi -ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#if PJ_HAS_SYS_TYPES_H - # include - #endif - #if PJ_HAS_SYS_SOCKET_H +ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" " + #if PJ_HAS_SYS_TYPES_H + # include + #endif + #if PJ_HAS_SYS_SOCKET_H + # include + #endif - # include - #endif " if test "x$ac_cv_header_net_if_h" = xyes @@ -6106,15 +6115,15 @@ fi case $target in - *android*) - ac_fn_c_check_header_compile "$LINENO" "linux/android_alarm.h" "ac_cv_header_linux_android_alarm_h" "$ac_includes_default" + *android*) + ac_fn_c_check_header_compile "$LINENO" "linux/android_alarm.h" "ac_cv_header_linux_android_alarm_h" "$ac_includes_default" if test "x$ac_cv_header_linux_android_alarm_h" = xyes then : printf "%s\n" "#define PJ_HAS_ANDROID_ALARM_H 1" >>confdefs.h fi - ;; + ;; esac ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r" @@ -6159,9 +6168,11 @@ printf "%s\n" "#define PJ_ATOMIC_VALUE_TYPE long" >>confdefs.h printf %s "checking if inet_aton() is available... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include - #include + + + #include + #include + #include int main (void) { @@ -6169,16 +6180,20 @@ inet_aton(0, 0); ; return 0; } + _ACEOF if ac_fn_c_try_compile "$LINENO" then : - printf "%s\n" "#define PJ_SOCK_HAS_INET_ATON 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + printf "%s\n" "#define PJ_SOCK_HAS_INET_ATON 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } + else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } + fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -6186,9 +6201,11 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext printf %s "checking if inet_pton() is available... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include - #include + + + #include + #include + #include int main (void) { @@ -6196,16 +6213,20 @@ inet_pton(0, 0, 0); ; return 0; } + _ACEOF if ac_fn_c_try_compile "$LINENO" then : - printf "%s\n" "#define PJ_SOCK_HAS_INET_PTON 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + printf "%s\n" "#define PJ_SOCK_HAS_INET_PTON 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } + else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } + fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -6213,9 +6234,11 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext printf %s "checking if inet_ntop() is available... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include - #include + + + #include + #include + #include int main (void) { @@ -6223,16 +6246,20 @@ inet_ntop(0, 0, 0, 0); ; return 0; } + _ACEOF if ac_fn_c_try_compile "$LINENO" then : - printf "%s\n" "#define PJ_SOCK_HAS_INET_NTOP 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + printf "%s\n" "#define PJ_SOCK_HAS_INET_NTOP 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } + else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } + fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -6240,9 +6267,11 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext printf %s "checking if getaddrinfo() is available... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include - #include + + + #include + #include + #include int main (void) { @@ -6250,16 +6279,20 @@ getaddrinfo(0, 0, 0, 0); ; return 0; } + _ACEOF if ac_fn_c_try_compile "$LINENO" then : - printf "%s\n" "#define PJ_SOCK_HAS_GETADDRINFO 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + printf "%s\n" "#define PJ_SOCK_HAS_GETADDRINFO 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } + else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } + fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -6267,8 +6300,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext printf %s "checking if socketpair() is available... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include + + + #include + #include int main (void) { @@ -6276,16 +6311,20 @@ socketpair(0, 0, 0, 0); ; return 0; } + _ACEOF if ac_fn_c_try_compile "$LINENO" then : - printf "%s\n" "#define PJ_SOCK_HAS_SOCKETPAIR 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + printf "%s\n" "#define PJ_SOCK_HAS_SOCKETPAIR 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } + else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } + fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -6293,10 +6332,12 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext printf %s "checking if sockaddr_in has sin_len member... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include - #include - #include + + + #include + #include + #include + #include int main (void) { @@ -6304,16 +6345,20 @@ struct sockaddr_in a; a.sin_len=0; ; return 0; } + _ACEOF if ac_fn_c_try_compile "$LINENO" then : - printf "%s\n" "#define PJ_SOCKADDR_HAS_LEN 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + printf "%s\n" "#define PJ_SOCKADDR_HAS_LEN 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } + else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } + fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -6321,8 +6366,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext printf %s "checking if socklen_t is available... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include + + + #include + #include int main (void) { @@ -6330,16 +6377,20 @@ socklen_t xxx = 0; ; return 0; } + _ACEOF if ac_fn_c_try_compile "$LINENO" then : - printf "%s\n" "#define PJ_HAS_SOCKLEN_T 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + printf "%s\n" "#define PJ_HAS_SOCKLEN_T 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } + else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } + fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -6347,8 +6398,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext printf %s "checking if IPV6_V6ONLY is available... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include + + + #include + #include int main (void) { @@ -6356,16 +6409,20 @@ int opt = IPV6_V6ONLY; ; return 0; } + _ACEOF if ac_fn_c_try_compile "$LINENO" then : - printf "%s\n" "#define PJ_SOCK_HAS_IPV6_V6ONLY 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + printf "%s\n" "#define PJ_SOCK_HAS_IPV6_V6ONLY 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } + else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } + fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -6373,18 +6430,20 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext printf %s "checking if SO_ERROR is available... " >&6; } case $target in *mingw* | *cygw* | *win32* | *w32* ) - printf "%s\n" "#define PJ_HAS_SO_ERROR 1" >>confdefs.h + printf "%s\n" "#define PJ_HAS_SO_ERROR 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } - ;; + ;; *) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include - #include - #include + + + #include + #include + #include + #include int main (void) { @@ -6392,19 +6451,23 @@ int i=SO_ERROR; ; return 0; } + _ACEOF if ac_fn_c_try_compile "$LINENO" then : - printf "%s\n" "#define PJ_HAS_SO_ERROR 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + printf "%s\n" "#define PJ_HAS_SO_ERROR 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } + else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } + fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; + ;; esac @@ -6412,7 +6475,8 @@ esac printf %s "checking if pthread_rwlock_t is available... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + + #include int main (void) { @@ -6420,20 +6484,26 @@ pthread_rwlock_t *x; ; return 0; } + _ACEOF if ac_fn_c_try_compile "$LINENO" then : - printf "%s\n" "#define PJ_EMULATE_RWMUTEX 0" >>confdefs.h - ac_rwmutex="yes" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + printf "%s\n" "#define PJ_EMULATE_RWMUTEX 0" >>confdefs.h + + ac_rwmutex="yes" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } + else $as_nop - printf "%s\n" "#define PJ_EMULATE_RWMUTEX 1" >>confdefs.h - ac_rwmutex="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + printf "%s\n" "#define PJ_EMULATE_RWMUTEX 1" >>confdefs.h + + ac_rwmutex="no" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } + + fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -6442,8 +6512,10 @@ if test "$ac_rwmutex" = "no"; then printf %s "checking if pthread_rwlock_t is available with _POSIX_READER_WRITER_LOCKS... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#define _POSIX_READER_WRITER_LOCKS - #include + + + #define _POSIX_READER_WRITER_LOCKS + #include int main (void) { @@ -6451,19 +6523,25 @@ pthread_rwlock_t *x; ; return 0; } + _ACEOF if ac_fn_c_try_compile "$LINENO" then : - printf "%s\n" "#define PJ_EMULATE_RWMUTEX 0" >>confdefs.h - CFLAGS="$CFLAGS -D_POSIX_THREADS -D_POSIX_READER_WRITER_LOCKS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + printf "%s\n" "#define PJ_EMULATE_RWMUTEX 0" >>confdefs.h + + CFLAGS="$CFLAGS -D_POSIX_THREADS -D_POSIX_READER_WRITER_LOCKS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } + else $as_nop - printf "%s\n" "#define PJ_EMULATE_RWMUTEX 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + printf "%s\n" "#define PJ_EMULATE_RWMUTEX 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } + + fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -6472,7 +6550,8 @@ fi printf %s "checking if pthread_mutexattr_settype() is available... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + + #include int main (void) { @@ -6480,16 +6559,20 @@ pthread_mutexattr_settype(0,PTHREAD_MUTEX_FAST_NP); ; return 0; } + _ACEOF if ac_fn_c_try_compile "$LINENO" then : - printf "%s\n" "#define PJ_HAS_PTHREAD_MUTEXATTR_SETTYPE 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + printf "%s\n" "#define PJ_HAS_PTHREAD_MUTEXATTR_SETTYPE 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } + else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } + fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -6497,25 +6580,29 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext printf %s "checking if pthread_mutexattr_t has recursive member... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + + #include int main (void) { -pthread_mutexattr_t attr; - attr.recursive=1; +pthread_mutexattr_t attr; attr.recursive=1; ; return 0; } + _ACEOF if ac_fn_c_try_compile "$LINENO" then : - printf "%s\n" "#define PJ_PTHREAD_MUTEXATTR_T_HAS_RECURSIVE 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + printf "%s\n" "#define PJ_PTHREAD_MUTEXATTR_T_HAS_RECURSIVE 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } + else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } + fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -6528,65 +6615,69 @@ ac_os_objs=ioqueue_select.o ac_linux_poll=select case $target in - *darwin* | *bsd*) - # Check whether --enable-kqueue was given. + *darwin* | *bsd*) + # Check whether --enable-kqueue was given. if test ${enable_kqueue+y} then : enableval=$enable_kqueue; - if test "$enable_kqueue" = "yes"; then - ac_os_objs=ioqueue_kqueue.o - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: kqueue()" >&5 + if test "$enable_kqueue" = "yes"; then + ac_os_objs=ioqueue_kqueue.o + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: kqueue()" >&5 printf "%s\n" "kqueue()" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: select()" >&5 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: select()" >&5 printf "%s\n" "select()" >&6; } - fi + fi else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: select()" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: select()" >&5 printf "%s\n" "select()" >&6; } + fi - ;; - *) - # Check whether --enable-epoll was given. + ;; + *) + # Check whether --enable-epoll was given. if test ${enable_epoll+y} then : enableval=$enable_epoll; - if test "$enable_epoll" = "yes"; then - ac_os_objs=ioqueue_epoll.o - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /dev/epoll" >&5 + if test "$enable_epoll" = "yes"; then + ac_os_objs=ioqueue_epoll.o + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /dev/epoll" >&5 printf "%s\n" "/dev/epoll" >&6; } - printf "%s\n" "#define PJ_HAS_LINUX_EPOLL 1" >>confdefs.h + printf "%s\n" "#define PJ_HAS_LINUX_EPOLL 1" >>confdefs.h - ac_linux_poll=epoll - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: select()" >&5 + ac_linux_poll=epoll + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: select()" >&5 printf "%s\n" "select()" >&6; } - fi + fi else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: select()" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: select()" >&5 printf "%s\n" "select()" >&6; } + fi - ;; + ;; esac # Check whether --enable-shared was given. if test ${enable_shared+y} then : - enableval=$enable_shared; if test "$enable_shared" = "yes"; then - ac_shared_libraries=1 - CFLAGS="$CFLAGS -fPIC" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Building shared libraries... yes" >&5 + enableval=$enable_shared; + if test "$enable_shared" = "yes"; then + ac_shared_libraries=1 + CFLAGS="$CFLAGS -fPIC" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Building shared libraries... yes" >&5 printf "%s\n" "Building shared libraries... yes" >&6; } - fi + fi + else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Building shared libraries... no" >&5 printf "%s\n" "Building shared libraries... no" >&6; } @@ -6598,11 +6689,13 @@ fi # Check whether --enable-pjsua2 was given. if test ${enable_pjsua2+y} then : - enableval=$enable_pjsua2; if test "$enable_pjsua2" = "no"; then - ac_no_pjsua2=1 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Building pjsua2 library and application... no" >&5 + enableval=$enable_pjsua2; + if test "$enable_pjsua2" = "no"; then + ac_no_pjsua2=1 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Building pjsua2 library and application... no" >&5 printf "%s\n" "Building pjsua2 library and application... no" >&6; } - fi + fi + else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Building pjsua2 library and application... yes" >&5 printf "%s\n" "Building pjsua2 library and application... yes" >&6; } @@ -6612,59 +6705,61 @@ fi case $target in - *mingw* | *cygw* | *win32* | *w32* ) - ac_os_objs="$ac_os_objs file_access_win32.o file_io_win32.o os_core_win32.o os_error_win32.o os_time_win32.o os_timestamp_win32.o guid_win32.o sock_qos_bsd.o unicode_win32.o" - ;; - *) - ac_os_objs="$ac_os_objs file_access_unistd.o file_io_ansi.o os_core_unix.o os_error_unix.o os_time_unix.o os_timestamp_posix.o" - case $target in - *-apple-darwin_ios*) - ac_os_objs="$ac_os_objs os_info_iphone.o os_core_darwin.o" - ;; - *darwin*) - ac_os_objs="$ac_os_objs os_core_darwin.o" - ;; - esac - # QoS - case $target in - *darwin*) - ac_os_objs="$ac_os_objs sock_qos_darwin.o sock_qos_bsd.o" - ;; - *) - ac_os_objs="$ac_os_objs sock_qos_bsd.o" - ;; - esac - # SSL - case $target in - *darwin*) - ac_os_objs="$ac_os_objs ssl_sock_apple.o" - ;; - esac - # UUID - case $target in - *android*) - ac_os_objs="$ac_os_objs guid_android.o" - ;; - *darwin*) - ac_os_objs="$ac_os_objs guid_darwin.o" - ;; - *bsd*) - ac_os_objs="$ac_os_objs guid_bsd.o" - ;; - *) - if test "$ac_has_uuid_lib" = "1" -a "$ac_has_uuid_h" = "1"; then - ac_os_objs="$ac_os_objs guid_uuid.o" - else - ac_os_objs="$ac_os_objs guid_simple.o" - fi - ;; - esac - ;; + *mingw* | *cygw* | *win32* | *w32* ) + ac_os_objs="$ac_os_objs file_access_win32.o file_io_win32.o os_core_win32.o os_error_win32.o os_time_win32.o os_timestamp_win32.o guid_win32.o sock_qos_bsd.o unicode_win32.o" + ;; + *) + ac_os_objs="$ac_os_objs file_access_unistd.o file_io_ansi.o os_core_unix.o os_error_unix.o os_time_unix.o os_timestamp_posix.o" + case $target in + *-apple-darwin_ios*) + ac_os_objs="$ac_os_objs os_info_iphone.o os_core_darwin.o" + ;; + *darwin*) + ac_os_objs="$ac_os_objs os_core_darwin.o" + ;; + esac + + # QoS + case $target in + *darwin*) + ac_os_objs="$ac_os_objs sock_qos_darwin.o sock_qos_bsd.o" + ;; + *) + ac_os_objs="$ac_os_objs sock_qos_bsd.o" + ;; + esac + + # SSL + case $target in + *darwin*) + ac_os_objs="$ac_os_objs ssl_sock_apple.o" + ;; + esac + + # UUID + case $target in + *android*) + ac_os_objs="$ac_os_objs guid_android.o" + ;; + *darwin*) + ac_os_objs="$ac_os_objs guid_darwin.o" + ;; + *bsd*) + ac_os_objs="$ac_os_objs guid_bsd.o" + ;; + *) + if test "$ac_has_uuid_lib" = "1" -a "$ac_has_uuid_h" = "1"; then + ac_os_objs="$ac_os_objs guid_uuid.o" + else + ac_os_objs="$ac_os_objs guid_simple.o" + fi + ;; + esac + ;; esac - # Check whether --with-upnp was given. if test ${with_upnp+y} then : @@ -6683,64 +6778,68 @@ fi if test ${enable_upnp+y} then : enableval=$enable_upnp; - if test "$enable_upnp" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if UPnP is disabled... yes" >&5 + if test "$enable_upnp" = "no"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if UPnP is disabled... yes" >&5 printf "%s\n" "Checking if UPnP is disabled... yes" >&6; } - fi + fi else $as_nop - if test "x$with_upnp" != "xno" -a "x$with_upnp" != "x"; then - UPNP_PREFIX=$with_upnp - UPNP_CFLAGS="-I$UPNP_PREFIX/upnp/inc -I$UPNP_PREFIX/ixml/inc" - UPNP_LDFLAGS="-L$UPNP_PREFIX/upnp/.libs -L$UPNP_PREFIX/imxl/.libs" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using UPnP prefix... $with_upnp" >&5 + if test "x$with_upnp" != "xno" -a "x$with_upnp" != "x"; then + UPNP_PREFIX=$with_upnp + UPNP_CFLAGS="-I$UPNP_PREFIX/upnp/inc -I$UPNP_PREFIX/ixml/inc" + UPNP_LDFLAGS="-L$UPNP_PREFIX/upnp/.libs -L$UPNP_PREFIX/imxl/.libs" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using UPnP prefix... $with_upnp" >&5 printf "%s\n" "Using UPnP prefix... $with_upnp" >&6; } - else - UPNP_CFLAGS="" - UPNP_LDFLAGS="" - fi + else + UPNP_CFLAGS="" + UPNP_LDFLAGS="" + fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking UPnP usability" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking UPnP usability" >&5 printf %s "checking UPnP usability... " >&6; } - UPNP_LIBS="-lupnp -lixml" + UPNP_LIBS="-lupnp -lixml" - SAVED_LIBS="$LIBS" - SAVED_LDFLAGS="$LDFLAGS" - SAVED_CFLAGS="$CFLAGS" + SAVED_LIBS="$LIBS" + SAVED_LDFLAGS="$LDFLAGS" + SAVED_CFLAGS="$CFLAGS" - LIBS="$UPNP_LIBS $LIBS" - LDFLAGS="$UPNP_LDFLAGS $LDFLAGS" - CFLAGS="$UPNP_CFLAGS $CFLAGS" + LIBS="$UPNP_LIBS $LIBS" + LDFLAGS="$UPNP_LDFLAGS $LDFLAGS" + CFLAGS="$UPNP_CFLAGS $CFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + + + #include int main (void) { UpnpInit2(NULL, 0); - ; return 0; } + _ACEOF if ac_fn_c_try_link "$LINENO" then : - CFLAGS="$CFLAGS -DPJNATH_HAS_UPNP=1 $UPNP_CFLAGS" - LDFLAGS="$LDFLAGS $UPNP_LDFLAGS $UPNP_LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + + CFLAGS="$CFLAGS -DPJNATH_HAS_UPNP=1 $UPNP_CFLAGS" + LDFLAGS="$LDFLAGS $UPNP_LDFLAGS $UPNP_LIBS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else $as_nop - LIBS="$SAVED_LIBS" - LDFLAGS="$SAVED_LDFLAGS" - CFLAGS="$SAVED_CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + LIBS="$SAVED_LIBS" + LDFLAGS="$SAVED_LDFLAGS" + CFLAGS="$SAVED_CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } + fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -6757,15 +6856,16 @@ ac_external_speex=0 if test ${with_external_speex+y} then : withval=$with_external_speex; - if test "x$with_external_speex" != "xno"; then - # Test Speex installation - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if external Speex devkit is installed" >&5 + if test "x$with_external_speex" != "xno"; then + # Test Speex installation + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if external Speex devkit is installed" >&5 printf %s "checking if external Speex devkit is installed... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include + + #include + #include int main (void) { @@ -6773,20 +6873,25 @@ speex_echo_state_init(0, 0); speex_encoder_init(0); ; return 0; } + _ACEOF if ac_fn_c_try_compile "$LINENO" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes!!" >&5 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes!!" >&5 printf "%s\n" "yes!!" >&6; } - printf "%s\n" "#define PJMEDIA_EXTERNAL_SPEEX_CODEC 1" >>confdefs.h + printf "%s\n" "#define PJMEDIA_EXTERNAL_SPEEX_CODEC 1" >>confdefs.h - ac_external_speex="1" + ac_external_speex="1" else $as_nop - as_fn_error $? "Unable to use external Speex library. If Speex development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths" "$LINENO" 5 + + as_fn_error $? "Unable to use external Speex library. If Speex development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths" "$LINENO" 5 + + fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - fi + fi fi @@ -6799,13 +6904,14 @@ ac_external_gsm=0 if test ${with_external_gsm+y} then : withval=$with_external_gsm; - if test "x$with_external_gsm" != "xno"; then - # Test GSM library installation - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if external GSM devkit is installed as gsm/gsm.h" >&5 + if test "x$with_external_gsm" != "xno"; then + # Test GSM library installation + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if external GSM devkit is installed as gsm/gsm.h" >&5 printf %s "checking if external GSM devkit is installed as gsm/gsm.h... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + + #include int main (void) { @@ -6813,26 +6919,30 @@ gsm_create(); ; return 0; } + _ACEOF if ac_fn_c_try_compile "$LINENO" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes!!" >&5 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes!!" >&5 printf "%s\n" "yes!!" >&6; } - printf "%s\n" "#define PJMEDIA_EXTERNAL_GSM_CODEC 1" >>confdefs.h + printf "%s\n" "#define PJMEDIA_EXTERNAL_GSM_CODEC 1" >>confdefs.h - printf "%s\n" "#define PJMEDIA_EXTERNAL_GSM_GSM_H 1" >>confdefs.h + printf "%s\n" "#define PJMEDIA_EXTERNAL_GSM_GSM_H 1" >>confdefs.h - ac_external_gsm="1" + ac_external_gsm="1" else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if external GSM devkit is installed as gsm.h" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if external GSM devkit is installed as gsm.h" >&5 printf %s "checking if external GSM devkit is installed as gsm.h... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + + + #include int main (void) { @@ -6840,19 +6950,22 @@ gsm_create(); ; return 0; } + _ACEOF if ac_fn_c_try_compile "$LINENO" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes!!" >&5 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes!!" >&5 printf "%s\n" "yes!!" >&6; } - printf "%s\n" "#define PJMEDIA_EXTERNAL_GSM_CODEC 1" >>confdefs.h + printf "%s\n" "#define PJMEDIA_EXTERNAL_GSM_CODEC 1" >>confdefs.h - printf "%s\n" "#define PJMEDIA_EXTERNAL_GSM_H 1" >>confdefs.h + printf "%s\n" "#define PJMEDIA_EXTERNAL_GSM_H 1" >>confdefs.h - ac_external_gsm="1" + ac_external_gsm="1" else $as_nop - as_fn_error $? "Unable to use external GSM library. If GSM development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths" "$LINENO" 5 + + as_fn_error $? "Unable to use external GSM library. If GSM development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths" "$LINENO" 5 fi @@ -6861,7 +6974,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - fi + fi fi @@ -6876,14 +6989,15 @@ ac_external_srtp=0 if test ${with_external_srtp+y} then : withval=$with_external_srtp; - if test "x$with_external_srtp" != "xno"; then - # Test SRTP installation - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if external SRTP devkit is installed" >&5 + if test "x$with_external_srtp" != "xno"; then + # Test SRTP installation + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if external SRTP devkit is installed" >&5 printf %s "checking if external SRTP devkit is installed... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + + #include int main (void) { @@ -6891,19 +7005,23 @@ srtp_init(); ; return 0; } + _ACEOF if ac_fn_c_try_compile "$LINENO" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes: version 2.x" >&5 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes: version 2.x" >&5 printf "%s\n" "yes: version 2.x" >&6; } - ac_external_srtp="2" - ac_external_srtp_lib="srtp2" + ac_external_srtp="2" + ac_external_srtp_lib="srtp2" else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + + #include int main (void) { @@ -6911,32 +7029,39 @@ srtp_init(); ; return 0; } + _ACEOF if ac_fn_c_try_compile "$LINENO" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes: version 1.x" >&5 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes: version 1.x" >&5 printf "%s\n" "yes: version 1.x" >&6; } - ac_external_srtp="1" - ac_external_srtp_lib="srtp" + ac_external_srtp="1" + ac_external_srtp_lib="srtp" else $as_nop - as_fn_error $? "Unable to use SRTP. If SRTP development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths" "$LINENO" 5 + + as_fn_error $? "Unable to use SRTP. If SRTP development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths" "$LINENO" 5 + + fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + + fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - fi + fi fi if test "x$ac_external_srtp" != "x0"; then - ac_srtp_deinit_present=0 + ac_srtp_deinit_present=0 - ac_srtp_shutdown_present=0 + ac_srtp_shutdown_present=0 - as_ac_Lib=`printf "%s\n" "ac_cv_lib_$ac_external_srtp_lib""_srtp_deinit" | $as_tr_sh` + as_ac_Lib=`printf "%s\n" "ac_cv_lib_$ac_external_srtp_lib""_srtp_deinit" | $as_tr_sh` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for srtp_deinit in -l$ac_external_srtp_lib" >&5 printf %s "checking for srtp_deinit in -l$ac_external_srtp_lib... " >&6; } if eval test \${$as_ac_Lib+y} @@ -6978,8 +7103,8 @@ then : ac_srtp_deinit_present=1 fi - if test "x$ac_srtp_deinit_present" != "x1"; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_$ac_external_srtp_lib""_srtp_shutdown" | $as_tr_sh` + if test "x$ac_srtp_deinit_present" != "x1"; then + as_ac_Lib=`printf "%s\n" "ac_cv_lib_$ac_external_srtp_lib""_srtp_shutdown" | $as_tr_sh` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for srtp_shutdown in -l$ac_external_srtp_lib" >&5 printf %s "checking for srtp_shutdown in -l$ac_external_srtp_lib... " >&6; } if eval test \${$as_ac_Lib+y} @@ -7021,10 +7146,9 @@ then : ac_srtp_shutdown_present=1 fi - fi + fi fi - ac_external_yuv=0 @@ -7032,13 +7156,15 @@ ac_external_yuv=0 if test ${with_external_yuv+y} then : withval=$with_external_yuv; - if test "x$with_external_yuv" != "xno"; then - # Test libyuv installation - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if external libyuv devkit is installed" >&5 + if test "x$with_external_yuv" != "xno"; then + # Test libyuv installation + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if external libyuv devkit is installed" >&5 printf %s "checking if external libyuv devkit is installed... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + + + #include int main (void) { @@ -7046,18 +7172,23 @@ RGB24ToI420(0,0,0,0,0,0,0,0,0,0); ; return 0; } + _ACEOF if ac_fn_c_try_compile "$LINENO" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes!!" >&5 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes!!" >&5 printf "%s\n" "yes!!" >&6; } - ac_external_yuv="1" + ac_external_yuv="1" else $as_nop - as_fn_error $? "Unable to use external libyuv. If libyuv development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths" "$LINENO" 5 + + as_fn_error $? "Unable to use external libyuv. If libyuv development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths" "$LINENO" 5 + + fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - fi + fi fi @@ -7071,15 +7202,16 @@ ac_external_webrtc=0 if test ${with_external_webrtc+y} then : withval=$with_external_webrtc; - if test "x$with_external_webrtc" != "xno"; then - # Test webrtc installation - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if external webrtc devkit is installed" >&5 + if test "x$with_external_webrtc" != "xno"; then + # Test webrtc installation + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if external webrtc devkit is installed" >&5 printf %s "checking if external webrtc devkit is installed... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include + + #include + #include int main (void) { @@ -7087,18 +7219,23 @@ WebRtcAec_Create(); ; return 0; } + _ACEOF if ac_fn_c_try_compile "$LINENO" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes!!" >&5 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes!!" >&5 printf "%s\n" "yes!!" >&6; } - ac_external_webrtc="1" + ac_external_webrtc="1" else $as_nop - as_fn_error $? "Unable to use external webrtc. If webrtc development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths" "$LINENO" 5 + + as_fn_error $? "Unable to use external webrtc. If webrtc development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths" "$LINENO" 5 + + fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - fi + fi fi @@ -7112,14 +7249,15 @@ ac_external_webrtc_aec3=0 if test ${with_external_webrtc_aec3+y} then : withval=$with_external_webrtc_aec3; - if test "x$with_external_webrtc_aec3" != "xno"; then - # Test webrtc AEC3 installation - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if external webrtc AEC3 is installed" >&5 + if test "x$with_external_webrtc_aec3" != "xno"; then + # Test webrtc AEC3 installation + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if external webrtc AEC3 is installed" >&5 printf %s "checking if external webrtc AEC3 is installed... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include "modules/audio_processing/aec3/echo_canceller3.h" + + #include "modules/audio_processing/aec3/echo_canceller3.h" int main (void) { @@ -7127,18 +7265,23 @@ EchoCanceller3 ec(EchoCanceller3Config(), 16000, 1, 1); ; return 0; } + _ACEOF if ac_fn_c_try_compile "$LINENO" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes!!" >&5 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes!!" >&5 printf "%s\n" "yes!!" >&6; } - ac_external_webrtc_aec3="1" + ac_external_webrtc_aec3="1" else $as_nop - as_fn_error $? "Unable to use external webrtc AEC3. If webrtc development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths" "$LINENO" 5 + + as_fn_error $? "Unable to use external webrtc AEC3. If webrtc development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths" "$LINENO" 5 + + fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - fi + fi fi @@ -7150,11 +7293,13 @@ ac_pjmedia_resample=libresample # Check whether --enable-resample was given. if test ${enable_resample+y} then : - enableval=$enable_resample; if test "$enable_resample" = "no"; then - ac_pjmedia_resample=none - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if resampling is disabled...yes" >&5 + enableval=$enable_resample; + if test "$enable_resample" = "no"; then + ac_pjmedia_resample=none + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if resampling is disabled...yes" >&5 printf "%s\n" "Checking if resampling is disabled...yes" >&6; } - fi + fi + fi @@ -7163,11 +7308,13 @@ fi # Check whether --enable-sound was given. if test ${enable_sound+y} then : - enableval=$enable_sound; if test "$enable_sound" = "no"; then - ac_pjmedia_snd=null - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if sound is disabled... yes" >&5 + enableval=$enable_sound; + if test "$enable_sound" = "no"; then + ac_pjmedia_snd=null + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if sound is disabled... yes" >&5 printf "%s\n" "Checking if sound is disabled... yes" >&6; } - fi + fi + fi @@ -7179,14 +7326,15 @@ ac_external_pa=0 if test ${with_external_pa+y} then : withval=$with_external_pa; - if test "x$with_external_pa" != "xno"; then - # Test PortAudio installation - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if external PortAudio devkit is installed" >&5 + if test "x$with_external_pa" != "xno"; then + # Test PortAudio installation + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if external PortAudio devkit is installed" >&5 printf %s "checking if external PortAudio devkit is installed... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + + #include int main (void) { @@ -7194,18 +7342,23 @@ Pa_Initialize(); ; return 0; } + _ACEOF if ac_fn_c_try_compile "$LINENO" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes!!" >&5 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes!!" >&5 printf "%s\n" "yes!!" >&6; } - ac_external_pa="1" + ac_external_pa="1" else $as_nop - as_fn_error $? "Unable to use PortAudio. If PortAudio development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths" "$LINENO" 5 + + as_fn_error $? "Unable to use PortAudio. If PortAudio development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths" "$LINENO" 5 + + fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - fi + fi fi @@ -7232,87 +7385,90 @@ fi if test "x$ac_cv_c_bigendian" = "xyes"; then - ac_pa_cflags="$ac_pa_cflags -DPA_BIG_ENDIAN" + ac_pa_cflags="$ac_pa_cflags -DPA_BIG_ENDIAN" else - ac_pa_cflags="$ac_pa_cflags -DPA_LITTLE_ENDIAN" + ac_pa_cflags="$ac_pa_cflags -DPA_LITTLE_ENDIAN" fi - # Check whether --with-oboe was given. if test ${with_oboe+y} then : withval=$with_oboe; - if test "x$with_oboe" != "xno" -a "x$with_oboe" != "x"; then - OBOE_PREFIX=$with_oboe - OBOE_CFLAGS="-I$OBOE_PREFIX/prefab/modules/oboe/include" - OBOE_LDFLAGS="-L$OBOE_PREFIX/prefab/modules/oboe/libs/android.$TARGET_ABI" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using Oboe prefix... $with_oboe" >&5 + if test "x$with_oboe" != "xno" -a "x$with_oboe" != "x"; then + OBOE_PREFIX=$with_oboe + OBOE_CFLAGS="-I$OBOE_PREFIX/prefab/modules/oboe/include" + OBOE_LDFLAGS="-L$OBOE_PREFIX/prefab/modules/oboe/libs/android.$TARGET_ABI" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using Oboe prefix... $with_oboe" >&5 printf "%s\n" "Using Oboe prefix... $with_oboe" >&6; } - else - OBOE_CFLAGS="" - OBOE_LDFLAGS="" - fi + else + OBOE_CFLAGS="" + OBOE_LDFLAGS="" + fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Oboe usability" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Oboe usability" >&5 printf %s "checking Oboe usability... " >&6; } - OBOE_LIBS="-loboe -lOpenSLES -llog" + OBOE_LIBS="-loboe -lOpenSLES -llog" - SAVED_LIBS="$LIBS" - SAVED_LDFLAGS="$LDFLAGS" - SAVED_CXXFLAGS="$CXXFLAGS" + SAVED_LIBS="$LIBS" + SAVED_LDFLAGS="$LDFLAGS" + SAVED_CXXFLAGS="$CXXFLAGS" - LIBS="$OBOE_LIBS $LIBS" - LDFLAGS="$OBOE_LDFLAGS $LDFLAGS" - CXXFLAGS="$OBOE_CFLAGS $CXXFLAGS" + LIBS="$OBOE_LIBS $LIBS" + LDFLAGS="$OBOE_LDFLAGS $LDFLAGS" + CXXFLAGS="$OBOE_CFLAGS $CXXFLAGS" - ac_ext=cpp + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + + + #include int main (void) { oboe::AudioStreamBuilder sb; sb.setDeviceId(0); - ; return 0; } + _ACEOF if ac_fn_cxx_try_link "$LINENO" then : - ac_oboe_cflags="-DPJMEDIA_AUDIO_DEV_HAS_OBOE=1 $OBOE_CFLAGS" - ac_oboe_ldflags="$OBOE_LDFLAGS $OBOE_LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + + ac_oboe_cflags="-DPJMEDIA_AUDIO_DEV_HAS_OBOE=1 $OBOE_CFLAGS" + ac_oboe_ldflags="$OBOE_LDFLAGS $OBOE_LIBS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else $as_nop - LIBS="$SAVED_LIBS" - LDFLAGS="$SAVED_LDFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + LIBS="$SAVED_LIBS" + LDFLAGS="$SAVED_LDFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } + fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - ac_ext=c + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - # Put back original CXXFLAGS as app won't needed it. - CXXFLAGS="$SAVED_CFLAGS" + # Put back original CXXFLAGS as app won't needed it. + CXXFLAGS="$SAVED_CFLAGS" fi @@ -7320,126 +7476,129 @@ fi if test "$enable_sound" = "no"; then - true; + true; else - case $target in - *android*) - if test "x$ac_oboe_cflags" != "x"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking sound device backend... Oboe" >&5 + case $target in + *android*) + if test "x$ac_oboe_cflags" != "x"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking sound device backend... Oboe" >&5 printf "%s\n" "Checking sound device backend... Oboe" >&6; } - else - LIBS="$LIBS -lOpenSLES" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking sound device backend... Android" >&5 + else + LIBS="$LIBS -lOpenSLES" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking sound device backend... Android" >&5 printf "%s\n" "Checking sound device backend... Android" >&6; } - fi - ;; - *-apple-darwin_ios*) - LIBS="$LIBS -framework CoreAudio -framework CoreFoundation -framework AudioToolbox -framework CFNetwork -framework UIKit -framework AVFoundation" - ac_pjmedia_audiodev_objs="coreaudio_dev.o" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking sound device backend... AudioUnit" >&5 + fi + ;; + *-apple-darwin_ios*) + LIBS="$LIBS -framework CoreAudio -framework CoreFoundation -framework AudioToolbox -framework CFNetwork -framework UIKit -framework AVFoundation" + ac_pjmedia_audiodev_objs="coreaudio_dev.o" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking sound device backend... AudioUnit" >&5 printf "%s\n" "Checking sound device backend... AudioUnit" >&6; } - ;; - *darwin*) - LIBS="$LIBS -framework CoreAudio -framework CoreServices -framework AudioUnit -framework AudioToolbox" - ac_pjmedia_audiodev_objs="coreaudio_dev.o" - if test "`uname -r`" = "6.8"; then - #ac_pa_cflags="$ac_pa_cflags -DPA_OLD_CORE_AUDIO -DMOSX_USE_NON_ATOMIC_FLAG_BITS" - #AC_MSG_RESULT([Setting additional PortAudio CFLAGS.. -DPA_OLD_CORE_AUDIO -DMOSX_USE_NON_ATOMIC_FLAG_BITS]) - #ac_pjmedia_snd=pa_old_darwinos - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking sound device backend... old coreaudio" >&5 + ;; + *darwin*) + LIBS="$LIBS -framework CoreAudio -framework CoreServices -framework AudioUnit -framework AudioToolbox" + ac_pjmedia_audiodev_objs="coreaudio_dev.o" + if test "`uname -r`" = "6.8"; then + #ac_pa_cflags="$ac_pa_cflags -DPA_OLD_CORE_AUDIO -DMOSX_USE_NON_ATOMIC_FLAG_BITS" + #AC_MSG_RESULT([Setting additional PortAudio CFLAGS.. -DPA_OLD_CORE_AUDIO -DMOSX_USE_NON_ATOMIC_FLAG_BITS]) + #ac_pjmedia_snd=pa_old_darwinos + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking sound device backend... old coreaudio" >&5 printf "%s\n" "Checking sound device backend... old coreaudio" >&6; } - else - ac_pjmedia_snd=coreaudio - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking sound device backend... coreaudio" >&5 + else + ac_pjmedia_snd=coreaudio + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking sound device backend... coreaudio" >&5 printf "%s\n" "Checking sound device backend... coreaudio" >&6; } - fi - ;; - *cygwin* | *mingw*) - ac_pjmedia_snd=win32 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking sound device backend... win32 sound" >&5 + fi + ;; + *cygwin* | *mingw*) + ac_pjmedia_snd=win32 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking sound device backend... win32 sound" >&5 printf "%s\n" "Checking sound device backend... win32 sound" >&6; } - ;; - *rtems*) - ac_pjmedia_snd=null - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking sound device backend... null sound" >&5 + ;; + *rtems*) + ac_pjmedia_snd=null + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking sound device backend... null sound" >&5 printf "%s\n" "Checking sound device backend... null sound" >&6; } - ;; - *) - if test "x$ac_external_pa" != "x1"; then - ac_fn_c_check_header_compile "$LINENO" "alsa/version.h" "ac_cv_header_alsa_version_h" "$ac_includes_default" + ;; + *) + if test "x$ac_external_pa" != "x1"; then + ac_fn_c_check_header_compile "$LINENO" "alsa/version.h" "ac_cv_header_alsa_version_h" "$ac_includes_default" if test "x$ac_cv_header_alsa_version_h" = xyes then : LIBS="$LIBS -lasound" - ac_pjmedia_snd=alsa + ac_pjmedia_snd=alsa fi - if test "x$ac_pjmedia_snd" = "xalsa"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking sound device backend... alsa" >&5 + if test "x$ac_pjmedia_snd" = "xalsa"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking sound device backend... alsa" >&5 printf "%s\n" "Checking sound device backend... alsa" >&6; } - else - ac_pjmedia_snd=null - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking sound device backend... null sound" >&5 + else + ac_pjmedia_snd=null + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking sound device backend... null sound" >&5 printf "%s\n" "Checking sound device backend... null sound" >&6; } - fi - fi - ;; - esac + fi + fi + ;; + esac fi # Disable video on mingw by default (but respect --enable-video=yes) case $target in - *mingw*) - if test ! "$enable_video" = "yes"; then - enable_video="no" - fi - ;; + *mingw*) + if test ! "$enable_video" = "yes"; then + enable_video="no" + fi + ;; esac # Check whether --enable-video was given. if test ${enable_video+y} then : - enableval=$enable_video; if test "$enable_video" = "no"; then - #AC_DEFINE(PJMEDIA_HAS_VIDEO,0) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Video is disabled" >&5 + enableval=$enable_video; + if test "$enable_video" = "no"; then + #AC_DEFINE(PJMEDIA_HAS_VIDEO,0) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Video is disabled" >&5 printf "%s\n" "Video is disabled" >&6; } - enable_sdl="no" - enable_ffmpeg="no" - enable_v4l2="no" - enable_openh264="no" - enable_libyuv="no" - enable_vpx="no" - fi + enable_sdl="no" + enable_ffmpeg="no" + enable_v4l2="no" + enable_openh264="no" + enable_libyuv="no" + enable_vpx="no" + fi + fi case $target in - *android*) - LIBS="$LIBS -llog" - ;; - *-apple-darwin_ios*) - LIBS="$LIBS -framework UIKit" - ;; - *darwin*) - LIBS="$LIBS -framework Foundation -framework AppKit" - ;; + *android*) + LIBS="$LIBS -llog" + ;; + *-apple-darwin_ios*) + LIBS="$LIBS -framework UIKit" + ;; + *darwin*) + LIBS="$LIBS -framework Foundation -framework AppKit" + ;; esac if test "$enable_video" = "no"; then - true; + true; else - case $target in - *android*) - ac_pjmedia_video=android_os + case $target in + *android*) + ac_pjmedia_video=android_os - SAVED_LIBS="$LIBS" - LIBS="-lGLESv2 -lEGL -landroid -lc" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + SAVED_LIBS="$LIBS" + LIBS="-lGLESv2 -lEGL -landroid -lc" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + int main (void) { @@ -7447,49 +7606,52 @@ main (void) ; return 0; } + _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_pjmedia_video_has_android=yes else $as_nop ac_pjmedia_video_has_android=no + fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - LIBS="$SAVED_LIBS" - if test "$ac_pjmedia_video_has_android" = "yes"; then - ac_android_cflags="-DPJMEDIA_VIDEO_DEV_HAS_ANDROID_OPENGL=1" - LIBS="$LIBS -lGLESv2 -lEGL -landroid" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if OpenGL ES 2 is available... yes" >&5 + LIBS="$SAVED_LIBS" + if test "$ac_pjmedia_video_has_android" = "yes"; then + ac_android_cflags="-DPJMEDIA_VIDEO_DEV_HAS_ANDROID_OPENGL=1" + LIBS="$LIBS -lGLESv2 -lEGL -landroid" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if OpenGL ES 2 is available... yes" >&5 printf "%s\n" "Checking if OpenGL ES 2 is available... yes" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if OpenGL ES 2 is available... no" >&5 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if OpenGL ES 2 is available... no" >&5 printf "%s\n" "Checking if OpenGL ES 2 is available... no" >&6; } - fi - ac_android_cflags="$ac_android_cflags -DPJMEDIA_VIDEO_DEV_HAS_ANDROID=1" - ;; - *mingw*) - if test "$enable_video" = "yes"; then - ac_pjmedia_video=windows_os + fi + ac_android_cflags="$ac_android_cflags -DPJMEDIA_VIDEO_DEV_HAS_ANDROID=1" + ;; + *mingw*) + if test "$enable_video" = "yes"; then + ac_pjmedia_video=windows_os - ac_pjmedia_video_dev_has_dshow=yes + ac_pjmedia_video_dev_has_dshow=yes - ac_dshow_cflags="-DPJMEDIA_HAS_VIDEO=1 -DPJMEDIA_VIDEO_DEV_HAS_DSHOW=1" + ac_dshow_cflags="-DPJMEDIA_HAS_VIDEO=1 -DPJMEDIA_VIDEO_DEV_HAS_DSHOW=1" - ac_dshow_ldflags=" -lstdc++ -lquartz -lole32 -loleaut32 -lrpcrt4 -lwinmm -luuid -lmingwex -lstrmiids " - LIBS="$LIBS -lstdc++ -lquartz -lole32 -loleaut32 -lrpcrt4 -lwinmm -luuid -lmingwex -lstrmiids " - fi - ;; - *darwin*) - ac_pjmedia_video=darwin_os + ac_dshow_ldflags=" -lstdc++ -lquartz -lole32 -loleaut32 -lrpcrt4 -lwinmm -luuid -lmingwex -lstrmiids " + LIBS="$LIBS -lstdc++ -lquartz -lole32 -loleaut32 -lrpcrt4 -lwinmm -luuid -lmingwex -lstrmiids " + fi + ;; + *darwin*) + ac_pjmedia_video=darwin_os - SAVED_LIBS="$LIBS" - LIBS="-framework AVFoundation -framework CoreGraphics -framework QuartzCore -framework CoreVideo -framework CoreMedia" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + SAVED_LIBS="$LIBS" + + LIBS="-framework AVFoundation -framework CoreGraphics -framework QuartzCore -framework CoreVideo -framework CoreMedia" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -7505,11 +7667,13 @@ then : ac_pjmedia_video_has_darwin=yes else $as_nop ac_pjmedia_video_has_darwin=no + fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - LIBS="-framework VideoToolbox" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + LIBS="-framework VideoToolbox" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -7528,8 +7692,9 @@ else $as_nop fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - LIBS="-framework Metal" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + LIBS="-framework Metal" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -7548,8 +7713,9 @@ else $as_nop fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - LIBS="-framework OpenGLES" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + LIBS="-framework OpenGLES" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -7568,51 +7734,56 @@ else $as_nop fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - LIBS="$SAVED_LIBS" - if test "$ac_pjmedia_video_has_darwin" = "yes"; then - ac_darwin_cflags="-DPJMEDIA_VIDEO_DEV_HAS_DARWIN=1" - LIBS="$LIBS -framework AVFoundation -framework CoreGraphics -framework QuartzCore -framework CoreVideo -framework CoreMedia" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if AVFoundation framework is available... yes" >&5 + + LIBS="$SAVED_LIBS" + if test "$ac_pjmedia_video_has_darwin" = "yes"; then + ac_darwin_cflags="-DPJMEDIA_VIDEO_DEV_HAS_DARWIN=1" + LIBS="$LIBS -framework AVFoundation -framework CoreGraphics -framework QuartzCore -framework CoreVideo -framework CoreMedia" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if AVFoundation framework is available... yes" >&5 printf "%s\n" "Checking if AVFoundation framework is available... yes" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if AVFoundation framework is available... no" >&5 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if AVFoundation framework is available... no" >&5 printf "%s\n" "Checking if AVFoundation framework is available... no" >&6; } - fi - if test "$ac_pjmedia_video_has_metal" = "yes"; then - ac_darwin_cflags+=" -DPJMEDIA_VIDEO_DEV_HAS_METAL=1" - LIBS="$LIBS -framework Metal -framework MetalKit" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if Metal framework is available... yes" >&5 + fi + + if test "$ac_pjmedia_video_has_metal" = "yes"; then + ac_darwin_cflags+=" -DPJMEDIA_VIDEO_DEV_HAS_METAL=1" + LIBS="$LIBS -framework Metal -framework MetalKit" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if Metal framework is available... yes" >&5 printf "%s\n" "Checking if Metal framework is available... yes" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if Metal framework is available... no" >&5 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if Metal framework is available... no" >&5 printf "%s\n" "Checking if Metal framework is available... no" >&6; } - fi - if test "$ac_pjmedia_video_has_vtoolbox" = "yes"; then - #ac_darwin_cflags+=" -DPJMEDIA_HAS_VID_TOOLBOX_CODEC=1" - LIBS="$LIBS -framework VideoToolbox" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if VideoToolbox framework is available... yes" >&5 + fi + + if test "$ac_pjmedia_video_has_vtoolbox" = "yes"; then + #ac_darwin_cflags+=" -DPJMEDIA_HAS_VID_TOOLBOX_CODEC=1" + LIBS="$LIBS -framework VideoToolbox" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if VideoToolbox framework is available... yes" >&5 printf "%s\n" "Checking if VideoToolbox framework is available... yes" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if VideoToolbox framework is available... no" >&5 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if VideoToolbox framework is available... no" >&5 printf "%s\n" "Checking if VideoToolbox framework is available... no" >&6; } - fi - if test "$ac_pjmedia_video_has_ios_opengl" = "yes"; then - ac_darwin_cflags+=" -DPJMEDIA_VIDEO_DEV_HAS_IOS_OPENGL=1" - LIBS="$LIBS -framework OpenGLES" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if OpenGLES framework is available... yes" >&5 + fi + + if test "$ac_pjmedia_video_has_ios_opengl" = "yes"; then + ac_darwin_cflags+=" -DPJMEDIA_VIDEO_DEV_HAS_IOS_OPENGL=1" + LIBS="$LIBS -framework OpenGLES" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if OpenGLES framework is available... yes" >&5 printf "%s\n" "Checking if OpenGLES framework is available... yes" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if OpenGLES framework is available... no" >&5 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if OpenGLES framework is available... no" >&5 printf "%s\n" "Checking if OpenGLES framework is available... no" >&6; } - fi - if false; then - # QTKit is deprecated, see ticket #1931. - ac_pjmedia_video=mac_os + fi + + if false; then + # QTKit is deprecated, see ticket #1931. + ac_pjmedia_video=mac_os - SAVED_LIBS="$LIBS" - LIBS="-framework QTKit" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + SAVED_LIBS="$LIBS" + LIBS="-framework QTKit" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -7631,29 +7802,31 @@ else $as_nop fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - LIBS="$SAVED_LIBS" - if test "$ac_pjmedia_video_has_qt" = "yes"; then - ac_qt_cflags="-DPJMEDIA_VIDEO_DEV_HAS_QT=1" - LIBS="$LIBS -framework QTKit -framework QuartzCore -framework OpenGL" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if QTKit framework is available... yes" >&5 + LIBS="$SAVED_LIBS" + if test "$ac_pjmedia_video_has_qt" = "yes"; then + ac_qt_cflags="-DPJMEDIA_VIDEO_DEV_HAS_QT=1" + LIBS="$LIBS -framework QTKit -framework QuartzCore -framework OpenGL" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if QTKit framework is available... yes" >&5 printf "%s\n" "Checking if QTKit framework is available... yes" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if QTKit framework is available... no" >&5 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if QTKit framework is available... no" >&5 printf "%s\n" "Checking if QTKit framework is available... no" >&6; } - fi - fi - ;; - esac + fi + fi + ;; + esac fi # Check whether --enable-ext_sound was given. if test ${enable_ext_sound+y} then : - enableval=$enable_ext_sound; if test "$enable_ext_sound" = "yes"; then - ac_pjmedia_snd=external - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if external sound is set... yes" >&5 + enableval=$enable_ext_sound; + if test "$enable_ext_sound" = "yes"; then + ac_pjmedia_snd=external + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if external sound is set... yes" >&5 printf "%s\n" "Checking if external sound is set... yes" >&6; } - fi + fi + fi @@ -7662,14 +7835,17 @@ fi # Check whether --enable-small-filter was given. if test ${enable_small_filter+y} then : - enableval=$enable_small_filter; if test "$enable_small_filter" = "no"; then - ac_no_small_filter='-DPJMEDIA_HAS_SMALL_FILTER=0' - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if small filter is disabled... yes" >&5 + enableval=$enable_small_filter; + if test "$enable_small_filter" = "no"; then + ac_no_small_filter='-DPJMEDIA_HAS_SMALL_FILTER=0' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if small filter is disabled... yes" >&5 printf "%s\n" "Checking if small filter is disabled... yes" >&6; } - fi + fi + else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if small filter is disabled... no" >&5 printf "%s\n" "Checking if small filter is disabled... no" >&6; } + fi @@ -7677,14 +7853,17 @@ fi # Check whether --enable-large-filter was given. if test ${enable_large_filter+y} then : - enableval=$enable_large_filter; if test "$enable_large_filter" = "no"; then - ac_no_large_filter='-DPJMEDIA_HAS_LARGE_FILTER=0' - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if large filter is disabled... yes" >&5 + enableval=$enable_large_filter; + if test "$enable_large_filter" = "no"; then + ac_no_large_filter='-DPJMEDIA_HAS_LARGE_FILTER=0' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if large filter is disabled... yes" >&5 printf "%s\n" "Checking if large filter is disabled... yes" >&6; } - fi + fi + else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if large filter is disabled... no" >&5 printf "%s\n" "Checking if large filter is disabled... no" >&6; } + fi @@ -7692,14 +7871,17 @@ fi # Check whether --enable-speex-aec was given. if test ${enable_speex_aec+y} then : - enableval=$enable_speex_aec; if test "$enable_speex_aec" = "no"; then - ac_no_speex_aec='-DPJMEDIA_HAS_SPEEX_AEC=0' - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if Speex AEC is disabled...yes" >&5 + enableval=$enable_speex_aec; + if test "$enable_speex_aec" = "no"; then + ac_no_speex_aec='-DPJMEDIA_HAS_SPEEX_AEC=0' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if Speex AEC is disabled...yes" >&5 printf "%s\n" "Checking if Speex AEC is disabled...yes" >&6; } - fi + fi + else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if Speex AEC is disabled...no" >&5 printf "%s\n" "Checking if Speex AEC is disabled...no" >&6; } + fi @@ -7707,16 +7889,19 @@ fi # Check whether --enable-g711-codec was given. if test ${enable_g711_codec+y} then : - enableval=$enable_g711_codec; if test "$enable_g711_codec" = "no"; then - ac_no_g711_codec=1 - printf "%s\n" "#define PJMEDIA_HAS_G711_CODEC 0" >>confdefs.h + enableval=$enable_g711_codec; + if test "$enable_g711_codec" = "no"; then + ac_no_g711_codec=1 + printf "%s\n" "#define PJMEDIA_HAS_G711_CODEC 0" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if G.711 codec is disabled...yes" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if G.711 codec is disabled...yes" >&5 printf "%s\n" "Checking if G.711 codec is disabled...yes" >&6; } - fi + fi + else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if G.711 codec is disabled...no" >&5 printf "%s\n" "Checking if G.711 codec is disabled...no" >&6; } + fi @@ -7725,34 +7910,39 @@ fi # Check whether --enable-l16-codec was given. if test ${enable_l16_codec+y} then : - enableval=$enable_l16_codec; if test "$enable_l16_codec" = "no"; then - ac_no_l16_codec=1 - printf "%s\n" "#define PJMEDIA_HAS_L16_CODEC 0" >>confdefs.h + enableval=$enable_l16_codec; + if test "$enable_l16_codec" = "no"; then + ac_no_l16_codec=1 + printf "%s\n" "#define PJMEDIA_HAS_L16_CODEC 0" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if L16 codecs are disabled...yes" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if L16 codecs are disabled...yes" >&5 printf "%s\n" "Checking if L16 codecs are disabled...yes" >&6; } - fi + fi + else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if L16 codec is disabled...no" >&5 printf "%s\n" "Checking if L16 codec is disabled...no" >&6; } -fi +fi # Check whether --enable-gsm-codec was given. if test ${enable_gsm_codec+y} then : - enableval=$enable_gsm_codec; if test "$enable_gsm_codec" = "no"; then - ac_no_gsm_codec=1 - printf "%s\n" "#define PJMEDIA_HAS_GSM_CODEC 0" >>confdefs.h + enableval=$enable_gsm_codec; + if test "$enable_gsm_codec" = "no"; then + ac_no_gsm_codec=1 + printf "%s\n" "#define PJMEDIA_HAS_GSM_CODEC 0" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if GSM codec is disabled...yes" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if GSM codec is disabled...yes" >&5 printf "%s\n" "Checking if GSM codec is disabled...yes" >&6; } - fi + fi + else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if GSM codec is disabled...no" >&5 printf "%s\n" "Checking if GSM codec is disabled...no" >&6; } + fi @@ -7760,16 +7950,19 @@ fi # Check whether --enable-g722-codec was given. if test ${enable_g722_codec+y} then : - enableval=$enable_g722_codec; if test "$enable_g722_codec" = "no"; then - ac_no_g722_codec=1 - printf "%s\n" "#define PJMEDIA_HAS_G722_CODEC 0" >>confdefs.h + enableval=$enable_g722_codec; + if test "$enable_g722_codec" = "no"; then + ac_no_g722_codec=1 + printf "%s\n" "#define PJMEDIA_HAS_G722_CODEC 0" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if G.722 codec is disabled...yes" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if G.722 codec is disabled...yes" >&5 printf "%s\n" "Checking if G.722 codec is disabled...yes" >&6; } - fi + fi + else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if G.722 codec is disabled...no" >&5 printf "%s\n" "Checking if G.722 codec is disabled...no" >&6; } + fi @@ -7777,16 +7970,19 @@ fi # Check whether --enable-g7221-codec was given. if test ${enable_g7221_codec+y} then : - enableval=$enable_g7221_codec; if test "$enable_g7221_codec" = "no"; then - ac_no_g7221_codec=1 - printf "%s\n" "#define PJMEDIA_HAS_G7221_CODEC 0" >>confdefs.h + enableval=$enable_g7221_codec; + if test "$enable_g7221_codec" = "no"; then + ac_no_g7221_codec=1 + printf "%s\n" "#define PJMEDIA_HAS_G7221_CODEC 0" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if G.722.1 codec is disabled...yes" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if G.722.1 codec is disabled...yes" >&5 printf "%s\n" "Checking if G.722.1 codec is disabled...yes" >&6; } - fi + fi + else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if G.722.1 codec is disabled...no" >&5 printf "%s\n" "Checking if G.722.1 codec is disabled...no" >&6; } + fi @@ -7794,16 +7990,19 @@ fi # Check whether --enable-speex-codec was given. if test ${enable_speex_codec+y} then : - enableval=$enable_speex_codec; if test "$enable_speex_codec" = "no"; then - ac_no_speex_codec=1 - printf "%s\n" "#define PJMEDIA_HAS_SPEEX_CODEC 0" >>confdefs.h + enableval=$enable_speex_codec; + if test "$enable_speex_codec" = "no"; then + ac_no_speex_codec=1 + printf "%s\n" "#define PJMEDIA_HAS_SPEEX_CODEC 0" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if Speex codec is disabled...yes" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if Speex codec is disabled...yes" >&5 printf "%s\n" "Checking if Speex codec is disabled...yes" >&6; } - fi + fi + else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if Speex codec is disabled...no" >&5 printf "%s\n" "Checking if Speex codec is disabled...no" >&6; } + fi @@ -7811,16 +8010,19 @@ fi # Check whether --enable-ilbc-codec was given. if test ${enable_ilbc_codec+y} then : - enableval=$enable_ilbc_codec; if test "$enable_ilbc_codec" = "no"; then - ac_no_ilbc_codec=1 - printf "%s\n" "#define PJMEDIA_HAS_ILBC_CODEC 0" >>confdefs.h + enableval=$enable_ilbc_codec; + if test "$enable_ilbc_codec" = "no"; then + ac_no_ilbc_codec=1 + printf "%s\n" "#define PJMEDIA_HAS_ILBC_CODEC 0" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if iLBC codec is disabled...yes" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if iLBC codec is disabled...yes" >&5 printf "%s\n" "Checking if iLBC codec is disabled...yes" >&6; } - fi + fi + else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if iLBC codec is disabled...no" >&5 printf "%s\n" "Checking if iLBC codec is disabled...no" >&6; } + fi @@ -7828,10 +8030,10 @@ fi if test ${enable_libsamplerate+y} then : enableval=$enable_libsamplerate; - if test "$enable_libsamplerate" = "yes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if libsamplerate is enabled...yes" >&5 + if test "$enable_libsamplerate" = "yes"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if libsamplerate is enabled...yes" >&5 printf "%s\n" "Checking if libsamplerate is enabled...yes" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for src_new in -lsamplerate" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for src_new in -lsamplerate" >&5 printf %s "checking for src_new in -lsamplerate... " >&6; } if test ${ac_cv_lib_samplerate_src_new+y} then : @@ -7874,15 +8076,16 @@ then : fi - ac_pjmedia_resample=libsamplerate - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if libsamplerate is enabled...no" >&5 + ac_pjmedia_resample=libsamplerate + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if libsamplerate is enabled...no" >&5 printf "%s\n" "Checking if libsamplerate is enabled...no" >&6; } - fi + fi else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if libsamplerate is enabled...no" >&5 printf "%s\n" "Checking if libsamplerate is enabled...no" >&6; } + fi @@ -7890,11 +8093,13 @@ fi # Check whether --enable-resample_dll was given. if test ${enable_resample_dll+y} then : - enableval=$enable_resample_dll; if test "$enable_resample_dll" = "yes"; then - ac_resample_dll=1 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Building libresample as shared library... yes" >&5 + enableval=$enable_resample_dll; + if test "$enable_resample_dll" = "yes"; then + ac_resample_dll=1 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Building libresample as shared library... yes" >&5 printf "%s\n" "Building libresample as shared library... yes" >&6; } - fi + fi + else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Building libresample as shared library... no" >&5 printf "%s\n" "Building libresample as shared library... no" >&6; } @@ -7906,18 +8111,19 @@ fi if test ${enable_speex_resample+y} then : enableval=$enable_speex_resample; - if test "$enable_speex_resample" = "yes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if Speex resample is enabled... yes" >&5 + if test "$enable_speex_resample" = "yes"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if Speex resample is enabled... yes" >&5 printf "%s\n" "Checking if Speex resample is enabled... yes" >&6; } - ac_pjmedia_resample=speex - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if Speex resample is enabled... no" >&5 + ac_pjmedia_resample=speex + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if Speex resample is enabled... no" >&5 printf "%s\n" "Checking if Speex resample is enabled... no" >&6; } - fi + fi else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if Speex resample is enabled... no" >&5 printf "%s\n" "Checking if Speex resample is enabled... no" >&6; } + fi @@ -7933,24 +8139,24 @@ fi if test "x$ac_cross_compile" != "x" -a "x$with_sdl" = "xno"; then - enable_sdl=no + nable_sdl=no fi # Check whether --enable-sdl was given. if test ${enable_sdl+y} then : enableval=$enable_sdl; - if test "$enable_sdl" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if SDL is disabled... yes" >&5 + if test "$enable_sdl" = "no"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if SDL is disabled... yes" >&5 printf "%s\n" "Checking if SDL is disabled... yes" >&6; } - fi + fi else $as_nop - if test "x$with_sdl" != "xno" -a "x$with_sdl" != "x"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using SDL prefix... $with_sdl" >&5 + if test "x$with_sdl" != "xno" -a "x$with_sdl" != "x"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using SDL prefix... $with_sdl" >&5 printf "%s\n" "Using SDL prefix... $with_sdl" >&6; } - for ac_prog in sdl2-config sdl-config + for ac_prog in sdl2-config sdl-config do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -8000,8 +8206,8 @@ fi test -n "$SDL_CONFIG" && break done - else - for ac_prog in sdl2-config sdl-config + else + for ac_prog in sdl2-config sdl-config do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -8051,28 +8257,28 @@ fi test -n "$SDL_CONFIG" && break done - fi + fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SDL availability" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SDL availability" >&5 printf %s "checking SDL availability... " >&6; } - if test "x$SDL_CONFIG" = "x"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5 + if test "x$SDL_CONFIG" = "x"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5 printf "%s\n" "not found" >&6; } - elif (sh -c "$SDL_CONFIG --version" | grep -e '^1\.3' -e '^2\.') then + elif (sh -c "$SDL_CONFIG --version" | grep -e '^1\.3' -e '^2\.') then - ac_sdl_cflags=`$SDL_CONFIG --cflags` - ac_sdl_cflags="-DPJMEDIA_VIDEO_DEV_HAS_SDL=1 $ac_sdl_cflags" - ac_sdl_ldflags=`$SDL_CONFIG --libs` - ac_sdl_ldflags=`echo "${ac_sdl_ldflags}" | sed -e 's/-mwindows//g'` - LIBS="$LIBS $ac_sdl_ldflags" - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Unsupported SDL version" >&5 + ac_sdl_cflags=`$SDL_CONFIG --cflags` + ac_sdl_cflags="-DPJMEDIA_VIDEO_DEV_HAS_SDL=1 $ac_sdl_cflags" + ac_sdl_ldflags=`$SDL_CONFIG --libs` + ac_sdl_ldflags=`echo "${ac_sdl_ldflags}" | sed -e 's/-mwindows//g'` + LIBS="$LIBS $ac_sdl_ldflags" + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Unsupported SDL version" >&5 printf "%s\n" "Unsupported SDL version" >&6; } - fi + fi -fi +fi @@ -8094,29 +8300,29 @@ fi if test ${enable_ffmpeg+y} then : enableval=$enable_ffmpeg; - ac_has_ffmpeg=0 + ac_has_ffmpeg=0 - if test "$enable_ffmpeg" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if ffmpeg is disabled... yes" >&5 + if test "$enable_ffmpeg" = "no"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if ffmpeg is disabled... yes" >&5 printf "%s\n" "Checking if ffmpeg is disabled... yes" >&6; } - fi + fi else $as_nop - FFMPEG_PREFIX="" + FFMPEG_PREFIX="" - SAVED_PKG_CONFIG_PATH=$PKG_CONFIG_PATH - if test "x$with_ffmpeg" != "xno" -a "x$with_ffmpeg" != "x"; then - FFMPEG_PREFIX=$with_ffmpeg - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using ffmpeg prefix... $FFMPEG_PREFIX" >&5 + SAVED_PKG_CONFIG_PATH=$PKG_CONFIG_PATH + if test "x$with_ffmpeg" != "xno" -a "x$with_ffmpeg" != "x"; then + FFMPEG_PREFIX=$with_ffmpeg + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using ffmpeg prefix... $FFMPEG_PREFIX" >&5 printf "%s\n" "Using ffmpeg prefix... $FFMPEG_PREFIX" >&6; } - export PKG_CONFIG_PATH=$FFMPEG_PREFIX/lib/pkgconfig - fi + export PKG_CONFIG_PATH=$FFMPEG_PREFIX/lib/pkgconfig + fi - for ac_prog in pkg-config "python pkgconfig.py" + for ac_prog in pkg-config "python pkgconfig.py" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -8165,52 +8371,52 @@ done test -n "$PKG_CONFIG" || PKG_CONFIG="none" - if test "$PKG_CONFIG" != "none"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ffmpeg packages" >&5 + if test "$PKG_CONFIG" != "none"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ffmpeg packages" >&5 printf %s "checking ffmpeg packages... " >&6; } - av_pkg="" - if $PKG_CONFIG --exists libavdevice; then - ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVDEVICE=1" - av_pkg="$av_pkg libavdevice" - fi - if $PKG_CONFIG --exists libavformat; then - ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVFORMAT=1" - av_pkg="$av_pkg libavformat" - fi - if $PKG_CONFIG --exists libavcodec; then - ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVCODEC=1" - av_pkg="$av_pkg libavcodec" - fi - if $PKG_CONFIG --exists libswscale; then - ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBSWSCALE=1" - av_pkg="$av_pkg libswscale" - fi - if $PKG_CONFIG --exists libavutil; then - ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVUTIL=1" - av_pkg="$av_pkg libavutil" - fi - - if test "x$av_pkg" = "x"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none detected (check the prefix)! **" >&5 + av_pkg="" + if $PKG_CONFIG --exists libavdevice; then + ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVDEVICE=1" + av_pkg="$av_pkg libavdevice" + fi + if $PKG_CONFIG --exists libavformat; then + ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVFORMAT=1" + av_pkg="$av_pkg libavformat" + fi + if $PKG_CONFIG --exists libavcodec; then + ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVCODEC=1" + av_pkg="$av_pkg libavcodec" + fi + if $PKG_CONFIG --exists libswscale; then + ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBSWSCALE=1" + av_pkg="$av_pkg libswscale" + fi + if $PKG_CONFIG --exists libavutil; then + ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVUTIL=1" + av_pkg="$av_pkg libavutil" + fi + + if test "x$av_pkg" = "x"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none detected (check the prefix)! **" >&5 printf "%s\n" "none detected (check the prefix)! **" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $av_pkg" >&5 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $av_pkg" >&5 printf "%s\n" "$av_pkg" >&6; } - fi + fi - ac_ffmpeg_cflags="$ac_ffmpeg_cflags `$PKG_CONFIG --cflags $av_pkg`" - ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags `$PKG_CONFIG --libs $av_pkg`" + ac_ffmpeg_cflags="$ac_ffmpeg_cflags `$PKG_CONFIG --cflags $av_pkg`" + ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags `$PKG_CONFIG --libs $av_pkg`" - else + else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: *** Warning: neither pkg-config nor python is available, ffmpeg dependency cannot be calculated. If ffmpeg libraries are not detected, you need to specify the correct CFLAGS and LDFLAGS settings for ffmpeg prior to invoking configure ***" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: *** Warning: neither pkg-config nor python is available, ffmpeg dependency cannot be calculated. If ffmpeg libraries are not detected, you need to specify the correct CFLAGS and LDFLAGS settings for ffmpeg prior to invoking configure ***" >&5 printf "%s\n" "*** Warning: neither pkg-config nor python is available, ffmpeg dependency cannot be calculated. If ffmpeg libraries are not detected, you need to specify the correct CFLAGS and LDFLAGS settings for ffmpeg prior to invoking configure ***" >&6; } - LIBS="-L$FFMPEG_PREFIX/lib $LIBS" - LDFLAGS="-L$FFMPEG_PREFIX/lib $LDFLAGS" - CFLAGS="-I$FFMPEG_PREFIX/include $CFLAGS" + LIBS="-L$FFMPEG_PREFIX/lib $LIBS" + LDFLAGS="-L$FFMPEG_PREFIX/lib $LDFLAGS" + CFLAGS="-I$FFMPEG_PREFIX/include $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for avdevice_version in -lavdevice" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for avdevice_version in -lavdevice" >&5 printf %s "checking for avdevice_version in -lavdevice... " >&6; } if test ${ac_cv_lib_avdevice_avdevice_version+y} then : @@ -8247,13 +8453,13 @@ fi printf "%s\n" "$ac_cv_lib_avdevice_avdevice_version" >&6; } if test "x$ac_cv_lib_avdevice_avdevice_version" = xyes then : - ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVDEVICE=1" - ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavdevice" - + ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVDEVICE=1" + ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavdevice" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for av_malloc in -lavutil" >&5 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for av_malloc in -lavutil" >&5 printf %s "checking for av_malloc in -lavutil... " >&6; } if test ${ac_cv_lib_avutil_av_malloc+y} then : @@ -8290,21 +8496,20 @@ fi printf "%s\n" "$ac_cv_lib_avutil_av_malloc" >&6; } if test "x$ac_cv_lib_avutil_av_malloc" = xyes then : - ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVUTIL=1" - ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavutil" - + ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVUTIL=1" + ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavutil" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for avcodec_init in -lavcodec" >&5 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for avcodec_init in -lavcodec" >&5 printf %s "checking for avcodec_init in -lavcodec... " >&6; } if test ${ac_cv_lib_avcodec_avcodec_init+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS -LIBS="-lavcodec -lavutil - $LIBS" +LIBS="-lavcodec -lavutil $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8334,20 +8539,20 @@ fi printf "%s\n" "$ac_cv_lib_avcodec_avcodec_init" >&6; } if test "x$ac_cv_lib_avcodec_avcodec_init" = xyes then : - ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVCODEC=1" - ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavcodec" + ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVCODEC=1" + ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavcodec" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for av_register_all in -lavformat" >&5 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for av_register_all in -lavformat" >&5 printf %s "checking for av_register_all in -lavformat... " >&6; } if test ${ac_cv_lib_avformat_av_register_all+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS -LIBS="-lavformat -lavcodec -lavutil - $LIBS" +LIBS="-lavformat -lavcodec -lavutil $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8377,20 +8582,20 @@ fi printf "%s\n" "$ac_cv_lib_avformat_av_register_all" >&6; } if test "x$ac_cv_lib_avformat_av_register_all" = xyes then : - ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVFORMAT=1" - ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavformat" + ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVFORMAT=1" + ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavformat" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sws_scale in -lswscale" >&5 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sws_scale in -lswscale" >&5 printf %s "checking for sws_scale in -lswscale... " >&6; } if test ${ac_cv_lib_swscale_sws_scale+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS -LIBS="-lswscale -lavutil - $LIBS" +LIBS="-lswscale -lavutil $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8420,12 +8625,13 @@ fi printf "%s\n" "$ac_cv_lib_swscale_sws_scale" >&6; } if test "x$ac_cv_lib_swscale_sws_scale" = xyes then : - ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBSWSCALE=1" - ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lswscale" + ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBSWSCALE=1" + ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lswscale" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for avcore_version in -lavcore" >&5 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for avcore_version in -lavcore" >&5 printf %s "checking for avcore_version in -lavcore... " >&6; } if test ${ac_cv_lib_avcore_avcore_version+y} then : @@ -8462,17 +8668,14 @@ fi printf "%s\n" "$ac_cv_lib_avcore_avcore_version" >&6; } if test "x$ac_cv_lib_avcore_avcore_version" = xyes then : - ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVCORE=1" - ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavcore" - + ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVCORE=1" + ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavcore" fi + fi - fi - - ac_fn_c_check_type "$LINENO" "enum AVPixelFormat" "ac_cv_type_enum_AVPixelFormat" "#include - + ac_fn_c_check_type "$LINENO" "enum AVPixelFormat" "ac_cv_type_enum_AVPixelFormat" "#include " if test "x$ac_cv_type_enum_AVPixelFormat" = xyes then : @@ -8481,12 +8684,13 @@ printf "%s\n" "#define HAVE_ENUM_AVPIXELFORMAT 1" >>confdefs.h else $as_nop - ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_USE_OLD_FFMPEG=1" + + ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_USE_OLD_FFMPEG=1" fi - LIBS="$LIBS $ac_ffmpeg_ldflags" - export PKG_CONFIG_PATH=$SAVED_PKG_CONFIG_PATH + LIBS="$LIBS $ac_ffmpeg_ldflags" + export PKG_CONFIG_PATH=$SAVED_PKG_CONFIG_PATH fi @@ -8496,16 +8700,16 @@ fi if test ${enable_v4l2+y} then : enableval=$enable_v4l2; - if test "$enable_v4l2" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if V4L2 is disabled... yes" >&5 + if test "$enable_v4l2" = "no"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if V4L2 is disabled... yes" >&5 printf "%s\n" "Checking if V4L2 is disabled... yes" >&6; } - fi + fi else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for v4l2_open in -lv4l2" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for v4l2_open in -lv4l2" >&5 printf %s "checking for v4l2_open in -lv4l2... " >&6; } if test ${ac_cv_lib_v4l2_v4l2_open+y} then : @@ -8542,14 +8746,14 @@ fi printf "%s\n" "$ac_cv_lib_v4l2_v4l2_open" >&6; } if test "x$ac_cv_lib_v4l2_v4l2_open" = xyes then : - ac_v4l2_cflags="-DPJMEDIA_VIDEO_DEV_HAS_V4L2=1" - ac_v4l2_ldflags="-lv4l2" - LIBS="$LIBS -lv4l2" - + ac_v4l2_cflags="-DPJMEDIA_VIDEO_DEV_HAS_V4L2=1" + ac_v4l2_ldflags="-lv4l2" + LIBS="$LIBS -lv4l2" fi + fi @@ -8574,66 +8778,69 @@ fi if test ${enable_openh264+y} then : enableval=$enable_openh264; - if test "$enable_openh264" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if OpenH264 is disabled... yes" >&5 + if test "$enable_openh264" = "no"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if OpenH264 is disabled... yes" >&5 printf "%s\n" "Checking if OpenH264 is disabled... yes" >&6; } - fi + fi else $as_nop - if test "x$with_openh264" != "xno" -a "x$with_openh264" != "x"; then - OPENH264_PREFIX=$with_openh264 - OPENH264_CFLAGS="-I$OPENH264_PREFIX/include" - OPENH264_LDFLAGS="-L$OPENH264_PREFIX/lib" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using OpenH264 prefix... $with_openh264" >&5 + if test "x$with_openh264" != "xno" -a "x$with_openh264" != "x"; then + OPENH264_PREFIX=$with_openh264 + OPENH264_CFLAGS="-I$OPENH264_PREFIX/include" + OPENH264_LDFLAGS="-L$OPENH264_PREFIX/lib" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using OpenH264 prefix... $with_openh264" >&5 printf "%s\n" "Using OpenH264 prefix... $with_openh264" >&6; } - else - OPENH264_CFLAGS="" - OPENH264_LDFLAGS="" - fi + else + OPENH264_CFLAGS="" + OPENH264_LDFLAGS="" + fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking OpenH264 usability" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking OpenH264 usability" >&5 printf %s "checking OpenH264 usability... " >&6; } - OPENH264_LIBS="-lopenh264 -lstdc++" + OPENH264_LIBS="-lopenh264 -lstdc++" - SAVED_LIBS="$LIBS" - SAVED_LDFLAGS="$LDFLAGS" - SAVED_CFLAGS="$CFLAGS" + SAVED_LIBS="$LIBS" + SAVED_LDFLAGS="$LDFLAGS" + SAVED_CFLAGS="$CFLAGS" - LIBS="$OPENH264_LIBS $LIBS" - LDFLAGS="$OPENH264_LDFLAGS $LDFLAGS" - CFLAGS="$OPENH264_CFLAGS $CFLAGS" + LIBS="$OPENH264_LIBS $LIBS" + LDFLAGS="$OPENH264_LDFLAGS $LDFLAGS" + CFLAGS="$OPENH264_CFLAGS $CFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include + + #include + #include int main (void) { WelsCreateSVCEncoder(0); - ; return 0; } + _ACEOF if ac_fn_c_try_link "$LINENO" then : - ac_openh264_cflags="-DPJMEDIA_HAS_OPENH264_CODEC=1 $OPENH264_CFLAGS" - ac_openh264_ldflags="$OPENH264_LDFLAGS $OPENH264_LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + + ac_openh264_cflags="-DPJMEDIA_HAS_OPENH264_CODEC=1 $OPENH264_CFLAGS" + ac_openh264_ldflags="$OPENH264_LDFLAGS $OPENH264_LIBS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else $as_nop - LIBS="$SAVED_LIBS" - LDFLAGS="$SAVED_LDFLAGS" - CFLAGS="$SAVED_CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + LIBS="$SAVED_LIBS" + LDFLAGS="$SAVED_LDFLAGS" + CFLAGS="$SAVED_CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } + fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -8663,66 +8870,69 @@ fi if test ${enable_vpx+y} then : enableval=$enable_vpx; - if test "$enable_vpx" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if VPX is disabled... yes" >&5 + if test "$enable_vpx" = "no"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if VPX is disabled... yes" >&5 printf "%s\n" "Checking if VPX is disabled... yes" >&6; } - fi + fi else $as_nop - if test "x$with_vpx" != "xno" -a "x$with_vpx" != "x"; then - VPX_PREFIX=$with_vpx - VPX_CFLAGS="-I$VPX_PREFIX/include" - VPX_LDFLAGS="-L$VPX_PREFIX/lib" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using VPX prefix... $with_vpx" >&5 + if test "x$with_vpx" != "xno" -a "x$with_vpx" != "x"; then + VPX_PREFIX=$with_vpx + VPX_CFLAGS="-I$VPX_PREFIX/include" + VPX_LDFLAGS="-L$VPX_PREFIX/lib" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using VPX prefix... $with_vpx" >&5 printf "%s\n" "Using VPX prefix... $with_vpx" >&6; } - else - VPX_CFLAGS="" - VPX_LDFLAGS="" - fi + else + VPX_CFLAGS="" + VPX_LDFLAGS="" + fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking VPX usability" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking VPX usability" >&5 printf %s "checking VPX usability... " >&6; } - VPX_LIBS="-lvpx" + VPX_LIBS="-lvpx" - SAVED_LIBS="$LIBS" - SAVED_LDFLAGS="$LDFLAGS" - SAVED_CFLAGS="$CFLAGS" + SAVED_LIBS="$LIBS" + SAVED_LDFLAGS="$LDFLAGS" + SAVED_CFLAGS="$CFLAGS" - LIBS="$VPX_LIBS $LIBS" - LDFLAGS="$VPX_LDFLAGS $LDFLAGS" - CFLAGS="$VPX_CFLAGS $CFLAGS" + LIBS="$VPX_LIBS $LIBS" + LDFLAGS="$VPX_LDFLAGS $LDFLAGS" + CFLAGS="$VPX_CFLAGS $CFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include + + #include + #include int main (void) { vpx_codec_iface_t *(*enc_if)() = &vpx_codec_vp8_cx; - ; return 0; } + _ACEOF if ac_fn_c_try_link "$LINENO" then : - ac_vpx_cflags="-DPJMEDIA_HAS_VPX_CODEC=1 $VPX_CFLAGS" - ac_vpx_ldflags="$VPX_LDFLAGS $VPX_LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + + ac_vpx_cflags="-DPJMEDIA_HAS_VPX_CODEC=1 $VPX_CFLAGS" + ac_vpx_ldflags="$VPX_LDFLAGS $VPX_LIBS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else $as_nop - LIBS="$SAVED_LIBS" - LDFLAGS="$SAVED_LDFLAGS" - CFLAGS="$SAVED_CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + LIBS="$SAVED_LIBS" + LDFLAGS="$SAVED_LDFLAGS" + CFLAGS="$SAVED_CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } + fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -8731,7 +8941,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ fi - # Check whether --enable-ipp was given. if test ${enable_ipp+y} then : @@ -8780,96 +8989,95 @@ if test "x$enable_ipp" != "xno"; then printf %s "checking Intel IPP location... " >&6; } if test "x$with_ipp" != "xno" -a "x$with_ipp" != "x"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_ipp" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_ipp" >&5 printf "%s\n" "$with_ipp" >&6; } - IPPROOT=$with_ipp + IPPROOT=$with_ipp elif test "x$IPPROOT" = "x"; then - if test -d /opt/intel/ipp; then - IPPROOT=`ls -d /opt/intel/ipp/*/* | head -1` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: autodetected in $IPPROOT" >&5 + if test -d /opt/intel/ipp; then + IPPROOT=`ls -d /opt/intel/ipp/*/* | head -1` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: autodetected in $IPPROOT" >&5 printf "%s\n" "autodetected in $IPPROOT" >&6; } - fi + fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $IPPROOT" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $IPPROOT" >&5 printf "%s\n" "$IPPROOT" >&6; } fi if test "x$with_ipp_arch" != "xno"; then - IPP_SUFFIX=$with_ipp_arch - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: IPP arch suffix is set to $IPP_SUFFIX" >&5 + IPP_SUFFIX=$with_ipp_arch + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: IPP arch suffix is set to $IPP_SUFFIX" >&5 printf "%s\n" "IPP arch suffix is set to $IPP_SUFFIX" >&6; } else - IPP_SUFFIX="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: IPP arch suffix is set to empty" >&5 + IPP_SUFFIX="" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: IPP arch suffix is set to empty" >&5 printf "%s\n" "IPP arch suffix is set to empty" >&6; } fi if test x$IPPROOT = x; then - as_fn_error $? "the location is neither specified nor can be guessed. Please specify with IPPROOT env var or with --with-ipp option" "$LINENO" 5 + as_fn_error $? "the location is neither specified nor can be guessed. Please specify with IPPROOT env var or with --with-ipp option" "$LINENO" 5 elif test ! -d $IPPROOT; then - as_fn_error $? "not found" "$LINENO" 5 + as_fn_error $? "not found" "$LINENO" 5 elif test ! -d $IPPROOT/include; then - as_fn_error $? "directory doesn't seem to be valid" "$LINENO" 5 + as_fn_error $? "directory doesn't seem to be valid" "$LINENO" 5 else - # IPP directory looks okay. - # Remove trailing backslash - IPPROOT=`echo $IPPROOT | sed 's/\/$//'` - - SAVED_CFLAGS="$CFLAGS" - SAVED_LDFLAGS="$LDFLAGS" - SAVED_LIBS="$LIBS" - - IPP_CFLAGS="-I$IPPROOT/include" - IPP_LIBS="-lippsc${IPP_SUFFIX} -lipps${IPP_SUFFIX} -lippcore${IPP_SUFFIX}" - -# - # Some differences between Mac OS X and Linux - case $target in - *darwin* ) - IPP_LDFLAGS="-L$IPPROOT/Libraries -L$IPPROOT/lib" - ;; - *) - # Find out where the libraries live. - IPP7_ARCH="" - if test -d $IPPROOT/lib/intel64; then - IPP7_ARCH="intel64" - elif test -d $IPPROOT/lib/ia32; then - IPP7_ARCH="ia32" - elif test -d $IPPROOT/lib/mic; then - IPP7_ARCH="mic" - fi - - if test -z "$IPP7_ARCH"; then - # IPP6 (and possibly below) - IPP_LDFLAGS="-L$IPPROOT/sharedlib" - IPP_LIBS="$IPP_LIBS -lippsr${IPP_SUFFIX} -lguide" - else - # IPP7 - if ! test -d $IPPROOT/../compiler; then - as_fn_error $? "Cannot find $IPPROOT/../compiler directory. Please set IPPROOT variable correctly" "$LINENO" 5 - fi - IPP_CFLAGS="$IPP_CFLAGS" - IPP_LDFLAGS="-L$IPPROOT/lib/intel64 -L$IPPROOT/../compiler/lib/$IPP7_ARCH" - IPP_LIBS="$IPP_LIBS -liomp5" - fi - ;; - esac + # IPP directory looks okay. + # Remove trailing backslash + IPPROOT=`echo $IPPROOT | sed 's/\/$//'` + + SAVED_CFLAGS="$CFLAGS" + SAVED_LDFLAGS="$LDFLAGS" + SAVED_LIBS="$LIBS" + + IPP_CFLAGS="-I$IPPROOT/include" + IPP_LIBS="-lippsc${IPP_SUFFIX} -lipps${IPP_SUFFIX} -lippcore${IPP_SUFFIX}" + + # Some differences between Mac OS X and Linux + case $target in + *darwin* ) + IPP_LDFLAGS="-L$IPPROOT/Libraries -L$IPPROOT/lib" + ;; + *) + # Find out where the libraries live. + IPP7_ARCH="" + if test -d $IPPROOT/lib/intel64; then + IPP7_ARCH="intel64" + elif test -d $IPPROOT/lib/ia32; then + IPP7_ARCH="ia32" + elif test -d $IPPROOT/lib/mic; then + IPP7_ARCH="mic" + fi - #IPP_LDFLAGS="-L$IPPROOT/sharedlib" - #Static: - #IPP_LIBS="-lippscmerged -lippsrmerged -lippsmerged -lippcore" + if test -z "$IPP7_ARCH"; then + # IPP6 (and possibly below) + IPP_LDFLAGS="-L$IPPROOT/sharedlib" + IPP_LIBS="$IPP_LIBS -lippsr${IPP_SUFFIX} -lguide" + else + # IPP7 + if ! test -d $IPPROOT/../compiler; then + as_fn_error $? "Cannot find $IPPROOT/../compiler directory. Please set IPPROOT variable correctly" "$LINENO" 5 + fi + IPP_CFLAGS="$IPP_CFLAGS" + IPP_LDFLAGS="-L$IPPROOT/lib/intel64 -L$IPPROOT/../compiler/lib/$IPP7_ARCH" + IPP_LIBS="$IPP_LIBS -liomp5" + fi + ;; + esac - CFLAGS="$CFLAGS $IPP_CFLAGS" - LDFLAGS="$LDFLAGS $IPP_LDFLAGS" - LIBS="$IPP_LIBS $LIBS" + #IPP_LDFLAGS="-L$IPPROOT/sharedlib" + #Static: + #IPP_LIBS="-lippscmerged -lippsrmerged -lippsmerged -lippcore" + CFLAGS="$CFLAGS $IPP_CFLAGS" + LDFLAGS="$LDFLAGS $IPP_LDFLAGS" + LIBS="$IPP_LIBS $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Intel IPP usability" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Intel IPP usability" >&5 printf %s "checking Intel IPP usability... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + + #include int main (void) { @@ -8877,6 +9085,7 @@ ippStaticInit(); ; return 0; } + _ACEOF if ac_fn_c_try_link "$LINENO" then : @@ -8887,117 +9096,119 @@ else $as_nop printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Error: unable to recognize your IPP installation. Make sure the paths and ARCH suffix are set correctly, run with --help for more info See \`config.log' for more details" "$LINENO" 5; } + fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - CFLAGS="$SAVED_CFLAGS" - LDFLAGS="$SAVED_LDFLAGS" - LIBS="$SAVED_LIBS" + CFLAGS="$SAVED_CFLAGS" + LDFLAGS="$SAVED_LDFLAGS" + LIBS="$SAVED_LIBS" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Intel IPP samples location" >&5 printf %s "checking Intel IPP samples location... " >&6; } if test "x$with_ipp_samples" != "xno" -a "x$with_ipp_samples" != "x"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_ipp_samples" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_ipp_samples" >&5 printf "%s\n" "$with_ipp_samples" >&6; } - IPPSAMPLES=$with_ipp_samples + IPPSAMPLES=$with_ipp_samples elif test "x$IPPSAMPLES" = "x"; then - if test -d /opt/intel/ipp-samples; then - IPPSAMPLES=/opt/intel/ipp-samples - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: autodetected in $IPPSAMPLES" >&5 + if test -d /opt/intel/ipp-samples; then + IPPSAMPLES=/opt/intel/ipp-samples + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: autodetected in $IPPSAMPLES" >&5 printf "%s\n" "autodetected in $IPPSAMPLES" >&6; } - fi + fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $IPPSAMPLES" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $IPPSAMPLES" >&5 printf "%s\n" "$IPPSAMPLES" >&6; } fi if test x$IPPSAMPLES = x; then - as_fn_error $? "the location is neither specified nor can be guessed. Please specify with IPPSAMPLES env var or with --with-ipp-samples option" "$LINENO" 5 + as_fn_error $? "the location is neither specified nor can be guessed. Please specify with IPPSAMPLES env var or with --with-ipp-samples option" "$LINENO" 5 elif test ! -d $IPPSAMPLES; then - as_fn_error $? "not found" "$LINENO" 5 + as_fn_error $? "not found" "$LINENO" 5 elif test ! -d $IPPSAMPLES/speech-codecs; then - as_fn_error $? "directory doesn't seem to be valid" "$LINENO" 5 + as_fn_error $? "directory doesn't seem to be valid" "$LINENO" 5 else - # Remove trailing backslash - IPPSAMPLES=`echo $IPPSAMPLES | sed 's/\/$//'` + # Remove trailing backslash + IPPSAMPLES=`echo $IPPSAMPLES | sed 's/\/$//'` - # Guess the libusc.a/libspeech.a build location - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Intel IPP USC build location" >&5 + # Guess the libusc.a/libspeech.a build location + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Intel IPP USC build location" >&5 printf %s "checking Intel IPP USC build location... " >&6; } - if test -d $IPPSAMPLES/speech-codecs/bin; then - IPPVER=5 - IPPSAMP_DIR=`ls -d $IPPSAMPLES/speech-codecs/bin/*gcc*/lib | head -1` - elif test -d $IPPSAMPLES/speech-codecs/_bin; then - IPPVER=6 - if test -d $IPPSAMPLES/speech-codecs/_bin/*gcc*; then - # gcc compiler - IPPSAMP_DIR=`ls -d $IPPSAMPLES/speech-codecs/_bin/*gcc*/lib | head -1` - elif test -d $IPPSAMPLES/speech-codecs/_bin/*icc*; then - # icc compiler - IPPSAMP_DIR=`ls -d $IPPSAMPLES/speech-codecs/_bin/*icc*/lib | head -1` - else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + if test -d $IPPSAMPLES/speech-codecs/bin; then + IPPVER=5 + IPPSAMP_DIR=`ls -d $IPPSAMPLES/speech-codecs/bin/*gcc*/lib | head -1` + elif test -d $IPPSAMPLES/speech-codecs/_bin; then + IPPVER=6 + if test -d $IPPSAMPLES/speech-codecs/_bin/*gcc*; then + # gcc compiler + IPPSAMP_DIR=`ls -d $IPPSAMPLES/speech-codecs/_bin/*gcc*/lib | head -1` + elif test -d $IPPSAMPLES/speech-codecs/_bin/*icc*; then + # icc compiler + IPPSAMP_DIR=`ls -d $IPPSAMPLES/speech-codecs/_bin/*icc*/lib | head -1` + else + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Unable to find to find built binaries under $IPPSAMPLES/speech-codecs/{bin,_bin}. Have you built the IPP samples? See \`config.log' for more details" "$LINENO" 5; } - fi - else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + fi + else + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "unable to find $IPPSAMPLES/speech-codecs/bin/*gcc*/lib or $IPPSAMPLES/speech-codecs/_bin/*gcc*/lib directory. Have you built the samples? See \`config.log' for more details" "$LINENO" 5; } - fi + fi - # Test the directory - if test ! -d $IPPSAMP_DIR; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + # Test the directory + if test ! -d $IPPSAMP_DIR; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "There's something wrong with this script, directory $IPPSAMP_DIR does not exist See \`config.log' for more details" "$LINENO" 5; } - exit 1; - fi + exit 1; + fi - if test "x$IPPVER" = "x5"; then - IPPSAMP_LIBS="libusc.a" - IPPSAMP_LDLIBS="-lusc" - elif test "x$IPPVER" = "x6"; then - IPPSAMP_LIBS="libspeech.a" - IPPSAMP_LDLIBS="-lspeech" - else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + if test "x$IPPVER" = "x5"; then + IPPSAMP_LIBS="libusc.a" + IPPSAMP_LDLIBS="-lusc" + elif test "x$IPPVER" = "x6"; then + IPPSAMP_LIBS="libspeech.a" + IPPSAMP_LDLIBS="-lspeech" + else + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "bug in this script: unsupported IPP version See \`config.log' for more details" "$LINENO" 5; } - fi + fi - if test ! -f $IPPSAMP_DIR/$IPPSAMP_LIBS; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + if test ! -f $IPPSAMP_DIR/$IPPSAMP_LIBS; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "$IPPSAMP_LIBS doesn't exist in $IPPSAMP_DIR See \`config.log' for more details" "$LINENO" 5; } - fi + fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $IPPSAMP_DIR" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $IPPSAMP_DIR" >&5 printf "%s\n" "$IPPSAMP_DIR" >&6; } - SAVED_CFLAGS="$CFLAGS" - SAVED_LDFLAGS="$LDFLAGS" - SAVED_LIBS="$LIBS" + SAVED_CFLAGS="$CFLAGS" + SAVED_LDFLAGS="$LDFLAGS" + SAVED_LIBS="$LIBS" - IPPSAMP_INC="-I$IPPSAMPLES/speech-codecs/core/usc/include" - CFLAGS="$CFLAGS $IPPSAMP_INC" - LDFLAGS="$LDFLAGS -L$IPPSAMP_DIR" - LIBS="$IPPSAMP_LDLIBS $LIBS" + IPPSAMP_INC="-I$IPPSAMPLES/speech-codecs/core/usc/include" + CFLAGS="$CFLAGS $IPPSAMP_INC" + LDFLAGS="$LDFLAGS -L$IPPSAMP_DIR" + LIBS="$IPPSAMP_LDLIBS $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Intel IPP USC usability" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Intel IPP USC usability" >&5 printf %s "checking Intel IPP USC usability... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + + #include int main (void) { @@ -9005,6 +9216,7 @@ extern USC_Fxns USC_G729AFP_Fxns; ; return 0; } + _ACEOF if ac_fn_c_try_link "$LINENO" then : @@ -9015,17 +9227,18 @@ else $as_nop printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no See \`config.log' for more details" "$LINENO" 5; } + fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - CFLAGS="$SAVED_CFLAGS" - LDFLAGS="$IPP_LDFLAGS $SAVED_LDFLAGS" - LIBS="$IPP_LIBS $SAVED_LIBS" + CFLAGS="$SAVED_CFLAGS" + LDFLAGS="$IPP_LDFLAGS $SAVED_LDFLAGS" + LIBS="$IPP_LIBS $SAVED_LIBS" - IPP_CFLAGS="$IPP_CFLAGS $IPPSAMP_INC" - IPP_LDFLAGS="$IPP_LDFLAGS -L$IPPSAMP_DIR" - IPP_LIBS="$IPPSAMP_LDLIBS $IPP_LIBS" + IPP_CFLAGS="$IPP_CFLAGS $IPPSAMP_INC" + IPP_LDFLAGS="$IPP_LDFLAGS -L$IPPSAMP_DIR" + IPP_LIBS="$IPPSAMP_LDLIBS $IPP_LIBS" fi CFLAGS="$CFLAGS $IPP_CFLAGS" @@ -9033,9 +9246,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ LIBS="$LIBS $IPP_LIBS" ac_build_mak_vars="$ac_build_mak_vars\n\ -export IPP_CFLAGS=$IPP_CFLAGS\n\ -export IPP_LDFLAGS=$IPP_LDFLAGS\n\ -export IPP_LIBS=$IPP_LIBS" + export IPP_CFLAGS=$IPP_CFLAGS\n\ + export IPP_LDFLAGS=$IPP_LDFLAGS\n\ + export IPP_LIBS=$IPP_LIBS" else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Skipping Intel IPP settings (not wanted)" >&5 printf "%s\n" "Skipping Intel IPP settings (not wanted)" >&6; } @@ -9046,16 +9259,18 @@ fi # Check whether --enable-android-mediacodec was given. if test ${enable_android_mediacodec+y} then : - enableval=$enable_android_mediacodec; if test "$enable_android_mediacodec" = "no"; then - ac_no_mediacodec=1 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if Android MediaCodec support is disabled... yes" >&5 + enableval=$enable_android_mediacodec; + if test "$enable_android_mediacodec" = "no"; then + ac_no_mediacodec=1 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if Android MediaCodec support is disabled... yes" >&5 printf "%s\n" "Checking if Android MediaCodec support is disabled... yes" >&6; } - fi + fi + else $as_nop - case $target in - *android*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for AMediaCodec_createDecoderByType in -lmediandk" >&5 + case $target in + *android*) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for AMediaCodec_createDecoderByType in -lmediandk" >&5 printf %s "checking for AMediaCodec_createDecoderByType in -lmediandk... " >&6; } if test ${ac_cv_lib_mediandk_AMediaCodec_createDecoderByType+y} then : @@ -9092,20 +9307,23 @@ fi printf "%s\n" "$ac_cv_lib_mediandk_AMediaCodec_createDecoderByType" >&6; } if test "x$ac_cv_lib_mediandk_AMediaCodec_createDecoderByType" = xyes then : - ac_pjmedia_has_amediacodec=1 && LIBS="-lmediandk $LIBS" + + ac_pjmedia_has_amediacodec=1 && LIBS="-lmediandk $LIBS" fi - if test "x$ac_pjmedia_has_amediacodec" = "x1"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if Android AMediaCodec library is available... yes" >&5 + + if test "x$ac_pjmedia_has_amediacodec" = "x1"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if Android AMediaCodec library is available... yes" >&5 printf "%s\n" "Checking if Android AMediaCodec library is available... yes" >&6; } - printf "%s\n" "#define PJMEDIA_HAS_ANDROID_MEDIACODEC 1" >>confdefs.h + printf "%s\n" "#define PJMEDIA_HAS_ANDROID_MEDIACODEC 1" >>confdefs.h - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if Android AMediaCodec library is available... no" >&5 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if Android AMediaCodec library is available... no" >&5 printf "%s\n" "Checking if Android AMediaCodec library is available... no" >&6; } - fi - ;; - esac + fi + ;; + esac + fi @@ -9145,53 +9363,61 @@ ac_ssl_has_aes_gcm=0 # Check whether --enable-darwin-ssl was given. if test ${enable_darwin_ssl+y} then : - enableval=$enable_darwin_ssl; if test "$enable_darwin_ssl" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if Darwin SSL support is disabled... yes" >&5 + enableval=$enable_darwin_ssl; + if test "$enable_darwin_ssl" = "no"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if Darwin SSL support is disabled... yes" >&5 printf "%s\n" "Checking if Darwin SSL support is disabled... yes" >&6; } - fi + fi + else $as_nop - case $target in - *darwin*) - SAVED_CFLAGS="$CFLAGS" - CFLAGS="-Werror" - SAVED_LIBS="$LIBS" - LIBS="-framework Security" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + case $target in + *darwin*) + SAVED_CFLAGS="$CFLAGS" + CFLAGS="-Werror" + SAVED_LIBS="$LIBS" + + LIBS="-framework Security" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + + + #include int main (void) { if (__builtin_available(macOS 10.12, iOS 10.0, *)) { - SSLContextRef ssl_ctx; - SSLReHandshake(ssl_ctx); - } + SSLContextRef ssl_ctx; + SSLReHandshake(ssl_ctx); + } ; return 0; } + _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_ssl_backend=darwin fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS="$SAVED_CFLAGS" - LIBS="$SAVED_LIBS" - if test "x$ac_ssl_backend" = "xdarwin"; then - printf "%s\n" "#define PJ_HAS_SSL_SOCK 1" >>confdefs.h - printf "%s\n" "#define PJ_SSL_SOCK_IMP PJ_SSL_SOCK_IMP_DARWIN" >>confdefs.h + CFLAGS="$SAVED_CFLAGS" + LIBS="$SAVED_LIBS" + if test "x$ac_ssl_backend" = "xdarwin"; then + printf "%s\n" "#define PJ_HAS_SSL_SOCK 1" >>confdefs.h + + printf "%s\n" "#define PJ_SSL_SOCK_IMP PJ_SSL_SOCK_IMP_DARWIN" >>confdefs.h - LIBS="$LIBS -framework Security" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if Darwin SSL is available... yes" >&5 + LIBS="$LIBS -framework Security" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if Darwin SSL is available... yes" >&5 printf "%s\n" "Checking if Darwin SSL is available... yes" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if Darwin SSL is available... no" >&5 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if Darwin SSL is available... no" >&5 printf "%s\n" "Checking if Darwin SSL is available... no" >&6; } - fi - ;; - esac + fi + ;; + esac + fi @@ -9200,37 +9426,38 @@ fi if test ${enable_ssl+y} then : enableval=$enable_ssl; - if test "$enable_ssl" = "no"; then - ac_no_ssl=1 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if SSL support is disabled... yes" >&5 + if test "$enable_ssl" = "no"; then + ac_no_ssl=1 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if SSL support is disabled... yes" >&5 printf "%s\n" "Checking if SSL support is disabled... yes" >&6; } - fi + fi else $as_nop - if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then - CFLAGS="$CFLAGS -I$with_ssl/include" - CPPFLAGS="$CPPFLAGS -I$with_ssl/include" - LDFLAGS="$LDFLAGS -L$with_ssl/lib" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using SSL prefix... $with_ssl" >&5 + if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then + CFLAGS="$CFLAGS -I$with_ssl/include" + CPPFLAGS="$CPPFLAGS -I$with_ssl/include" + LDFLAGS="$LDFLAGS -L$with_ssl/lib" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using SSL prefix... $with_ssl" >&5 printf "%s\n" "Using SSL prefix... $with_ssl" >&6; } - fi + fi - if test "x$with_gnutls" = "xno"; then - # We still need to check for OpenSSL installations even if - # we find Darwin SSL above since DTLS requires OpenSSL. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: checking for OpenSSL installations.." >&5 + if test "x$with_gnutls" = "xno"; then + # We still need to check for OpenSSL installations even if + # we find Darwin SSL above since DTLS requires OpenSSL. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: checking for OpenSSL installations.." >&5 printf "%s\n" "checking for OpenSSL installations.." >&6; } - ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default" + ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default" if test "x$ac_cv_header_openssl_ssl_h" = xyes then : openssl_h_present=1 fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ERR_load_BIO_strings in -lcrypto" >&5 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ERR_load_BIO_strings in -lcrypto" >&5 printf %s "checking for ERR_load_BIO_strings in -lcrypto... " >&6; } if test ${ac_cv_lib_crypto_ERR_load_BIO_strings+y} then : @@ -9267,9 +9494,11 @@ fi printf "%s\n" "$ac_cv_lib_crypto_ERR_load_BIO_strings" >&6; } if test "x$ac_cv_lib_crypto_ERR_load_BIO_strings" = xyes then : - libcrypto_present=1 && LIBS="-lcrypto $LIBS" + + libcrypto_present=1 && LIBS="-lcrypto $LIBS" else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ERR_get_error in -lcrypto" >&5 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ERR_get_error in -lcrypto" >&5 printf %s "checking for ERR_get_error in -lcrypto... " >&6; } if test ${ac_cv_lib_crypto_ERR_get_error+y} then : @@ -9309,9 +9538,12 @@ then : libcrypto_present=1 && LIBS="-lcrypto $LIBS" fi + + fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL_CTX_new in -lssl" >&5 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL_CTX_new in -lssl" >&5 printf %s "checking for SSL_CTX_new in -lssl... " >&6; } if test ${ac_cv_lib_ssl_SSL_CTX_new+y} then : @@ -9351,19 +9583,22 @@ then : libssl_present=1 && LIBS="-lssl $LIBS" fi - if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OpenSSL library found, SSL support enabled" >&5 + + if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OpenSSL library found, SSL support enabled" >&5 printf "%s\n" "OpenSSL library found, SSL support enabled" >&6; } - # Check if SRTP should be compiled with OpenSSL - # support, to enable cryptos such as AES GCM. + # Check if SRTP should be compiled with OpenSSL + # support, to enable cryptos such as AES GCM. - # EVP_CIPHER_CTX is now opaque in OpenSSL 1.1.0, libsrtp 1.5.4 uses it as a transparent type. - # Update 2.7: our bundled libsrtp has been upgraded to 2.1.0, - # so we can omit EVP_CIPHER_CTX definition check now. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # EVP_CIPHER_CTX is now opaque in OpenSSL 1.1.0, libsrtp 1.5.4 uses it as a transparent type. + # Update 2.7: our bundled libsrtp has been upgraded to 2.1.0, + # so we can omit EVP_CIPHER_CTX definition check now. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + + + #include int main (void) { @@ -9371,10 +9606,12 @@ EVP_CIPHER_CTX *ctx;EVP_aes_128_gcm(); ; return 0; } + _ACEOF if ac_fn_c_try_compile "$LINENO" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_aes_128_gcm in -lcrypto" >&5 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_aes_128_gcm in -lcrypto" >&5 printf %s "checking for EVP_aes_128_gcm in -lcrypto... " >&6; } if test ${ac_cv_lib_crypto_EVP_aes_128_gcm+y} then : @@ -9414,42 +9651,43 @@ then : ac_ssl_has_aes_gcm=1 fi + + fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - if test "x$ac_ssl_has_aes_gcm" = "x1"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OpenSSL has AES GCM support, SRTP will use OpenSSL" >&5 + + if test "x$ac_ssl_has_aes_gcm" = "x1"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OpenSSL has AES GCM support, SRTP will use OpenSSL" >&5 printf "%s\n" "OpenSSL has AES GCM support, SRTP will use OpenSSL" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OpenSSL AES GCM support not found, SRTP will only support AES CM cryptos" >&5 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OpenSSL AES GCM support not found, SRTP will only support AES CM cryptos" >&5 printf "%s\n" "OpenSSL AES GCM support not found, SRTP will only support AES CM cryptos" >&6; } - fi + fi - if test "x$ac_ssl_backend" = "x"; then - # PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK - #AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1) - printf "%s\n" "#define PJ_HAS_SSL_SOCK 1" >>confdefs.h + if test "x$ac_ssl_backend" = "x"; then + # PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK + #AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1) + printf "%s\n" "#define PJ_HAS_SSL_SOCK 1" >>confdefs.h - printf "%s\n" "#define PJ_SSL_SOCK_IMP PJ_SSL_SOCK_IMP_OPENSSL" >>confdefs.h + printf "%s\n" "#define PJ_SSL_SOCK_IMP PJ_SSL_SOCK_IMP_OPENSSL" >>confdefs.h - ac_ssl_backend="openssl" - fi - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ** OpenSSL libraries not found **" >&5 + ac_ssl_backend="openssl" + fi + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ** OpenSSL libraries not found **" >&5 printf "%s\n" "** OpenSSL libraries not found **" >&6; } - fi - - fi - - if test "x$ac_ssl_backend" = "x"; then + fi + fi - if test "x$with_gnutls" != "xno" -a "x$with_gnutls" != "x"; then - CFLAGS="$CFLAGS -I$with_gnutls/include" - LDFLAGS="$LDFLAGS -L$with_gnutls/lib" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using GnuTLS prefix... $with_gnutls" >&5 + if test "x$ac_ssl_backend" = "x"; then + if test "x$with_gnutls" != "xno" -a "x$with_gnutls" != "x"; then + CFLAGS="$CFLAGS -I$with_gnutls/include" + LDFLAGS="$LDFLAGS -L$with_gnutls/lib" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using GnuTLS prefix... $with_gnutls" >&5 printf "%s\n" "Using GnuTLS prefix... $with_gnutls" >&6; } - fi + fi - for ac_prog in $host-pkg-config pkg-config "python pkgconfig.py" + for ac_prog in $host-pkg-config pkg-config "python pkgconfig.py" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -9497,23 +9735,24 @@ fi done test -n "$PKG_CONFIG" || PKG_CONFIG="none" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: checking for GnuTLS installations.." >&5 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: checking for GnuTLS installations.." >&5 printf "%s\n" "checking for GnuTLS installations.." >&6; } - ac_fn_c_check_header_compile "$LINENO" "gnutls/gnutls.h" "ac_cv_header_gnutls_gnutls_h" "$ac_includes_default" + ac_fn_c_check_header_compile "$LINENO" "gnutls/gnutls.h" "ac_cv_header_gnutls_gnutls_h" "$ac_includes_default" if test "x$ac_cv_header_gnutls_gnutls_h" = xyes then : gnutls_h_present=1 fi - if test "$PKG_CONFIG" != "none"; then - if $PKG_CONFIG --exists gnutls; then - LIBS="$LIBS `$PKG_CONFIG --libs gnutls`" - libgnutls_present=1 - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gnutls_certificate_set_x509_system_trust in -lgnutls" >&5 + if test "$PKG_CONFIG" != "none"; then + if $PKG_CONFIG --exists gnutls; then + LIBS="$LIBS `$PKG_CONFIG --libs gnutls`" + libgnutls_present=1 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gnutls_certificate_set_x509_system_trust in -lgnutls" >&5 printf %s "checking for gnutls_certificate_set_x509_system_trust in -lgnutls... " >&6; } if test ${ac_cv_lib_gnutls_gnutls_certificate_set_x509_system_trust+y} then : @@ -9550,30 +9789,31 @@ fi printf "%s\n" "$ac_cv_lib_gnutls_gnutls_certificate_set_x509_system_trust" >&6; } if test "x$ac_cv_lib_gnutls_gnutls_certificate_set_x509_system_trust" = xyes then : - libgnutls_present=1 && - LIBS="$LIBS -lgnutls" + + libgnutls_present=1 && LIBS="$LIBS -lgnutls" fi - fi - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: *** Warning: neither pkg-config nor python is available, disabling gnutls. ***" >&5 + fi + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: *** Warning: neither pkg-config nor python is available, disabling gnutls. ***" >&5 printf "%s\n" "*** Warning: neither pkg-config nor python is available, disabling gnutls. ***" >&6; } - fi + fi - if test "x$gnutls_h_present" = "x1" -a "x$libgnutls_present" = "x1"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GnuTLS library found, SSL support enabled" >&5 + if test "x$gnutls_h_present" = "x1" -a "x$libgnutls_present" = "x1"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GnuTLS library found, SSL support enabled" >&5 printf "%s\n" "GnuTLS library found, SSL support enabled" >&6; } - printf "%s\n" "#define PJ_HAS_SSL_SOCK 1" >>confdefs.h + printf "%s\n" "#define PJ_HAS_SSL_SOCK 1" >>confdefs.h - printf "%s\n" "#define PJ_SSL_SOCK_IMP PJ_SSL_SOCK_IMP_GNUTLS" >>confdefs.h + printf "%s\n" "#define PJ_SSL_SOCK_IMP PJ_SSL_SOCK_IMP_GNUTLS" >>confdefs.h - ac_ssl_backend="gnutls" - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ** No GnuTLS libraries found, disabling SSL support **" >&5 + ac_ssl_backend="gnutls" + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ** No GnuTLS libraries found, disabling SSL support **" >&5 printf "%s\n" "** No GnuTLS libraries found, disabling SSL support **" >&6; } - fi + fi + + fi - fi fi @@ -9626,44 +9866,46 @@ fi if test ${enable_opencore_amr+y} then : enableval=$enable_opencore_amr; - if test "$enable_opencore_amr" = "no"; then - ac_no_opencore_amrnb=1 - ac_no_opencore_amrwb=1 - printf "%s\n" "#define PJMEDIA_HAS_OPENCORE_AMRNB_CODEC 0" >>confdefs.h + if test "$enable_opencore_amr" = "no"; then + ac_no_opencore_amrnb=1 + ac_no_opencore_amrwb=1 + printf "%s\n" "#define PJMEDIA_HAS_OPENCORE_AMRNB_CODEC 0" >>confdefs.h - printf "%s\n" "#define PJMEDIA_HAS_OPENCORE_AMRWB_CODEC 0" >>confdefs.h + printf "%s\n" "#define PJMEDIA_HAS_OPENCORE_AMRWB_CODEC 0" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if OpenCORE AMR support is disabled... yes" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if OpenCORE AMR support is disabled... yes" >&5 printf "%s\n" "Checking if OpenCORE AMR support is disabled... yes" >&6; } - fi + fi else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: checking for OpenCORE AMR installations.." >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: checking for OpenCORE AMR installations.." >&5 printf "%s\n" "checking for OpenCORE AMR installations.." >&6; } - if test "x$with_opencore_amr" != "xno" -a "x$with_opencore_amr" != "x"; then - CFLAGS="$CFLAGS -I$with_opencore_amr/include" - CPPFLAGS="$CPPFLAGS -I$with_opencore_amr/include" - LDFLAGS="$LDFLAGS -L$with_opencore_amr/lib" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using OpenCORE AMR prefix... $with_opencore_amr" >&5 + if test "x$with_opencore_amr" != "xno" -a "x$with_opencore_amr" != "x"; then + CFLAGS="$CFLAGS -I$with_opencore_amr/include" + CPPFLAGS="$CPPFLAGS -I$with_opencore_amr/include" + LDFLAGS="$LDFLAGS -L$with_opencore_amr/lib" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using OpenCORE AMR prefix... $with_opencore_amr" >&5 printf "%s\n" "Using OpenCORE AMR prefix... $with_opencore_amr" >&6; } - fi - if test "x$with_opencore_amrwbenc" != "xno" -a "x$with_opencore_amrwbenc" != "x"; then - CFLAGS="$CFLAGS -I$with_opencore_amrwbenc/include" - CPPFLAGS="$CPPFLAGS -I$with_opencore_amrwbenc/include" - LDFLAGS="$LDFLAGS -L$with_opencore_amrwbenc/lib" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using OpenCORE AMRWB-enc prefix... $with_opencore_amrwbenc" >&5 + fi + + if test "x$with_opencore_amrwbenc" != "xno" -a "x$with_opencore_amrwbenc" != "x"; then + CFLAGS="$CFLAGS -I$with_opencore_amrwbenc/include" + CPPFLAGS="$CPPFLAGS -I$with_opencore_amrwbenc/include" + LDFLAGS="$LDFLAGS -L$with_opencore_amrwbenc/lib" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using OpenCORE AMRWB-enc prefix... $with_opencore_amrwbenc" >&5 printf "%s\n" "Using OpenCORE AMRWB-enc prefix... $with_opencore_amrwbenc" >&6; } - fi + fi + - ac_fn_c_check_header_compile "$LINENO" "opencore-amrnb/interf_enc.h" "ac_cv_header_opencore_amrnb_interf_enc_h" "$ac_includes_default" + ac_fn_c_check_header_compile "$LINENO" "opencore-amrnb/interf_enc.h" "ac_cv_header_opencore_amrnb_interf_enc_h" "$ac_includes_default" if test "x$ac_cv_header_opencore_amrnb_interf_enc_h" = xyes then : opencore_amrnb_h_present=1 fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Encoder_Interface_init in -lopencore-amrnb" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Encoder_Interface_init in -lopencore-amrnb" >&5 printf %s "checking for Encoder_Interface_init in -lopencore-amrnb... " >&6; } if test ${ac_cv_lib_opencore_amrnb_Encoder_Interface_init+y} then : @@ -9700,36 +9942,40 @@ fi printf "%s\n" "$ac_cv_lib_opencore_amrnb_Encoder_Interface_init" >&6; } if test "x$ac_cv_lib_opencore_amrnb_Encoder_Interface_init" = xyes then : - opencore_amrnb_present=1 && LIBS="$LIBS -lopencore-amrnb" + + opencore_amrnb_present=1 && LIBS="$LIBS -lopencore-amrnb" fi - if test "x$opencore_amrnb_h_present" = "x1" -a "x$opencore_amrnb_present" = "x1"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OpenCORE AMR-NB library found, AMR-NB support enabled" >&5 + + if test "x$opencore_amrnb_h_present" = "x1" -a "x$opencore_amrnb_present" = "x1"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OpenCORE AMR-NB library found, AMR-NB support enabled" >&5 printf "%s\n" "OpenCORE AMR-NB library found, AMR-NB support enabled" >&6; } - printf "%s\n" "#define PJMEDIA_HAS_OPENCORE_AMRNB_CODEC 1" >>confdefs.h + printf "%s\n" "#define PJMEDIA_HAS_OPENCORE_AMRNB_CODEC 1" >>confdefs.h + + else + ac_no_opencore_amrnb=1 + printf "%s\n" "#define PJMEDIA_HAS_OPENCORE_AMRNB_CODEC 0" >>confdefs.h - else - ac_no_opencore_amrnb=1 - printf "%s\n" "#define PJMEDIA_HAS_OPENCORE_AMRNB_CODEC 0" >>confdefs.h + fi - fi - ac_fn_c_check_header_compile "$LINENO" "vo-amrwbenc/enc_if.h" "ac_cv_header_vo_amrwbenc_enc_if_h" "$ac_includes_default" + ac_fn_c_check_header_compile "$LINENO" "vo-amrwbenc/enc_if.h" "ac_cv_header_vo_amrwbenc_enc_if_h" "$ac_includes_default" if test "x$ac_cv_header_vo_amrwbenc_enc_if_h" = xyes then : opencore_amrwb_enc_h_present=1 fi - ac_fn_c_check_header_compile "$LINENO" "opencore-amrwb/dec_if.h" "ac_cv_header_opencore_amrwb_dec_if_h" "$ac_includes_default" + ac_fn_c_check_header_compile "$LINENO" "opencore-amrwb/dec_if.h" "ac_cv_header_opencore_amrwb_dec_if_h" "$ac_includes_default" if test "x$ac_cv_header_opencore_amrwb_dec_if_h" = xyes then : opencore_amrwb_dec_h_present=1 fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for D_IF_init in -lopencore-amrwb" >&5 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for D_IF_init in -lopencore-amrwb" >&5 printf %s "checking for D_IF_init in -lopencore-amrwb... " >&6; } if test ${ac_cv_lib_opencore_amrwb_D_IF_init+y} then : @@ -9766,10 +10012,12 @@ fi printf "%s\n" "$ac_cv_lib_opencore_amrwb_D_IF_init" >&6; } if test "x$ac_cv_lib_opencore_amrwb_D_IF_init" = xyes then : - opencore_amrwb_dec_present=1 && LIBS="$LIBS -lopencore-amrwb" + + opencore_amrwb_dec_present=1 && LIBS="$LIBS -lopencore-amrwb" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for E_IF_init in -lvo-amrwbenc" >&5 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for E_IF_init in -lvo-amrwbenc" >&5 printf %s "checking for E_IF_init in -lvo-amrwbenc... " >&6; } if test ${ac_cv_lib_vo_amrwbenc_E_IF_init+y} then : @@ -9806,19 +10054,21 @@ fi printf "%s\n" "$ac_cv_lib_vo_amrwbenc_E_IF_init" >&6; } if test "x$ac_cv_lib_vo_amrwbenc_E_IF_init" = xyes then : - opencore_amrwb_enc_present=1 && LIBS="$LIBS -lvo-amrwbenc" + + opencore_amrwb_enc_present=1 && LIBS="$LIBS -lvo-amrwbenc" fi - if test "x$opencore_amrwb_enc_h_present" = "x1" -a "x$opencore_amrwb_dec_h_present" = "x1" -a "x$opencore_amrwb_enc_present" = "x1" -a "x$opencore_amrwb_dec_present" = "x1"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OpenCORE AMR-WB library found, AMR-WB support enabled" >&5 + + if test "x$opencore_amrwb_enc_h_present" = "x1" -a "x$opencore_amrwb_dec_h_present" = "x1" -a "x$opencore_amrwb_enc_present" = "x1" -a "x$opencore_amrwb_dec_present" = "x1"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OpenCORE AMR-WB library found, AMR-WB support enabled" >&5 printf "%s\n" "OpenCORE AMR-WB library found, AMR-WB support enabled" >&6; } - printf "%s\n" "#define PJMEDIA_HAS_OPENCORE_AMRWB_CODEC 1" >>confdefs.h + printf "%s\n" "#define PJMEDIA_HAS_OPENCORE_AMRWB_CODEC 1" >>confdefs.h - else - ac_no_opencore_amrwb=1 - printf "%s\n" "#define PJMEDIA_HAS_OPENCORE_AMRWB_CODEC 0" >>confdefs.h + else + ac_no_opencore_amrwb=1 + printf "%s\n" "#define PJMEDIA_HAS_OPENCORE_AMRWB_CODEC 0" >>confdefs.h - fi + fi fi @@ -9844,34 +10094,35 @@ fi if test ${enable_silk+y} then : enableval=$enable_silk; - if test "$enable_silk" = "no"; then - ac_no_silk=1 - printf "%s\n" "#define PJMEDIA_HAS_SILK_CODEC 0" >>confdefs.h + if test "$enable_silk" = "no"; then + ac_no_silk=1 + printf "%s\n" "#define PJMEDIA_HAS_SILK_CODEC 0" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if SILK support is disabled... yes" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if SILK support is disabled... yes" >&5 printf "%s\n" "Checking if SILK support is disabled... yes" >&6; } - fi + fi else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: checking for SILK installations.." >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: checking for SILK installations.." >&5 printf "%s\n" "checking for SILK installations.." >&6; } - if test "x$with_silk" != "xno" -a "x$with_silk" != "x"; then - CFLAGS="$CFLAGS -I$with_silk/interface" - CPPFLAGS="$CPPFLAGS -I$with_silk/interface" - LDFLAGS="$LDFLAGS -L$with_silk" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using SILK prefix... $with_silk" >&5 + if test "x$with_silk" != "xno" -a "x$with_silk" != "x"; then + CFLAGS="$CFLAGS -I$with_silk/interface" + CPPFLAGS="$CPPFLAGS -I$with_silk/interface" + LDFLAGS="$LDFLAGS -L$with_silk" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using SILK prefix... $with_silk" >&5 printf "%s\n" "Using SILK prefix... $with_silk" >&6; } - fi + fi + - ac_fn_c_check_header_compile "$LINENO" "SKP_Silk_SDK_API.h" "ac_cv_header_SKP_Silk_SDK_API_h" "$ac_includes_default" + ac_fn_c_check_header_compile "$LINENO" "SKP_Silk_SDK_API.h" "ac_cv_header_SKP_Silk_SDK_API_h" "$ac_includes_default" if test "x$ac_cv_header_SKP_Silk_SDK_API_h" = xyes then : silk_h_present=1 fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SKP_Silk_SDK_get_version in -lSKP_SILK_SDK" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SKP_Silk_SDK_get_version in -lSKP_SILK_SDK" >&5 printf %s "checking for SKP_Silk_SDK_get_version in -lSKP_SILK_SDK... " >&6; } if test ${ac_cv_lib_SKP_SILK_SDK_SKP_Silk_SDK_get_version+y} then : @@ -9908,19 +10159,22 @@ fi printf "%s\n" "$ac_cv_lib_SKP_SILK_SDK_SKP_Silk_SDK_get_version" >&6; } if test "x$ac_cv_lib_SKP_SILK_SDK_SKP_Silk_SDK_get_version" = xyes then : - silk_present=1 && LIBS="$LIBS -lSKP_SILK_SDK" + + silk_present=1 && LIBS="$LIBS -lSKP_SILK_SDK" fi - if test "x$silk_h_present" = "x1" -a "x$silk_present" = "x1"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: SILK library found, SILK support enabled" >&5 + + if test "x$silk_h_present" = "x1" -a "x$silk_present" = "x1"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: SILK library found, SILK support enabled" >&5 printf "%s\n" "SILK library found, SILK support enabled" >&6; } - printf "%s\n" "#define PJMEDIA_HAS_SILK_CODEC 1" >>confdefs.h + printf "%s\n" "#define PJMEDIA_HAS_SILK_CODEC 1" >>confdefs.h - else - ac_no_silk=1 - printf "%s\n" "#define PJMEDIA_HAS_SILK_CODEC 0" >>confdefs.h + else + ac_no_silk=1 + printf "%s\n" "#define PJMEDIA_HAS_SILK_CODEC 0" >>confdefs.h + + fi - fi fi @@ -9945,34 +10199,34 @@ fi if test ${enable_opus+y} then : enableval=$enable_opus; - if test "$enable_opus" = "no"; then - ac_no_opus=1 - printf "%s\n" "#define PJMEDIA_HAS_OPUS_CODEC 0" >>confdefs.h + if test "$enable_opus" = "no"; then + ac_no_opus=1 + printf "%s\n" "#define PJMEDIA_HAS_OPUS_CODEC 0" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if OPUS support is disabled... yes" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if OPUS support is disabled... yes" >&5 printf "%s\n" "Checking if OPUS support is disabled... yes" >&6; } - fi + fi else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: checking for OPUS installations.." >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: checking for OPUS installations.." >&5 printf "%s\n" "checking for OPUS installations.." >&6; } - if test "x$with_opus" != "xno" -a "x$with_opus" != "x"; then - CFLAGS="$CFLAGS -I$with_opus/include" - CPPFLAGS="$CPPFLAGS -I$with_opus/include" - LDFLAGS="$LDFLAGS -L$with_opus/lib" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using OPUS prefix... $with_opus" >&5 + if test "x$with_opus" != "xno" -a "x$with_opus" != "x"; then + CFLAGS="$CFLAGS -I$with_opus/include" + CPPFLAGS="$CPPFLAGS -I$with_opus/include" + LDFLAGS="$LDFLAGS -L$with_opus/lib" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using OPUS prefix... $with_opus" >&5 printf "%s\n" "Using OPUS prefix... $with_opus" >&6; } - fi + fi - ac_fn_c_check_header_compile "$LINENO" "opus/opus.h" "ac_cv_header_opus_opus_h" "$ac_includes_default" + ac_fn_c_check_header_compile "$LINENO" "opus/opus.h" "ac_cv_header_opus_opus_h" "$ac_includes_default" if test "x$ac_cv_header_opus_opus_h" = xyes then : opus_h_present=1 fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for opus_repacketizer_get_size in -lopus" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for opus_repacketizer_get_size in -lopus" >&5 printf %s "checking for opus_repacketizer_get_size in -lopus... " >&6; } if test ${ac_cv_lib_opus_opus_repacketizer_get_size+y} then : @@ -10009,21 +10263,24 @@ fi printf "%s\n" "$ac_cv_lib_opus_opus_repacketizer_get_size" >&6; } if test "x$ac_cv_lib_opus_opus_repacketizer_get_size" = xyes then : - opus_present=1 && LIBS="-lopus $LIBS" + + opus_present=1 && LIBS="-lopus $LIBS" fi - if test "x$opus_h_present" = "x1" -a "x$opus_present" = "x1"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OPUS library found, OPUS support enabled" >&5 + + if test "x$opus_h_present" = "x1" -a "x$opus_present" = "x1"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OPUS library found, OPUS support enabled" >&5 printf "%s\n" "OPUS library found, OPUS support enabled" >&6; } - printf "%s\n" "#define PJMEDIA_HAS_OPUS_CODEC 1" >>confdefs.h + printf "%s\n" "#define PJMEDIA_HAS_OPUS_CODEC 1" >>confdefs.h - else - ac_no_opus=1 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OPUS library not found, OPUS support disabled" >&5 + else + ac_no_opus=1 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OPUS library not found, OPUS support disabled" >&5 printf "%s\n" "OPUS library not found, OPUS support disabled" >&6; } - printf "%s\n" "#define PJMEDIA_HAS_OPUS_CODEC 0" >>confdefs.h + printf "%s\n" "#define PJMEDIA_HAS_OPUS_CODEC 0" >>confdefs.h + + fi - fi fi @@ -10048,73 +10305,75 @@ fi if test ${enable_bcg729+y} then : enableval=$enable_bcg729; - if test "$enable_bcg729" = "no"; then - ac_no_bcg729=1 - printf "%s\n" "#define PJMEDIA_HAS_BCG729 0" >>confdefs.h + if test "$enable_bcg729" = "no"; then + ac_no_bcg729=1 + printf "%s\n" "#define PJMEDIA_HAS_BCG729 0" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if bcg729 is disabled... yes" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if bcg729 is disabled... yes" >&5 printf "%s\n" "Checking if bcg729 is disabled... yes" >&6; } - fi + fi else $as_nop - if test "x$with_bcg729" != "xno" -a "x$with_bcg729" != "x"; then - BCG729_PREFIX=$with_bcg729 - BCG729_CFLAGS="-I$BCG729_PREFIX/include" - BCG729_LDFLAGS="-L$BCG729_PREFIX/lib" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using bcg729 prefix... $with_bcg729" >&5 + if test "x$with_bcg729" != "xno" -a "x$with_bcg729" != "x"; then + BCG729_PREFIX=$with_bcg729 + BCG729_CFLAGS="-I$BCG729_PREFIX/include" + BCG729_LDFLAGS="-L$BCG729_PREFIX/lib" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using bcg729 prefix... $with_bcg729" >&5 printf "%s\n" "Using bcg729 prefix... $with_bcg729" >&6; } - else - BCG729_CFLAGS="" - BCG729_LDFLAGS="" - fi + else + BCG729_CFLAGS="" + BCG729_LDFLAGS="" + fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking bcg729 usability" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking bcg729 usability" >&5 printf %s "checking bcg729 usability... " >&6; } - BCG729_LIBS="-lbcg729" + BCG729_LIBS="-lbcg729" - SAVED_LIBS="$LIBS" - SAVED_LDFLAGS="$LDFLAGS" - SAVED_CFLAGS="$CFLAGS" + SAVED_LIBS="$LIBS" + SAVED_LDFLAGS="$LDFLAGS" + SAVED_CFLAGS="$CFLAGS" - LIBS="$BCG729_LIBS $LIBS" - LDFLAGS="$BCG729_LDFLAGS $LDFLAGS" - CFLAGS="$BCG729_CFLAGS $CFLAGS" + LIBS="$BCG729_LIBS $LIBS" + LDFLAGS="$BCG729_LDFLAGS $LDFLAGS" + CFLAGS="$BCG729_CFLAGS $CFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include + + #include + #include int main (void) { initBcg729EncoderChannel(0); - ; return 0; } + _ACEOF if ac_fn_c_try_link "$LINENO" then : - printf "%s\n" "#define PJMEDIA_HAS_BCG729 1" >>confdefs.h + printf "%s\n" "#define PJMEDIA_HAS_BCG729 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else $as_nop - ac_no_bcg729=1 - printf "%s\n" "#define PJMEDIA_HAS_BCG729 0" >>confdefs.h + ac_no_bcg729=1 + printf "%s\n" "#define PJMEDIA_HAS_BCG729 0" >>confdefs.h - LIBS="$SAVED_LIBS" - LDFLAGS="$SAVED_LDFLAGS" - CFLAGS="$SAVED_CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + LIBS="$SAVED_LIBS" + LDFLAGS="$SAVED_LDFLAGS" + CFLAGS="$SAVED_CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } + fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -10144,131 +10403,136 @@ fi if test ${enable_lyra+y} then : enableval=$enable_lyra; - if test "$enable_lyra" = "no"; then - ac_no_lyra_codec=1 - printf "%s\n" "#define PJMEDIA_HAS_LYRA_CODEC 0" >>confdefs.h + if test "$enable_lyra" = "no"; then + ac_no_lyra_codec=1 + printf "%s\n" "#define PJMEDIA_HAS_LYRA_CODEC 0" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if lyra is disabled... yes" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if lyra is disabled... yes" >&5 printf "%s\n" "Checking if lyra is disabled... yes" >&6; } - fi + fi else $as_nop - if test "x$with_lyra" != "xno" -a "x$with_lyra" != "x"; then - LYRA_PREFIX=$with_lyra - LYRA_CPPFLAGS="-DGLOG_DEPRECATED=__attribute__((deprecated)) -DGLOG_EXPORT=__attribute__((visibility(\"default\"))) -DGLOG_NO_EXPORT=__attribute__((visibility(\"default\")))" - LYRA_CXXFLAGS="-std=c++17 -Wno-deprecated-builtins -I$LYRA_PREFIX/include/com_google_absl -I$LYRA_PREFIX/include/gulrak_filesystem -I$LYRA_PREFIX/include/com_google_glog/src -I$LYRA_PREFIX" - LYRA_LDFLAGS="-L$LYRA_PREFIX/lib" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using lyra prefix... $with_lyra" >&5 + if test "x$with_lyra" != "xno" -a "x$with_lyra" != "x"; then + LYRA_PREFIX=$with_lyra + LYRA_CPPFLAGS="-DGLOG_DEPRECATED=__attribute__((deprecated)) -DGLOG_EXPORT=__attribute__((visibility(\"default\"))) -DGLOG_NO_EXPORT=__attribute__((visibility(\"default\")))" + LYRA_CXXFLAGS="-std=c++17 -Wno-deprecated-builtins -I$LYRA_PREFIX/include/com_google_absl -I$LYRA_PREFIX/include/gulrak_filesystem -I$LYRA_PREFIX/include/com_google_glog/src -I$LYRA_PREFIX" + LYRA_LDFLAGS="-L$LYRA_PREFIX/lib" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using lyra prefix... $with_lyra" >&5 printf "%s\n" "Using lyra prefix... $with_lyra" >&6; } - else - LYRA_CXXFLAGS="" - LYRA_LDFLAGS="" - fi + else + LYRA_CXXFLAGS="" + LYRA_LDFLAGS="" + fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking lyra usability" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking lyra usability" >&5 printf %s "checking lyra usability... " >&6; } - LYRA_LIBS="-llyra" + LYRA_LIBS="-llyra" - SAVED_LIBS="$LIBS" - SAVED_LDFLAGS="$LDFLAGS" - SAVED_CXXFLAGS="$CXXFLAGS" - SAVED_CPPFLAGS="$CPPFLAGS" + SAVED_LIBS="$LIBS" + SAVED_LDFLAGS="$LDFLAGS" + SAVED_CXXFLAGS="$CXXFLAGS" + SAVED_CPPFLAGS="$CPPFLAGS" - LIBS="$LYRA_LIBS $LIBS" - LDFLAGS="$LYRA_LDFLAGS $LDFLAGS" - CXXFLAGS="$LYRA_CXXFLAGS $CXXFLAGS" - CPPFLAGS="$LYRA_CPPFLAGS $CPPFLAGS" + LIBS="$LYRA_LIBS $LIBS" + LDFLAGS="$LYRA_LDFLAGS $LDFLAGS" + CXXFLAGS="$LYRA_CXXFLAGS $CXXFLAGS" + CPPFLAGS="$LYRA_CPPFLAGS $CPPFLAGS" - ac_ext=cpp + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include "lyra_decoder.h" + + #include "lyra_decoder.h" int main (void) { std::unique_ptr dec = chromemedia::codec::LyraDecoder::Create(8000,1,""); - ; return 0; } + _ACEOF if ac_fn_cxx_try_link "$LINENO" then : - ac_lyra_model_path="$LYRA_PREFIX/model_coeffs" - printf "%s\n" "#define PJMEDIA_HAS_LYRA_CODEC 1" >>confdefs.h + ac_lyra_model_path="$LYRA_PREFIX/model_coeffs" + printf "%s\n" "#define PJMEDIA_HAS_LYRA_CODEC 1" >>confdefs.h - LYRA_CPPFLAGS="'-DGLOG_DEPRECATED=__attribute__((deprecated))' '-DGLOG_EXPORT=__attribute__((visibility(\"default\")))' '-DGLOG_NO_EXPORT=__attribute__((visibility(\"default\")))'" - CXXFLAGS="$LYRA_CPPFLAGS $CXXFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + LYRA_CPPFLAGS="'-DGLOG_DEPRECATED=__attribute__((deprecated))' '-DGLOG_EXPORT=__attribute__((visibility(\"default\")))' '-DGLOG_NO_EXPORT=__attribute__((visibility(\"default\")))'" + CXXFLAGS="$LYRA_CPPFLAGS $CXXFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else $as_nop - ac_no_lyra_codec=1 - LIBS="$SAVED_LIBS" - LDFLAGS="$SAVED_LDFLAGS" - CXXFLAGS="$SAVED_CXXFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + ac_no_lyra_codec=1 + LIBS="$SAVED_LIBS" + LDFLAGS="$SAVED_LDFLAGS" + CXXFLAGS="$SAVED_CXXFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } + fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - ac_ext=c + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - CPPFLAGS="$SAVED_CPPFLAGS" - -fi + CPPFLAGS="$SAVED_CPPFLAGS" +fi # Check whether --enable-libsrtp was given. if test ${enable_libsrtp+y} then : - enableval=$enable_libsrtp; if test "$enable_libsrtp" = "no"; then - ac_no_srtp=1 - CFLAGS="$CFLAGS -DPJMEDIA_HAS_SRTP=0" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if libsrtp is disabled...yes" >&5 + enableval=$enable_libsrtp; + if test "$enable_libsrtp" = "no"; then + ac_no_srtp=1 + CFLAGS="$CFLAGS -DPJMEDIA_HAS_SRTP=0" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if libsrtp is disabled...yes" >&5 printf "%s\n" "Checking if libsrtp is disabled...yes" >&6; } - fi + fi + else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if libsrtp is disabled...no" >&5 printf "%s\n" "Checking if libsrtp is disabled...no" >&6; } -fi +fi # Check whether --enable-libyuv was given. if test ${enable_libyuv+y} then : - enableval=$enable_libyuv; if test "$enable_libyuv" = "no"; then - ac_no_yuv=1 - printf "%s\n" "#define PJMEDIA_HAS_LIBYUV 0" >>confdefs.h + enableval=$enable_libyuv; + if test "$enable_libyuv" = "no"; then + ac_no_yuv=1 + printf "%s\n" "#define PJMEDIA_HAS_LIBYUV 0" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if libyuv is disabled...yes" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if libyuv is disabled...yes" >&5 printf "%s\n" "Checking if libyuv is disabled...yes" >&6; } - fi + fi + else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if libyuv is disabled...no" >&5 printf "%s\n" "Checking if libyuv is disabled...no" >&6; } -fi +fi @@ -10278,82 +10542,85 @@ fi # Check whether --enable-libwebrtc was given. if test ${enable_libwebrtc+y} then : - enableval=$enable_libwebrtc; if test "$enable_libwebrtc" = "no"; then - ac_no_webrtc=1 - printf "%s\n" "#define PJMEDIA_HAS_LIBWEBRTC 0" >>confdefs.h + enableval=$enable_libwebrtc; + if test "$enable_libwebrtc" = "no"; then + ac_no_webrtc=1 + printf "%s\n" "#define PJMEDIA_HAS_LIBWEBRTC 0" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if libwebrtc is disabled...yes" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if libwebrtc is disabled...yes" >&5 printf "%s\n" "Checking if libwebrtc is disabled...yes" >&6; } - fi + fi + else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if libwebrtc is disabled...no" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if libwebrtc is disabled...no" >&5 printf "%s\n" "Checking if libwebrtc is disabled...no" >&6; } - case $target in - *-apple-darwin_ios*) - case $target in - arm64*) - ac_webrtc_instset=neon - ac_webrtc_cflags="-DWEBRTC_ARCH_ARM64" - ;; - *arm*) - ac_webrtc_instset=neon - ;; - *) - ac_webrtc_instset=sse2 - ;; - esac - ;; - *android*) - case $TARGET_ABI in - armeabi-v7a) - ac_webrtc_instset=neon - ac_webrtc_cflags="-mfloat-abi=softfp -mfpu=neon" - ;; - armeabi) - ac_webrtc_instset=neon - ac_webrtc_cflags="-mthumb -mfloat-abi=softfp -mfpu=neon -march=armv7" - ;; - arm64*) - ac_webrtc_instset=neon - ac_webrtc_cflags="-DWEBRTC_ARCH_ARM64" - ;; - mips64*) - ac_webrtc_instset=generic - ;; - mips*) - ac_webrtc_instset=mips - ;; - x86*) - ac_webrtc_instset=sse2 - ;; - *) - ac_webrtc_instset=generic - ;; - esac - ;; - *mingw* | *cygw*) - ac_webrtc_instset=sse2 - ac_webrtc_cflags="-msse2" - ;; - *win32* | *w32* | *darwin* | *linux*) - case $target in - armv7l*gnueabihf) - ac_webrtc_instset=neon - ac_webrtc_cflags="-DWEBRTC_ARCH_ARM_V7 -mfloat-abi=hard -mfpu=neon" - ;; - arm-apple-darwin* | aarch64*) - ac_webrtc_instset=neon - ac_webrtc_cflags="-DWEBRTC_ARCH_ARM64" - ;; - *) - ac_webrtc_instset=sse2 - ;; - esac - ;; - *) - ;; - esac + case $target in + *-apple-darwin_ios*) + case $target in + arm64*) + ac_webrtc_instset=neon + ac_webrtc_cflags="-DWEBRTC_ARCH_ARM64" + ;; + *arm*) + ac_webrtc_instset=neon + ;; + *) + ac_webrtc_instset=sse2 + ;; + esac + ;; + *android*) + case $TARGET_ABI in + armeabi-v7a) + ac_webrtc_instset=neon + ac_webrtc_cflags="-mfloat-abi=softfp -mfpu=neon" + ;; + armeabi) + ac_webrtc_instset=neon + ac_webrtc_cflags="-mthumb -mfloat-abi=softfp -mfpu=neon -march=armv7" + ;; + arm64*) + ac_webrtc_instset=neon + ac_webrtc_cflags="-DWEBRTC_ARCH_ARM64" + ;; + mips64*) + ac_webrtc_instset=generic + ;; + mips*) + ac_webrtc_instset=mips + ;; + x86*) + ac_webrtc_instset=sse2 + ;; + *) + ac_webrtc_instset=generic + ;; + esac + ;; + *mingw* | *cygw*) + ac_webrtc_instset=sse2 + ac_webrtc_cflags="-msse2" + ;; + *win32* | *w32* | *darwin* | *linux*) + case $target in + armv7l*gnueabihf) + ac_webrtc_instset=neon + ac_webrtc_cflags="-DWEBRTC_ARCH_ARM_V7 -mfloat-abi=hard -mfpu=neon" + ;; + arm-apple-darwin* | aarch64*) + ac_webrtc_instset=neon + ac_webrtc_cflags="-DWEBRTC_ARCH_ARM64" + ;; + *) + ac_webrtc_instset=sse2 + ;; + esac + ;; + *) + ;; + esac + fi @@ -10367,23 +10634,24 @@ fi if test ${enable_libwebrtc_aec3+y} then : enableval=$enable_libwebrtc_aec3; - if test "$enable_libwebrtc_aec3" = "yes"; then - # Test if we can build WebRtc AEC3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if WebRtc AEC3 can be compiled with C++17" >&5 + if test "$enable_libwebrtc_aec3" = "yes"; then + # Test if we can build WebRtc AEC3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if WebRtc AEC3 can be compiled with C++17" >&5 printf %s "checking if WebRtc AEC3 can be compiled with C++17... " >&6; } - SAVED_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -std=c++17" + SAVED_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS -std=c++17" - ac_ext=cpp + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + int main (void) { @@ -10391,113 +10659,120 @@ main (void) ; return 0; } + _ACEOF if ac_fn_cxx_try_link "$LINENO" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } - LD="$CXX" + LD="$CXX" + else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - CXXFLAGS="$SAVED_CXXFLAGS" - ac_no_webrtc_aec3=1 - printf "%s\n" "#define PJMEDIA_HAS_LIBWEBRTC_AEC3 0" >>confdefs.h + CXXFLAGS="$SAVED_CXXFLAGS" + ac_no_webrtc_aec3=1 + printf "%s\n" "#define PJMEDIA_HAS_LIBWEBRTC_AEC3 0" >>confdefs.h + + fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - ac_ext=c + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - case $target in - *-apple-darwin_ios*) - case $target in - arm64*) - ac_webrtc_aec3_instset=neon - ac_webrtc_aec3_cflags="-DWEBRTC_ARCH_ARM64" - ;; - *arm*) - ac_webrtc_aec3_instset=neon - ;; - *) - ac_webrtc_aec3_instset=sse2 - ;; - esac - ac_webrtc_aec3_cflags+=" -DWEBRTC_IOS=1" - ;; - *android*) - case $TARGET_ABI in - armeabi-v7a) - ac_webrtc_aec3_instset=neon - ac_webrtc_aec3_cflags="-mfloat-abi=softfp -mfpu=neon" - ;; - armeabi) - ac_webrtc_aec3_instset=neon - ac_webrtc_aec3_cflags="-mthumb -mfloat-abi=softfp -mfpu=neon -march=armv7" - ;; - arm64*) - ac_webrtc_aec3_instset=neon - ac_webrtc_aec3_cflags="-DWEBRTC_ARCH_ARM64" - ;; - x86*) - ac_webrtc_aec3_instset=sse2 - ;; - esac - ac_webrtc_aec3_cflags+=" -DWEBRTC_ANDROID=1" - ;; - *mingw* | *cygw*) - ac_webrtc_aec3_instset=sse2 - ac_webrtc_aec3_cflags="-msse2" - ;; - *win32* | *w32* | *darwin* | *linux*) - case $target in - armv7l*gnueabihf) - ac_webrtc_aec3_instset=neon - ac_webrtc_aec3_cflags="-DWEBRTC_ARCH_ARM_V7 -mfloat-abi=hard -mfpu=neon" - ;; - arm-apple-darwin* | aarch64*) - ac_webrtc_aec3_instset=neon - ac_webrtc_aec3_cflags="-DWEBRTC_ARCH_ARM64" - ;; - *) - ac_webrtc_aec3_instset=sse2 - ;; - esac - case $target in - *darwin*) - ac_webrtc_aec3_cflags+=" -DWEBRTC_MAC=1" - ;; - *linux*) - ac_webrtc_aec3_cflags+=" -DWEBRTC_LINUX=1" - ;; - esac - ;; - *) - ;; - esac - ac_webrtc_aec3_cflags+=" -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_POSIX=1" - else - ac_no_webrtc_aec3=1 - printf "%s\n" "#define PJMEDIA_HAS_LIBWEBRTC_AEC3 0" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if libwebrtc-aec3 is enabled...no" >&5 + case $target in + *-apple-darwin_ios*) + case $target in + arm64*) + ac_webrtc_aec3_instset=neon + ac_webrtc_aec3_cflags="-DWEBRTC_ARCH_ARM64" + ;; + *arm*) + ac_webrtc_aec3_instset=neon + ;; + *) + ac_webrtc_aec3_instset=sse2 + ;; + esac + ac_webrtc_aec3_cflags+=" -DWEBRTC_IOS=1" + ;; + *android*) + case $TARGET_ABI in + armeabi-v7a) + ac_webrtc_aec3_instset=neon + ac_webrtc_aec3_cflags="-mfloat-abi=softfp -mfpu=neon" + ;; + armeabi) + ac_webrtc_aec3_instset=neon + ac_webrtc_aec3_cflags="-mthumb -mfloat-abi=softfp -mfpu=neon -march=armv7" + ;; + arm64*) + ac_webrtc_aec3_instset=neon + ac_webrtc_aec3_cflags="-DWEBRTC_ARCH_ARM64" + ;; + x86*) + ac_webrtc_aec3_instset=sse2 + ;; + esac + ac_webrtc_aec3_cflags+=" -DWEBRTC_ANDROID=1" + ;; + *mingw* | *cygw*) + ac_webrtc_aec3_instset=sse2 + ac_webrtc_aec3_cflags="-msse2" + ;; + *win32* | *w32* | *darwin* | *linux*) + case $target in + armv7l*gnueabihf) + ac_webrtc_aec3_instset=neon + ac_webrtc_aec3_cflags="-DWEBRTC_ARCH_ARM_V7 -mfloat-abi=hard -mfpu=neon" + ;; + arm-apple-darwin* | aarch64*) + ac_webrtc_aec3_instset=neon + ac_webrtc_aec3_cflags="-DWEBRTC_ARCH_ARM64" + ;; + *) + ac_webrtc_aec3_instset=sse2 + ;; + esac + case $target in + *darwin*) + ac_webrtc_aec3_cflags+=" -DWEBRTC_MAC=1" + ;; + *linux*) + ac_webrtc_aec3_cflags+=" -DWEBRTC_LINUX=1" + ;; + esac + ;; + *) + ;; + esac + ac_webrtc_aec3_cflags+=" -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_POSIX=1" + else + ac_no_webrtc_aec3=1 + printf "%s\n" "#define PJMEDIA_HAS_LIBWEBRTC_AEC3 0" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if libwebrtc-aec3 is enabled...no" >&5 printf "%s\n" "Checking if libwebrtc-aec3 is enabled...no" >&6; } - fi + fi else $as_nop - ac_no_webrtc_aec3=1 - printf "%s\n" "#define PJMEDIA_HAS_LIBWEBRTC_AEC3 0" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if libwebrtc-aec3 is enabled...no" >&5 + ac_no_webrtc_aec3=1 + printf "%s\n" "#define PJMEDIA_HAS_LIBWEBRTC_AEC3 0" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Checking if libwebrtc-aec3 is enabled...no" >&5 printf "%s\n" "Checking if libwebrtc-aec3 is enabled...no" >&6; } -fi +fi @@ -10505,99 +10780,107 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if select() needs correct nfds" >&5 printf %s "checking if select() needs correct nfds... " >&6; } case $target in - *rtems*) printf "%s\n" "#define PJ_SELECT_NEEDS_NFDS 1" >>confdefs.h + *rtems*) + printf "%s\n" "#define PJ_SELECT_NEEDS_NFDS 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } - ;; - *) printf "%s\n" "#define PJ_SELECT_NEEDS_NFDS 0" >>confdefs.h + ;; + *) + printf "%s\n" "#define PJ_SELECT_NEEDS_NFDS 0" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (default)" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (default)" >&5 printf "%s\n" "no (default)" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ** Decided that select() doesn't need correct nfds (please check)" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ** Decided that select() doesn't need correct nfds (please check)" >&5 printf "%s\n" "** Decided that select() doesn't need correct nfds (please check)" >&6; } - ;; + ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if pj_thread_create() should enforce stack size" >&5 printf %s "checking if pj_thread_create() should enforce stack size... " >&6; } case $target in - *rtems*) printf "%s\n" "#define PJ_THREAD_SET_STACK_SIZE 1" >>confdefs.h + *rtems*) + printf "%s\n" "#define PJ_THREAD_SET_STACK_SIZE 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } - ;; - *) printf "%s\n" "#define PJ_THREAD_SET_STACK_SIZE 0" >>confdefs.h + ;; + *) + printf "%s\n" "#define PJ_THREAD_SET_STACK_SIZE 0" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (default)" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (default)" >&5 printf "%s\n" "no (default)" >&6; } - ;; + ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if pj_thread_create() should allocate stack" >&5 printf %s "checking if pj_thread_create() should allocate stack... " >&6; } case $target in - *rtems*) printf "%s\n" "#define PJ_THREAD_ALLOCATE_STACK 1" >>confdefs.h + *rtems*) + printf "%s\n" "#define PJ_THREAD_ALLOCATE_STACK 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } - ;; - *) printf "%s\n" "#define PJ_THREAD_ALLOCATE_STACK 0" >>confdefs.h + ;; + *) + printf "%s\n" "#define PJ_THREAD_ALLOCATE_STACK 0" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (default)" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (default)" >&5 printf "%s\n" "no (default)" >&6; } - ;; + ;; esac case $target in - *mingw* | *cygw* | *win32* | *w32* ) - printf "%s\n" "#define PJ_BLOCKING_ERROR_VAL WSAEWOULDBLOCK" >>confdefs.h + *mingw* | *cygw* | *win32* | *w32* ) + printf "%s\n" "#define PJ_BLOCKING_ERROR_VAL WSAEWOULDBLOCK" >>confdefs.h - ;; - *) printf "%s\n" "#define PJ_BLOCKING_ERROR_VAL EAGAIN" >>confdefs.h + ;; + *) + printf "%s\n" "#define PJ_BLOCKING_ERROR_VAL EAGAIN" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ** Setting non-blocking recv() retval to EAGAIN (please check)" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ** Setting non-blocking recv() retval to EAGAIN (please check)" >&5 printf "%s\n" "** Setting non-blocking recv() retval to EAGAIN (please check)" >&6; } - ;; + ;; esac case $target in - *mingw* | *cygw* | *win32* | *w32* ) - printf "%s\n" "#define PJ_BLOCKING_CONNECT_ERROR_VAL WSAEWOULDBLOCK" >>confdefs.h + *mingw* | *cygw* | *win32* | *w32* ) + printf "%s\n" "#define PJ_BLOCKING_CONNECT_ERROR_VAL WSAEWOULDBLOCK" >>confdefs.h - ;; - *) printf "%s\n" "#define PJ_BLOCKING_CONNECT_ERROR_VAL EINPROGRESS" >>confdefs.h + ;; + *) + printf "%s\n" "#define PJ_BLOCKING_CONNECT_ERROR_VAL EINPROGRESS" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ** Setting non-blocking connect() retval to EINPROGRESS (please check)" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ** Setting non-blocking connect() retval to EINPROGRESS (please check)" >&5 printf "%s\n" "** Setting non-blocking connect() retval to EINPROGRESS (please check)" >&6; } - ;; + ;; esac case $target in - *linux* | *darwin* | *bsd*) - ac_fn_c_check_header_compile "$LINENO" "pthread_np.h" "ac_cv_header_pthread_np_h" "$ac_includes_default" + *linux* | *darwin* | *bsd*) + ac_fn_c_check_header_compile "$LINENO" "pthread_np.h" "ac_cv_header_pthread_np_h" "$ac_includes_default" if test "x$ac_cv_header_pthread_np_h" = xyes then : printf "%s\n" "#define PJ_HAS_PTHREAD_NP_H 1" >>confdefs.h fi - ac_fn_c_check_func "$LINENO" "pthread_setname_np" "ac_cv_func_pthread_setname_np" + ac_fn_c_check_func "$LINENO" "pthread_setname_np" "ac_cv_func_pthread_setname_np" if test "x$ac_cv_func_pthread_setname_np" = xyes then : printf "%s\n" "#define PJ_HAS_PTHREAD_SETNAME_NP 1" >>confdefs.h fi - ac_fn_c_check_func "$LINENO" "pthread_set_name_np" "ac_cv_func_pthread_set_name_np" + ac_fn_c_check_func "$LINENO" "pthread_set_name_np" "ac_cv_func_pthread_set_name_np" if test "x$ac_cv_func_pthread_set_name_np" = xyes then : printf "%s\n" "#define PJ_HAS_PTHREAD_SET_NAME_NP 1" >>confdefs.h fi - ;; + ;; esac @@ -10606,12 +10889,12 @@ ac_host=unix case $target in - *rtems*) - ac_main_obj=main_rtems.o - ;; - *) - ac_main_obj=main.o - ;; + *rtems*) + ac_main_obj=main_rtems.o + ;; + *) + ac_main_obj=main.o + ;; esac @@ -11896,7 +12179,6 @@ printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Configurations for current target have been written to 'build.mak', and 'os-auto.mak' in various build directories, and pjlib/include/pj/compat/os_auto.h. diff --git a/aconfigure.ac b/aconfigure.ac index df91fbe0e2..7fd65aac20 100644 --- a/aconfigure.ac +++ b/aconfigure.ac @@ -5,28 +5,30 @@ host_orig="$host" AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_CANONICAL_TARGET -AC_CONFIG_HEADERS([pjlib/include/pj/compat/os_auto.h - pjlib/include/pj/compat/m_auto.h - pjmedia/include/pjmedia/config_auto.h - pjmedia/include/pjmedia-codec/config_auto.h - pjsip/include/pjsip/sip_autoconf.h - ]) -AC_CONFIG_FILES([build.mak - build/os-auto.mak - build/cc-auto.mak - pjlib/build/os-auto.mak - pjlib-util/build/os-auto.mak - pjmedia/build/os-auto.mak - pjsip/build/os-auto.mak - third_party/build/os-auto.mak - ]) +AC_CONFIG_HEADERS([ + pjlib/include/pj/compat/os_auto.h + pjlib/include/pj/compat/m_auto.h + pjmedia/include/pjmedia/config_auto.h + pjmedia/include/pjmedia-codec/config_auto.h + pjsip/include/pjsip/sip_autoconf.h +]) +AC_CONFIG_FILES([ + build.mak + build/os-auto.mak + build/cc-auto.mak + pjlib/build/os-auto.mak + pjlib-util/build/os-auto.mak + pjmedia/build/os-auto.mak + pjsip/build/os-auto.mak + third_party/build/os-auto.mak +]) dnl dnl Setup default CFLAGS dnl if test "$CFLAGS" = ""; then - CFLAGS="-O2" + CFLAGS="-O2" fi dnl # @@ -71,31 +73,31 @@ AC_SUBST(ac_pjdir) AC_SUBST(ac_build_mak_vars) AC_SUBST(ac_cflags) -case $host in +case $host in *mingw* | *cygw* | *win32* | *w32* ) - if pwd -W 2&> /dev/null; then - ac_pjdir=`pwd -W` - else - # We're probably cross-compiling mingw on Linux - ac_pjdir=`pwd` - fi - ;; + if pwd -W 2&> /dev/null; then + ac_pjdir=`pwd -W` + else + # We're probably cross-compiling mingw on Linux + ac_pjdir=`pwd` + fi + ;; *) - ac_pjdir=`pwd` - ;; + ac_pjdir=`pwd` + ;; esac AC_SUBST(ac_shlib_suffix) case $target in *mingw* | *cygw* | *win32* | *w32* ) - ac_shlib_suffix=dll - ;; + ac_shlib_suffix=dll + ;; *darwin*) - ac_shlib_suffix=dylib - ;; + ac_shlib_suffix=dylib + ;; *) - ac_shlib_suffix=so - ;; + ac_shlib_suffix=so + ;; esac AC_SUBST(ac_cross_compile) @@ -118,16 +120,18 @@ dnl dnl libuuid dnl AC_ARG_ENABLE(libuuid, - AS_HELP_STRING([--disable-libuuid], - [Exclude libuuid(default: autodetect)]), - [if test "$enable_libuuid" = "no"; then - AC_MSG_RESULT([Checking if libuuid disabled... yes]) - ac_has_uuid_lib=0 - fi], - [ - AC_CHECK_LIB(uuid,uuid_generate) - AC_CHECK_LIB(uuid,uuid_generate,[ac_has_uuid_lib=1]) - ]) + AS_HELP_STRING([--disable-libuuid], [Exclude libuuid(default: autodetect)]), + [ + if test "$enable_libuuid" = "no"; then + AC_MSG_RESULT([Checking if libuuid disabled... yes]) + ac_has_uuid_lib=0 + fi + ], + [ + AC_CHECK_LIB(uuid,uuid_generate) + AC_CHECK_LIB(uuid,uuid_generate,[ac_has_uuid_lib=1]) + ] +) AC_SEARCH_LIBS(gethostbyname,nsl) @@ -140,13 +144,13 @@ dnl AC_MSG_CHECKING([memory alignment]) case $target in sparc64-* | ia64-* | x86_64-* | arm64-* | aarch64-* | mips64* ) - AC_DEFINE(PJ_POOL_ALIGNMENT, 8) - AC_MSG_RESULT([8 bytes]) - ;; + AC_DEFINE(PJ_POOL_ALIGNMENT, 8) + AC_MSG_RESULT([8 bytes]) + ;; * ) - AC_DEFINE(PJ_POOL_ALIGNMENT, 4) - AC_MSG_RESULT([4 bytes (default)]) - ;; + AC_DEFINE(PJ_POOL_ALIGNMENT, 4) + AC_MSG_RESULT([4 bytes (default)]) + ;; esac @@ -156,11 +160,11 @@ dnl AC_C_BIGENDIAN if test "x$ac_cv_c_bigendian" = "xyes"; then - CFLAGS="$CFLAGS -DPJ_IS_BIG_ENDIAN=1 -DPJ_IS_LITTLE_ENDIAN=0" - ac_cflags="$ac_cflags -DPJ_IS_BIG_ENDIAN=1 -DPJ_IS_LITTLE_ENDIAN=0" + CFLAGS="$CFLAGS -DPJ_IS_BIG_ENDIAN=1 -DPJ_IS_LITTLE_ENDIAN=0" + ac_cflags="$ac_cflags -DPJ_IS_BIG_ENDIAN=1 -DPJ_IS_LITTLE_ENDIAN=0" else - CFLAGS="$CFLAGS -DPJ_IS_BIG_ENDIAN=0 -DPJ_IS_LITTLE_ENDIAN=1" - ac_cflags="$ac_cflags -DPJ_IS_BIG_ENDIAN=0 -DPJ_IS_LITTLE_ENDIAN=1" + CFLAGS="$CFLAGS -DPJ_IS_BIG_ENDIAN=0 -DPJ_IS_LITTLE_ENDIAN=1" + ac_cflags="$ac_cflags -DPJ_IS_BIG_ENDIAN=0 -DPJ_IS_LITTLE_ENDIAN=1" fi dnl @@ -170,52 +174,54 @@ AC_SUBST(ac_target_arch) AC_SUBST(ac_std_cpp_lib) case $target in *android*) - AC_DEFINE(PJ_ANDROID,1) - ac_target_arch=$TARGET_ABI - ac_std_cpp_lib=$STD_CPP_LIB - ;; + AC_DEFINE(PJ_ANDROID,1) + ac_target_arch=$TARGET_ABI + ac_std_cpp_lib=$STD_CPP_LIB + ;; *mingw* | *cygw* | *win32* | *w32* ) - AC_DEFINE(PJ_WIN32,1) - AC_DEFINE(PJ_WIN32_WINNT,0x0400) - AC_DEFINE(WIN32_LEAN_AND_MEAN) - case $target in - *_64-w64-mingw* ) - AC_DEFINE(PJ_WIN64,1) - ;; - esac - ;; + AC_DEFINE(PJ_WIN32,1) + AC_DEFINE(PJ_WIN32_WINNT,0x0400) + AC_DEFINE(WIN32_LEAN_AND_MEAN) + case $target in + *_64-w64-mingw* ) + AC_DEFINE(PJ_WIN64,1) + ;; + esac + ;; *darwin*) - AC_DEFINE(PJ_DARWINOS,1) - ac_target_arch=$ARCH_VAL - ;; + AC_DEFINE(PJ_DARWINOS,1) + ac_target_arch=$ARCH_VAL + ;; *linux*) - AC_DEFINE(PJ_LINUX,1) - ;; + AC_DEFINE(PJ_LINUX,1) + ;; *bsd*) - AC_DEFINE(PJ_BSD,1) - ;; + AC_DEFINE(PJ_BSD,1) + ;; *rtems*) - AC_DEFINE(PJ_RTEMS,1) - ;; + AC_DEFINE(PJ_RTEMS,1) + ;; *sunos* | *solaris* ) - AC_DEFINE(PJ_SUNOS,1) - ;; + AC_DEFINE(PJ_SUNOS,1) + ;; *) - ;; + ;; esac dnl # --disable-floating-point option AC_ARG_ENABLE(floating-point, - AS_HELP_STRING([--disable-floating-point], - [Disable floating point where possible]), - [if test "$enable_floating_point" = "no"; then - AC_DEFINE(PJ_HAS_FLOATING_POINT,0) - AC_MSG_RESULT([Checking if floating point is disabled... yes]) - fi], - [ - AC_DEFINE(PJ_HAS_FLOATING_POINT,1) - AC_MSG_RESULT([Checking if floating point is disabled... no]) - ]) + AS_HELP_STRING([--disable-floating-point], [Disable floating point where possible]), + [ + if test "$enable_floating_point" = "no"; then + AC_DEFINE(PJ_HAS_FLOATING_POINT,0) + AC_MSG_RESULT([Checking if floating point is disabled... yes]) + fi + ], + [ + AC_DEFINE(PJ_HAS_FLOATING_POINT,1) + AC_MSG_RESULT([Checking if floating point is disabled... no]) + ] +) AC_CHECK_HEADER(arpa/inet.h,[AC_DEFINE(PJ_HAS_ARPA_INET_H,1)]) @@ -224,11 +230,11 @@ AC_CHECK_HEADER(ctype.h,[AC_DEFINE(PJ_HAS_CTYPE_H,1)]) case $target in *mingw* | *cygw* | *win32* | *w32* ) - AC_DEFINE(PJ_HAS_ERRNO_H,0) - ;; + AC_DEFINE(PJ_HAS_ERRNO_H,0) + ;; *) - AC_CHECK_HEADER(errno.h,[AC_DEFINE(PJ_HAS_ERRNO_H,1)]) - ;; + AC_CHECK_HEADER(errno.h,[AC_DEFINE(PJ_HAS_ERRNO_H,1)]) + ;; esac AC_CHECK_HEADER(fcntl.h,[AC_DEFINE(PJ_HAS_FCNTL_H,1)]) @@ -239,19 +245,21 @@ AC_CHECK_HEADER(netdb.h,[AC_DEFINE(PJ_HAS_NETDB_H,1)]) AC_CHECK_HEADER(netinet/in_systm.h,[AC_DEFINE(PJ_HAS_NETINET_IN_SYSTM_H,1)]) AC_CHECK_HEADER(netinet/in.h,[AC_DEFINE(PJ_HAS_NETINET_IN_H,1)]) AC_CHECK_HEADER(netinet/ip.h,[AC_DEFINE(PJ_HAS_NETINET_IP_H,1)],[], - [#if PJ_HAS_SYS_TYPES_H - # include - #endif - #if PJ_HAS_NETINET_IN_SYSTM_H - # include - #endif - #if PJ_HAS_NETINET_IN_H - # include - #endif - ]) + [ + #if PJ_HAS_SYS_TYPES_H + # include + #endif + #if PJ_HAS_NETINET_IN_SYSTM_H + # include + #endif + #if PJ_HAS_NETINET_IN_H + # include + #endif + ] +) + AC_CHECK_HEADER(netinet/tcp.h,[AC_DEFINE(PJ_HAS_NETINET_TCP_H,1)]) -AC_CHECK_HEADER(ifaddrs.h, - [AC_CHECK_FUNC(getifaddrs,[AC_DEFINE(PJ_HAS_IFADDRS_H,1)])]) +AC_CHECK_HEADER(ifaddrs.h, [AC_CHECK_FUNC(getifaddrs,[AC_DEFINE(PJ_HAS_IFADDRS_H,1)])]) AC_CHECK_HEADER(semaphore.h,[AC_DEFINE(PJ_HAS_SEMAPHORE_H,1)]) AC_CHECK_HEADER(setjmp.h,[AC_DEFINE(PJ_HAS_SETJMP_H,1)]) AC_CHECK_HEADER(stdarg.h,[AC_DEFINE(PJ_HAS_STDARG_H,1)]) @@ -276,28 +284,32 @@ AC_CHECK_HEADER(execinfo.h,[AC_DEFINE(PJ_HAS_EXECINFO_H,1)]) AC_CHECK_HEADER(winsock.h,[AC_DEFINE(PJ_HAS_WINSOCK_H,1)]) AC_CHECK_HEADER(winsock2.h,[AC_DEFINE(PJ_HAS_WINSOCK2_H,1)]) AC_CHECK_HEADER(mswsock.h,[AC_DEFINE(PJ_HAS_MSWSOCK_H,1)],[], - [#if PJ_HAS_WINSOCK2_H - # include - #elif PJ_HAS_WINSOCK_H - # include - #endif - ]) + [ + #if PJ_HAS_WINSOCK2_H + # include + #elif PJ_HAS_WINSOCK_H + # include + #endif + ] +) + AC_CHECK_HEADER(ws2tcpip.h,[AC_DEFINE(PJ_HAS_WS2TCPIP_H,1)]) AC_CHECK_HEADER(uuid/uuid.h,[ac_has_uuid_h=1]) AC_CHECK_HEADER(net/if.h,[AC_DEFINE(PJ_HAS_NET_IF_H,1)],[], - [#if PJ_HAS_SYS_TYPES_H - # include - #endif - #if PJ_HAS_SYS_SOCKET_H - - # include - #endif - ]) + [ + #if PJ_HAS_SYS_TYPES_H + # include + #endif + #if PJ_HAS_SYS_SOCKET_H + # include + #endif + ] +) case $target in - *android*) - AC_CHECK_HEADER(linux/android_alarm.h,[AC_DEFINE(PJ_HAS_ANDROID_ALARM_H,1)]) - ;; + *android*) + AC_CHECK_HEADER(linux/android_alarm.h,[AC_DEFINE(PJ_HAS_ANDROID_ALARM_H,1)]) + ;; esac AC_CHECK_FUNC(localtime_r,[AC_DEFINE(PJ_HAS_LOCALTIME_R,1)]) @@ -322,147 +334,239 @@ AC_DEFINE(PJ_ATOMIC_VALUE_TYPE,long) dnl # Determine if inet_aton() is available AC_MSG_CHECKING([if inet_aton() is available]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include - #include - #include ]], - [inet_aton(0, 0);])], - [AC_DEFINE(PJ_SOCK_HAS_INET_ATON,1) - AC_MSG_RESULT(yes)], - [AC_MSG_RESULT(no)]) +AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([ + [#include + #include + #include ]], + [inet_aton(0, 0);]) + ], + [ + AC_DEFINE(PJ_SOCK_HAS_INET_ATON,1) + AC_MSG_RESULT(yes) + ], + [AC_MSG_RESULT(no)] +) dnl # Determine if inet_pton() is available AC_MSG_CHECKING([if inet_pton() is available]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include - #include - #include ]], - [inet_pton(0, 0, 0);])], - [AC_DEFINE(PJ_SOCK_HAS_INET_PTON,1) - AC_MSG_RESULT(yes)], - [AC_MSG_RESULT(no)]) +AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([ + [#include + #include + #include ]], + [inet_pton(0, 0, 0);]) + ], + [ + AC_DEFINE(PJ_SOCK_HAS_INET_PTON,1) + AC_MSG_RESULT(yes) + ], + [AC_MSG_RESULT(no)] +) dnl # Determine if inet_ntop() is available AC_MSG_CHECKING([if inet_ntop() is available]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include - #include - #include ]], - [inet_ntop(0, 0, 0, 0);])], - [AC_DEFINE(PJ_SOCK_HAS_INET_NTOP,1) - AC_MSG_RESULT(yes)], - [AC_MSG_RESULT(no)]) +AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([ + [#include + #include + #include ]], + [inet_ntop(0, 0, 0, 0);]) + ], + [ + AC_DEFINE(PJ_SOCK_HAS_INET_NTOP,1) + AC_MSG_RESULT(yes) + ], + [AC_MSG_RESULT(no)] +) dnl # Determine if getaddrinfo() is available AC_MSG_CHECKING([if getaddrinfo() is available]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include - #include - #include ]], - [getaddrinfo(0, 0, 0, 0);])], - [AC_DEFINE(PJ_SOCK_HAS_GETADDRINFO,1) - AC_MSG_RESULT(yes)], - [AC_MSG_RESULT(no)]) +AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([ + [#include + #include + #include ]], + [getaddrinfo(0, 0, 0, 0);]) + ], + [ + AC_DEFINE(PJ_SOCK_HAS_GETADDRINFO,1) + AC_MSG_RESULT(yes) + ], + [AC_MSG_RESULT(no)] +) dnl # Determine if socketpair() is available AC_MSG_CHECKING([if socketpair() is available]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include - #include ]], - [socketpair(0, 0, 0, 0);])], - [AC_DEFINE(PJ_SOCK_HAS_SOCKETPAIR,1) - AC_MSG_RESULT(yes)], - [AC_MSG_RESULT(no)]) +AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([ + [#include + #include ]], + [socketpair(0, 0, 0, 0);]) + ], + [ + AC_DEFINE(PJ_SOCK_HAS_SOCKETPAIR,1) + AC_MSG_RESULT(yes) + ], + [AC_MSG_RESULT(no)] +) dnl # Determine if sockaddr_in has sin_len member AC_MSG_CHECKING([if sockaddr_in has sin_len member]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include - #include - #include - #include ]], - [struct sockaddr_in a; a.sin_len=0;])], - [AC_DEFINE(PJ_SOCKADDR_HAS_LEN,1) - AC_MSG_RESULT(yes)], - AC_MSG_RESULT(no)) +AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([ + [#include + #include + #include + #include ]], + [struct sockaddr_in a; a.sin_len=0;]) + ], + [ + AC_DEFINE(PJ_SOCKADDR_HAS_LEN,1) + AC_MSG_RESULT(yes) + ], + [AC_MSG_RESULT(no)] +) dnl # Determine if socklen_t is available AC_MSG_CHECKING([if socklen_t is available]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include - #include ]], - [socklen_t xxx = 0;])], - [AC_DEFINE(PJ_HAS_SOCKLEN_T,1) - AC_MSG_RESULT(yes)], - AC_MSG_RESULT(no)) +AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([ + [#include + #include ]], + [socklen_t xxx = 0;]) + ], + [ + AC_DEFINE(PJ_HAS_SOCKLEN_T,1) + AC_MSG_RESULT(yes) + ], + [AC_MSG_RESULT(no)] +) dnl # Determine if IPV6_V6ONLY is available AC_MSG_CHECKING([if IPV6_V6ONLY is available]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include - #include ]], - [int opt = IPV6_V6ONLY;])], - [AC_DEFINE(PJ_SOCK_HAS_IPV6_V6ONLY,1) - AC_MSG_RESULT(yes)], - AC_MSG_RESULT(no)) +AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([ + [#include + #include ]], + [int opt = IPV6_V6ONLY;]) + ], + [ + AC_DEFINE(PJ_SOCK_HAS_IPV6_V6ONLY,1) + AC_MSG_RESULT(yes) + ], + [AC_MSG_RESULT(no)] +) dnl # Determine if SO_ERROR is available AC_MSG_CHECKING([if SO_ERROR is available]) case $target in *mingw* | *cygw* | *win32* | *w32* ) - AC_DEFINE(PJ_HAS_SO_ERROR,1) - AC_MSG_RESULT(yes) - ;; + AC_DEFINE(PJ_HAS_SO_ERROR,1) + AC_MSG_RESULT(yes) + ;; *) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include - #include - #include - #include ]], - [int i=SO_ERROR;])], - [AC_DEFINE(PJ_HAS_SO_ERROR,1) - AC_MSG_RESULT(yes)], - AC_MSG_RESULT(no)) - ;; + AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([ + [#include + #include + #include + #include ]], + [int i=SO_ERROR;]) + ], + [ + AC_DEFINE(PJ_HAS_SO_ERROR,1) + AC_MSG_RESULT(yes) + ], + [AC_MSG_RESULT(no)] + ) + ;; esac dnl # Determine if RW-mutex is available AC_MSG_CHECKING([if pthread_rwlock_t is available]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], - [pthread_rwlock_t *x;])], - [AC_DEFINE(PJ_EMULATE_RWMUTEX,0) - ac_rwmutex="yes" - AC_MSG_RESULT(yes)], - [AC_DEFINE(PJ_EMULATE_RWMUTEX,1) - ac_rwmutex="no" - AC_MSG_RESULT(no)]) +AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([#include ],[pthread_rwlock_t *x;]) + ], + [ + AC_DEFINE(PJ_EMULATE_RWMUTEX,0) + ac_rwmutex="yes" + AC_MSG_RESULT(yes) + ], + [ + AC_DEFINE(PJ_EMULATE_RWMUTEX,1) + ac_rwmutex="no" + AC_MSG_RESULT(no) + ] +) dnl # If rwmutex is not detected, check again but this time dnl # with _POSIX_READER_WRITER_LOCKS defined (newlib needs this) if test "$ac_rwmutex" = "no"; then AC_MSG_CHECKING([if pthread_rwlock_t is available with _POSIX_READER_WRITER_LOCKS]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _POSIX_READER_WRITER_LOCKS - #include ]], - [pthread_rwlock_t *x;])], - [AC_DEFINE(PJ_EMULATE_RWMUTEX,0) - CFLAGS="$CFLAGS -D_POSIX_THREADS -D_POSIX_READER_WRITER_LOCKS" - AC_MSG_RESULT(yes)], - [AC_DEFINE(PJ_EMULATE_RWMUTEX,1) - AC_MSG_RESULT(no)]) + AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([ + [#define _POSIX_READER_WRITER_LOCKS + #include ]], + [pthread_rwlock_t *x;]) + ], + [ + AC_DEFINE(PJ_EMULATE_RWMUTEX,0) + CFLAGS="$CFLAGS -D_POSIX_THREADS -D_POSIX_READER_WRITER_LOCKS" + AC_MSG_RESULT(yes) + ], + [ + AC_DEFINE(PJ_EMULATE_RWMUTEX,1) + AC_MSG_RESULT(no) + ] + ) fi dnl # Do we have pthread_mutexattr_settype()? AC_MSG_CHECKING([if pthread_mutexattr_settype() is available]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], - [pthread_mutexattr_settype(0,PTHREAD_MUTEX_FAST_NP);])], - [AC_DEFINE(PJ_HAS_PTHREAD_MUTEXATTR_SETTYPE,1) - AC_MSG_RESULT(yes)], - [AC_MSG_RESULT(no)]) +AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM( + [#include ], + [pthread_mutexattr_settype(0,PTHREAD_MUTEX_FAST_NP);]) + ], + [ + AC_DEFINE(PJ_HAS_PTHREAD_MUTEXATTR_SETTYPE,1) + AC_MSG_RESULT(yes) + ], + [AC_MSG_RESULT(no)] +) dnl # Does pthread_mutexattr_t has "recursive" member? AC_MSG_CHECKING([if pthread_mutexattr_t has recursive member]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], - [[pthread_mutexattr_t attr; - attr.recursive=1;]])], - [AC_DEFINE(PJ_PTHREAD_MUTEXATTR_T_HAS_RECURSIVE,1) - AC_MSG_RESULT(yes)], - [AC_MSG_RESULT(no)]) +AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM( + [#include ], + [pthread_mutexattr_t attr; attr.recursive=1;]) + ], + [ + AC_DEFINE(PJ_PTHREAD_MUTEXATTR_T_HAS_RECURSIVE,1) + AC_MSG_RESULT(yes) + ], + [AC_MSG_RESULT(no)] +) dnl ###################### dnl # ioqueue selection -dnl # +dnl # AC_SUBST(ac_os_objs) AC_SUBST(ac_linux_poll) AC_MSG_CHECKING([ioqueue backend]) @@ -471,132 +575,135 @@ ac_os_objs=ioqueue_select.o ac_linux_poll=select case $target in - *darwin* | *bsd*) - AC_ARG_ENABLE(kqueue, - AS_HELP_STRING([--enable-kqueue], - [Use kqueue ioqueue on macos/BSD (experimental)]), - [ - if test "$enable_kqueue" = "yes"; then - ac_os_objs=ioqueue_kqueue.o - AC_MSG_RESULT([kqueue()]) - else - AC_MSG_RESULT([select()]) - fi - ], - [ - AC_MSG_RESULT([select()]) - ]) - ;; - *) - AC_ARG_ENABLE(epoll, - AS_HELP_STRING([--enable-epoll], - [Use /dev/epoll ioqueue on Linux (experimental)]), - [ - if test "$enable_epoll" = "yes"; then - ac_os_objs=ioqueue_epoll.o - AC_MSG_RESULT([/dev/epoll]) - AC_DEFINE(PJ_HAS_LINUX_EPOLL,1) - ac_linux_poll=epoll - else - AC_MSG_RESULT([select()]) - fi - ], - [ - AC_MSG_RESULT([select()]) - ]) - ;; + *darwin* | *bsd*) + AC_ARG_ENABLE(kqueue, + AS_HELP_STRING([--enable-kqueue], [Use kqueue ioqueue on macos/BSD (experimental)]), + [ + if test "$enable_kqueue" = "yes"; then + ac_os_objs=ioqueue_kqueue.o + AC_MSG_RESULT([kqueue()]) + else + AC_MSG_RESULT([select()]) + fi + ], + [ + AC_MSG_RESULT([select()]) + ] + ) + ;; + *) + AC_ARG_ENABLE(epoll, + AS_HELP_STRING([--enable-epoll], [Use /dev/epoll ioqueue on Linux (experimental)]), + [ + if test "$enable_epoll" = "yes"; then + ac_os_objs=ioqueue_epoll.o + AC_MSG_RESULT([/dev/epoll]) + AC_DEFINE(PJ_HAS_LINUX_EPOLL,1) + ac_linux_poll=epoll + else + AC_MSG_RESULT([select()]) + fi + ], + [ + AC_MSG_RESULT([select()]) + ] + ) + ;; esac AC_SUBST(ac_shared_libraries) AC_ARG_ENABLE(shared, - AS_HELP_STRING([--enable-shared], - [Build shared libraries]), - [if test "$enable_shared" = "yes"; then - [ac_shared_libraries=1] - CFLAGS="$CFLAGS -fPIC" - AC_MSG_RESULT([Building shared libraries... yes]) - fi], - AC_MSG_RESULT([Building shared libraries... no]) - ) + AS_HELP_STRING([--enable-shared], [Build shared libraries]), + [ + if test "$enable_shared" = "yes"; then + [ac_shared_libraries=1] + CFLAGS="$CFLAGS -fPIC" + AC_MSG_RESULT([Building shared libraries... yes]) + fi + ], + AC_MSG_RESULT([Building shared libraries... no]) +) AC_SUBST(ac_no_pjsua2) AC_ARG_ENABLE(pjsua2, - AS_HELP_STRING([--disable-pjsua2], - [Exclude pjsua2 library and application from the build]), - [if test "$enable_pjsua2" = "no"; then - [ac_no_pjsua2=1] - AC_MSG_RESULT([Building pjsua2 library and application... no]) - fi], - AC_MSG_RESULT([Building pjsua2 library and application... yes]) - ) + AS_HELP_STRING([--disable-pjsua2], [Exclude pjsua2 library and application from the build]), + [ + if test "$enable_pjsua2" = "no"; then + [ac_no_pjsua2=1] + AC_MSG_RESULT([Building pjsua2 library and application... no]) + fi + ], + AC_MSG_RESULT([Building pjsua2 library and application... yes]) +) dnl ###################### dnl # OS specific files dnl # case $target in - *mingw* | *cygw* | *win32* | *w32* ) - ac_os_objs="$ac_os_objs file_access_win32.o file_io_win32.o os_core_win32.o os_error_win32.o os_time_win32.o os_timestamp_win32.o guid_win32.o sock_qos_bsd.o unicode_win32.o" - ;; - *) - ac_os_objs="$ac_os_objs file_access_unistd.o file_io_ansi.o os_core_unix.o os_error_unix.o os_time_unix.o os_timestamp_posix.o" - case $target in - *-apple-darwin_ios*) - ac_os_objs="$ac_os_objs os_info_iphone.o os_core_darwin.o" - ;; - *darwin*) - ac_os_objs="$ac_os_objs os_core_darwin.o" - ;; - esac - # QoS - case $target in - *darwin*) - ac_os_objs="$ac_os_objs sock_qos_darwin.o sock_qos_bsd.o" - ;; - *) - ac_os_objs="$ac_os_objs sock_qos_bsd.o" - ;; - esac - # SSL - case $target in - *darwin*) - ac_os_objs="$ac_os_objs ssl_sock_apple.o" - ;; - esac - # UUID - case $target in - *android*) - ac_os_objs="$ac_os_objs guid_android.o" - ;; - *darwin*) - ac_os_objs="$ac_os_objs guid_darwin.o" - ;; - *bsd*) - ac_os_objs="$ac_os_objs guid_bsd.o" - ;; - *) - if test "$ac_has_uuid_lib" = "1" -a "$ac_has_uuid_h" = "1"; then - ac_os_objs="$ac_os_objs guid_uuid.o" - else - ac_os_objs="$ac_os_objs guid_simple.o" - fi - ;; - esac - ;; + *mingw* | *cygw* | *win32* | *w32* ) + ac_os_objs="$ac_os_objs file_access_win32.o file_io_win32.o os_core_win32.o os_error_win32.o os_time_win32.o os_timestamp_win32.o guid_win32.o sock_qos_bsd.o unicode_win32.o" + ;; + *) + ac_os_objs="$ac_os_objs file_access_unistd.o file_io_ansi.o os_core_unix.o os_error_unix.o os_time_unix.o os_timestamp_posix.o" + case $target in + *-apple-darwin_ios*) + ac_os_objs="$ac_os_objs os_info_iphone.o os_core_darwin.o" + ;; + *darwin*) + ac_os_objs="$ac_os_objs os_core_darwin.o" + ;; + esac + + # QoS + case $target in + *darwin*) + ac_os_objs="$ac_os_objs sock_qos_darwin.o sock_qos_bsd.o" + ;; + *) + ac_os_objs="$ac_os_objs sock_qos_bsd.o" + ;; + esac + + # SSL + case $target in + *darwin*) + ac_os_objs="$ac_os_objs ssl_sock_apple.o" + ;; + esac + + # UUID + case $target in + *android*) + ac_os_objs="$ac_os_objs guid_android.o" + ;; + *darwin*) + ac_os_objs="$ac_os_objs guid_darwin.o" + ;; + *bsd*) + ac_os_objs="$ac_os_objs guid_bsd.o" + ;; + *) + if test "$ac_has_uuid_lib" = "1" -a "$ac_has_uuid_h" = "1"; then + ac_os_objs="$ac_os_objs guid_uuid.o" + else + ac_os_objs="$ac_os_objs guid_simple.o" + fi + ;; + esac + ;; esac dnl ########################################## dnl # PJLIB-UTIL dnl # - dnl # UPnP alt prefix AC_ARG_WITH(upnp, - AS_HELP_STRING([--with-upnp=DIR], - [Specify alternate libupnp prefix]), - [], - [with_upnp=no] - ) + AS_HELP_STRING([--with-upnp=DIR], [Specify alternate libupnp prefix]), + [], + [with_upnp=no] +) dnl # Do not use default libupnp installation if we are cross-compiling if test "x$ac_cross_compile" != "x" -a "x$with_upnp" = "xno"; then @@ -605,51 +712,55 @@ fi dnl # UPnP AC_ARG_ENABLE(upnp, - AS_HELP_STRING([--disable-upnp], - [Disable UPnP (default: not disabled)]), - [ - if test "$enable_upnp" = "no"; then - AC_MSG_RESULT([Checking if UPnP is disabled... yes]) - fi - ], - [ - if test "x$with_upnp" != "xno" -a "x$with_upnp" != "x"; then - UPNP_PREFIX=$with_upnp - UPNP_CFLAGS="-I$UPNP_PREFIX/upnp/inc -I$UPNP_PREFIX/ixml/inc" - UPNP_LDFLAGS="-L$UPNP_PREFIX/upnp/.libs -L$UPNP_PREFIX/imxl/.libs" - AC_MSG_RESULT([Using UPnP prefix... $with_upnp]) - else - UPNP_CFLAGS="" - UPNP_LDFLAGS="" - fi - - AC_MSG_CHECKING([UPnP usability]) - - UPNP_LIBS="-lupnp -lixml" - - SAVED_LIBS="$LIBS" - SAVED_LDFLAGS="$LDFLAGS" - SAVED_CFLAGS="$CFLAGS" - - LIBS="$UPNP_LIBS $LIBS" - LDFLAGS="$UPNP_LDFLAGS $LDFLAGS" - CFLAGS="$UPNP_CFLAGS $CFLAGS" - - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], - [UpnpInit2(NULL, 0);] - )], - [ CFLAGS="$CFLAGS -DPJNATH_HAS_UPNP=1 $UPNP_CFLAGS" - LDFLAGS="$LDFLAGS $UPNP_LDFLAGS $UPNP_LIBS" - AC_MSG_RESULT(yes) - ], - [ - LIBS="$SAVED_LIBS" - LDFLAGS="$SAVED_LDFLAGS" - CFLAGS="$SAVED_CFLAGS" - AC_MSG_RESULT(no) - ]) - - ]) + AS_HELP_STRING([--disable-upnp], [Disable UPnP (default: not disabled)]), + [ + if test "$enable_upnp" = "no"; then + AC_MSG_RESULT([Checking if UPnP is disabled... yes]) + fi + ], + [ + if test "x$with_upnp" != "xno" -a "x$with_upnp" != "x"; then + UPNP_PREFIX=$with_upnp + UPNP_CFLAGS="-I$UPNP_PREFIX/upnp/inc -I$UPNP_PREFIX/ixml/inc" + UPNP_LDFLAGS="-L$UPNP_PREFIX/upnp/.libs -L$UPNP_PREFIX/imxl/.libs" + AC_MSG_RESULT([Using UPnP prefix... $with_upnp]) + else + UPNP_CFLAGS="" + UPNP_LDFLAGS="" + fi + + AC_MSG_CHECKING([UPnP usability]) + + UPNP_LIBS="-lupnp -lixml" + + SAVED_LIBS="$LIBS" + SAVED_LDFLAGS="$LDFLAGS" + SAVED_CFLAGS="$CFLAGS" + + LIBS="$UPNP_LIBS $LIBS" + LDFLAGS="$UPNP_LDFLAGS $LDFLAGS" + CFLAGS="$UPNP_CFLAGS $CFLAGS" + + AC_LINK_IFELSE( + [ + AC_LANG_PROGRAM([ + [#include ]], + [UpnpInit2(NULL, 0);]) + ], + [ + CFLAGS="$CFLAGS -DPJNATH_HAS_UPNP=1 $UPNP_CFLAGS" + LDFLAGS="$LDFLAGS $UPNP_LDFLAGS $UPNP_LIBS" + AC_MSG_RESULT(yes) + ], + [ + LIBS="$SAVED_LIBS" + LDFLAGS="$SAVED_LDFLAGS" + CFLAGS="$SAVED_CFLAGS" + AC_MSG_RESULT(no) + ] + ) + ] +) dnl ########################################## dnl # @@ -660,58 +771,73 @@ dnl # Use external Speex installation AC_SUBST(ac_external_speex,0) AC_ARG_WITH(external-speex, AS_HELP_STRING([--with-external-speex], - [Use external Speex development files, not the one in "third_party" directory. When this option is set, make sure that Speex is accessible to use (hint: use CFLAGS and LDFLAGS env var to set the include/lib paths)]), - [ - if test "x$with_external_speex" != "xno"; then - # Test Speex installation - AC_MSG_CHECKING([if external Speex devkit is installed]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include - #include - ]], - [speex_echo_state_init(0, 0); speex_encoder_init(0); ])], - [AC_MSG_RESULT(yes!!) - AC_DEFINE(PJMEDIA_EXTERNAL_SPEEX_CODEC, 1) - ac_external_speex="1" - ], - [AC_MSG_ERROR([Unable to use external Speex library. If Speex development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths])]) - fi + [Use external Speex development files, not the one in "third_party" directory. When this option is set, make sure that Speex is accessible to use (hint: use CFLAGS and LDFLAGS env var to set the include/lib paths)]), + [ + if test "x$with_external_speex" != "xno"; then + # Test Speex installation + AC_MSG_CHECKING([if external Speex devkit is installed]) + AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([ + [#include + #include ]], + [speex_echo_state_init(0, 0); speex_encoder_init(0); ]) + ], + [ + AC_MSG_RESULT(yes!!) + AC_DEFINE(PJMEDIA_EXTERNAL_SPEEX_CODEC, 1) + ac_external_speex="1" + ], + [ + AC_MSG_ERROR([Unable to use external Speex library. If Speex development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths]) + ] + ) + fi ] - ) +) dnl # Use external GSM codec library installation AC_SUBST(ac_external_gsm,0) AC_ARG_WITH(external-gsm, AS_HELP_STRING([--with-external-gsm], - [Use external GSM codec library, not the one in "third_party" directory. When this option is set, make sure that the GSM include/lib files are accessible to use (hint: use CFLAGS and LDFLAGS env var to set the include/lib paths)]), + [Use external GSM codec library, not the one in "third_party" directory. When this option is set, make sure that the GSM include/lib files are accessible to use (hint: use CFLAGS and LDFLAGS env var to set the include/lib paths)]), [ - if test "x$with_external_gsm" != "xno"; then - # Test GSM library installation - AC_MSG_CHECKING([if external GSM devkit is installed as gsm/gsm.h]) - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[#include ]], [gsm_create(); ]) ], - [AC_MSG_RESULT(yes!!) - AC_DEFINE(PJMEDIA_EXTERNAL_GSM_CODEC, 1) - AC_DEFINE(PJMEDIA_EXTERNAL_GSM_GSM_H, 1) - ac_external_gsm="1" - ], - [ - AC_MSG_RESULT(no) - AC_MSG_CHECKING([if external GSM devkit is installed as gsm.h]) - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[#include ]], [gsm_create(); ]) ], - [AC_MSG_RESULT(yes!!) - AC_DEFINE(PJMEDIA_EXTERNAL_GSM_CODEC, 1) - AC_DEFINE(PJMEDIA_EXTERNAL_GSM_H, 1) - ac_external_gsm="1" + if test "x$with_external_gsm" != "xno"; then + # Test GSM library installation + AC_MSG_CHECKING([if external GSM devkit is installed as gsm/gsm.h]) + AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([[#include ]], [gsm_create(); ]) + ], + [ + AC_MSG_RESULT(yes!!) + AC_DEFINE(PJMEDIA_EXTERNAL_GSM_CODEC, 1) + AC_DEFINE(PJMEDIA_EXTERNAL_GSM_GSM_H, 1) + ac_external_gsm="1" + ], + [ + AC_MSG_RESULT(no) + AC_MSG_CHECKING([if external GSM devkit is installed as gsm.h]) + AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([ + [#include ]], [gsm_create(); ]) + ], + [ + AC_MSG_RESULT(yes!!) + AC_DEFINE(PJMEDIA_EXTERNAL_GSM_CODEC, 1) + AC_DEFINE(PJMEDIA_EXTERNAL_GSM_H, 1) + ac_external_gsm="1" ], - [AC_MSG_ERROR([Unable to use external GSM library. If GSM development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths]) + [ + AC_MSG_ERROR([Unable to use external GSM library. If GSM development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths]) ] ) - ] - ) - fi + ] + ) + fi ] - ) +) dnl # Use external SRTP installation @@ -719,632 +845,718 @@ AC_SUBST(ac_external_srtp,0) AC_SUBST(ac_external_srtp_lib) AC_ARG_WITH(external-srtp, AS_HELP_STRING([--with-external-srtp], - [Use external SRTP development files, not the one in "third_party" directory. When this option is set, make sure that SRTP is accessible to use (hint: use CFLAGS and LDFLAGS env var to set the include/lib paths)]), - [ - if test "x$with_external_srtp" != "xno"; then - # Test SRTP installation - AC_MSG_CHECKING([if external SRTP devkit is installed]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include - ]], - [srtp_init();])], - [AC_MSG_RESULT(yes: version 2.x) - ac_external_srtp="2" - ac_external_srtp_lib="srtp2" - ], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include - ]], - [srtp_init();])], - [AC_MSG_RESULT(yes: version 1.x) - ac_external_srtp="1" - ac_external_srtp_lib="srtp" - ], - [AC_MSG_ERROR([Unable to use SRTP. If SRTP development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths])])]) - fi + [Use external SRTP development files, not the one in "third_party" directory. When this option is set, make sure that SRTP is accessible to use (hint: use CFLAGS and LDFLAGS env var to set the include/lib paths)]), + [ + if test "x$with_external_srtp" != "xno"; then + # Test SRTP installation + AC_MSG_CHECKING([if external SRTP devkit is installed]) + AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([ + [#include ]], + [srtp_init();]) + ], + [ + AC_MSG_RESULT(yes: version 2.x) + ac_external_srtp="2" + ac_external_srtp_lib="srtp2" + ], + [ + AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([ + [#include ]], + [srtp_init();]) + ], + [ + AC_MSG_RESULT(yes: version 1.x) + ac_external_srtp="1" + ac_external_srtp_lib="srtp" + ], + [ + AC_MSG_ERROR([Unable to use SRTP. If SRTP development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths]) + ] + ) + ] + ) + fi ] - ) +) dnl # For external SRTP, check availability of srtp_deinit() or srtp_shutdown() if test "x$ac_external_srtp" != "x0"; then - AC_SUBST(ac_srtp_deinit_present,0) - AC_SUBST(ac_srtp_shutdown_present,0) - AC_CHECK_LIB($ac_external_srtp_lib,srtp_deinit,[ac_srtp_deinit_present=1]) - if test "x$ac_srtp_deinit_present" != "x1"; then - AC_CHECK_LIB($ac_external_srtp_lib,srtp_shutdown,[ac_srtp_shutdown_present=1]) - fi + AC_SUBST(ac_srtp_deinit_present,0) + AC_SUBST(ac_srtp_shutdown_present,0) + AC_CHECK_LIB($ac_external_srtp_lib,srtp_deinit,[ac_srtp_deinit_present=1]) + if test "x$ac_srtp_deinit_present" != "x1"; then + AC_CHECK_LIB($ac_external_srtp_lib,srtp_shutdown,[ac_srtp_shutdown_present=1]) + fi fi - dnl # Use external libyuv installation AC_SUBST(ac_external_yuv,0) AC_ARG_WITH(external-yuv, AS_HELP_STRING([--with-external-yuv], - [Use external libyuv development files, not the one in "third_party" directory. When this option is set, make sure that libyuv is accessible to use (hint: use CFLAGS and LDFLAGS env var to set the include/lib paths)]), - [ - if test "x$with_external_yuv" != "xno"; then - # Test libyuv installation - AC_MSG_CHECKING([if external libyuv devkit is installed]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], - [RGB24ToI420(0,0,0,0,0,0,0,0,0,0);])], - [AC_MSG_RESULT(yes!!) - ac_external_yuv="1" - ], - [AC_MSG_ERROR([Unable to use external libyuv. If libyuv development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths])]) - fi + [Use external libyuv development files, not the one in "third_party" directory. When this option is set, make sure that libyuv is accessible to use (hint: use CFLAGS and LDFLAGS env var to set the include/lib paths)]), + [ + if test "x$with_external_yuv" != "xno"; then + # Test libyuv installation + AC_MSG_CHECKING([if external libyuv devkit is installed]) + AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([ + [#include ]], + [RGB24ToI420(0,0,0,0,0,0,0,0,0,0);]) + ], + [ + AC_MSG_RESULT(yes!!) + ac_external_yuv="1" + ], + [ + AC_MSG_ERROR([Unable to use external libyuv. If libyuv development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths]) + ] + ) + fi ] - ) +) dnl # Use external webrtc installation AC_SUBST(ac_external_webrtc,0) AC_ARG_WITH(external-webrtc, AS_HELP_STRING([--with-external-webrtc], - [Use external webrtc development files, not the one in "third_party" directory. When this option is set, make sure that webrtc is accessible to use (hint: use CFLAGS and LDFLAGS env var to set the include/lib paths)]), - [ - if test "x$with_external_webrtc" != "xno"; then - # Test webrtc installation - AC_MSG_CHECKING([if external webrtc devkit is installed]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include - #include - ]], - [WebRtcAec_Create();])], - [AC_MSG_RESULT(yes!!) - ac_external_webrtc="1" - ], - [AC_MSG_ERROR([Unable to use external webrtc. If webrtc development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths])]) - fi + [Use external webrtc development files, not the one in "third_party" directory. When this option is set, make sure that webrtc is accessible to use (hint: use CFLAGS and LDFLAGS env var to set the include/lib paths)]), + [ + if test "x$with_external_webrtc" != "xno"; then + # Test webrtc installation + AC_MSG_CHECKING([if external webrtc devkit is installed]) + AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([ + [#include + #include ]], + [WebRtcAec_Create();]) + ], + [ + AC_MSG_RESULT(yes!!) + ac_external_webrtc="1" + ], + [ + AC_MSG_ERROR([Unable to use external webrtc. If webrtc development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths]) + ] + ) + fi ] - ) +) dnl # Use external webrtc AEC3 installation AC_SUBST(ac_external_webrtc_aec3,0) AC_ARG_WITH(external-webrtc-aec3, AS_HELP_STRING([--with-external-webrtc-aec3], - [Use external webrtc AEC3 development files, not the one in "third_party" directory. When this option is set, make sure that webrtc is accessible to use (hint: use CFLAGS and LDFLAGS env var to set the include/lib paths)]), - [ - if test "x$with_external_webrtc_aec3" != "xno"; then - # Test webrtc AEC3 installation - AC_MSG_CHECKING([if external webrtc AEC3 is installed]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "modules/audio_processing/aec3/echo_canceller3.h" - ]], - [EchoCanceller3 ec(EchoCanceller3Config(), 16000, 1, 1);])], - [AC_MSG_RESULT(yes!!) - ac_external_webrtc_aec3="1" - ], - [AC_MSG_ERROR([Unable to use external webrtc AEC3. If webrtc development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths])]) - fi + [Use external webrtc AEC3 development files, not the one in "third_party" directory. When this option is set, make sure that webrtc is accessible to use (hint: use CFLAGS and LDFLAGS env var to set the include/lib paths)]), + [ + if test "x$with_external_webrtc_aec3" != "xno"; then + # Test webrtc AEC3 installation + AC_MSG_CHECKING([if external webrtc AEC3 is installed]) + AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([ + [#include "modules/audio_processing/aec3/echo_canceller3.h"]], + [EchoCanceller3 ec(EchoCanceller3Config(), 16000, 1, 1);]) + ], + [ + AC_MSG_RESULT(yes!!) + ac_external_webrtc_aec3="1" + ], + [ + AC_MSG_ERROR([Unable to use external webrtc AEC3. If webrtc development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths]) + ] + ) + fi ] - ) +) dnl # Resample implementation AC_SUBST(ac_pjmedia_resample,libresample) AC_ARG_ENABLE(resample, - AS_HELP_STRING([--disable-resample], - [Disable resampling implementations]), - [if test "$enable_resample" = "no"; then - [ac_pjmedia_resample=none] - AC_MSG_RESULT([Checking if resampling is disabled...yes]) - fi] - ) + AS_HELP_STRING([--disable-resample], [Disable resampling implementations]), + [ + if test "$enable_resample" = "no"; then + [ac_pjmedia_resample=none] + AC_MSG_RESULT([Checking if resampling is disabled...yes]) + fi + ] +) dnl # Sound device backend selection AC_SUBST(ac_pjmedia_snd) AC_ARG_ENABLE(sound, - AS_HELP_STRING([--disable-sound], - [Exclude sound (i.e. use null sound)]), - [if test "$enable_sound" = "no"; then - [ac_pjmedia_snd=null] - AC_MSG_RESULT([Checking if sound is disabled... yes]) - fi] - ) + AS_HELP_STRING([--disable-sound], [Exclude sound (i.e. use null sound)]), + [ + if test "$enable_sound" = "no"; then + [ac_pjmedia_snd=null] + AC_MSG_RESULT([Checking if sound is disabled... yes]) + fi + ] +) dnl # Use external PortAudio installation AC_SUBST(ac_external_pa,0) AC_ARG_WITH(external-pa, AS_HELP_STRING([--with-external-pa], - [Use external PortAudio development files. When this option is set, make sure that PortAudio is accessible to use (hint: use CFLAGS and LDFLAGS env var to set the include/lib paths)]), - [ - if test "x$with_external_pa" != "xno"; then - # Test PortAudio installation - AC_MSG_CHECKING([if external PortAudio devkit is installed]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include - ]], - [Pa_Initialize();])], - [AC_MSG_RESULT(yes!!) - ac_external_pa="1" - ], - [AC_MSG_ERROR([Unable to use PortAudio. If PortAudio development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths])]) - fi + [Use external PortAudio development files. When this option is set, make sure that PortAudio is accessible to use (hint: use CFLAGS and LDFLAGS env var to set the include/lib paths)]), + [ + if test "x$with_external_pa" != "xno"; then + # Test PortAudio installation + AC_MSG_CHECKING([if external PortAudio devkit is installed]) + AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([ + [#include ]], + [Pa_Initialize();]) + ], + [ + AC_MSG_RESULT(yes!!) + ac_external_pa="1" + ], + [ + AC_MSG_ERROR([Unable to use PortAudio. If PortAudio development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths]) + ] + ) + fi ] - ) +) AC_SUBST(ac_pa_cflags) -AC_CHECK_HEADER(sys/soundcard.h, - [ac_pa_cflags="$ac_pa_cflags -DHAVE_SYS_SOUNDCARD_H"]) -AC_CHECK_HEADER(linux/soundcard.h, - [ac_pa_cflags="$ac_pa_cflags -DHAVE_LINUX_SOUNDCARD_H"]) -AC_CHECK_HEADER(machine/soundcard.h, - [ac_pa_cflags="$ac_pa_cflags -DHAVE_MACHINE_SOUNDCARD_H"]) +AC_CHECK_HEADER(sys/soundcard.h, [ac_pa_cflags="$ac_pa_cflags -DHAVE_SYS_SOUNDCARD_H"]) +AC_CHECK_HEADER(linux/soundcard.h, [ac_pa_cflags="$ac_pa_cflags -DHAVE_LINUX_SOUNDCARD_H"]) +AC_CHECK_HEADER(machine/soundcard.h, [ac_pa_cflags="$ac_pa_cflags -DHAVE_MACHINE_SOUNDCARD_H"]) if test "x$ac_cv_c_bigendian" = "xyes"; then - ac_pa_cflags="$ac_pa_cflags -DPA_BIG_ENDIAN" + ac_pa_cflags="$ac_pa_cflags -DPA_BIG_ENDIAN" else - ac_pa_cflags="$ac_pa_cflags -DPA_LITTLE_ENDIAN" + ac_pa_cflags="$ac_pa_cflags -DPA_LITTLE_ENDIAN" fi - dnl # Enable Android Oboe audio device AC_SUBST(ac_oboe_cflags) AC_SUBST(ac_oboe_ldflags) AC_ARG_WITH(oboe, - AS_HELP_STRING([--with-oboe], - [Enable Android Oboe audio device backend.]), - [ - if test "x$with_oboe" != "xno" -a "x$with_oboe" != "x"; then - OBOE_PREFIX=$with_oboe - OBOE_CFLAGS="-I$OBOE_PREFIX/prefab/modules/oboe/include" - OBOE_LDFLAGS="-L$OBOE_PREFIX/prefab/modules/oboe/libs/android.$TARGET_ABI" - AC_MSG_RESULT([Using Oboe prefix... $with_oboe]) - else - OBOE_CFLAGS="" - OBOE_LDFLAGS="" - fi - - AC_MSG_CHECKING([Oboe usability]) - - OBOE_LIBS="-loboe -lOpenSLES -llog" - - SAVED_LIBS="$LIBS" - SAVED_LDFLAGS="$LDFLAGS" - SAVED_CXXFLAGS="$CXXFLAGS" - - LIBS="$OBOE_LIBS $LIBS" - LDFLAGS="$OBOE_LDFLAGS $LDFLAGS" - CXXFLAGS="$OBOE_CFLAGS $CXXFLAGS" - - AC_LANG_PUSH([C++]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], - [oboe::AudioStreamBuilder sb; sb.setDeviceId(0);] - )], - [ ac_oboe_cflags="-DPJMEDIA_AUDIO_DEV_HAS_OBOE=1 $OBOE_CFLAGS" - ac_oboe_ldflags="$OBOE_LDFLAGS $OBOE_LIBS" - AC_MSG_RESULT(yes) - ], - [ - LIBS="$SAVED_LIBS" - LDFLAGS="$SAVED_LDFLAGS" - AC_MSG_RESULT(no) - ]) - AC_LANG_POP([C++]) - - # Put back original CXXFLAGS as app won't needed it. - CXXFLAGS="$SAVED_CFLAGS" + AS_HELP_STRING([--with-oboe], [Enable Android Oboe audio device backend.]), + [ + if test "x$with_oboe" != "xno" -a "x$with_oboe" != "x"; then + OBOE_PREFIX=$with_oboe + OBOE_CFLAGS="-I$OBOE_PREFIX/prefab/modules/oboe/include" + OBOE_LDFLAGS="-L$OBOE_PREFIX/prefab/modules/oboe/libs/android.$TARGET_ABI" + AC_MSG_RESULT([Using Oboe prefix... $with_oboe]) + else + OBOE_CFLAGS="" + OBOE_LDFLAGS="" + fi + + AC_MSG_CHECKING([Oboe usability]) + + OBOE_LIBS="-loboe -lOpenSLES -llog" + + SAVED_LIBS="$LIBS" + SAVED_LDFLAGS="$LDFLAGS" + SAVED_CXXFLAGS="$CXXFLAGS" + + LIBS="$OBOE_LIBS $LIBS" + LDFLAGS="$OBOE_LDFLAGS $LDFLAGS" + CXXFLAGS="$OBOE_CFLAGS $CXXFLAGS" + + AC_LANG_PUSH([C++]) + AC_LINK_IFELSE( + [ + AC_LANG_PROGRAM([ + [#include ]], + [oboe::AudioStreamBuilder sb; sb.setDeviceId(0);]) + ], + [ + ac_oboe_cflags="-DPJMEDIA_AUDIO_DEV_HAS_OBOE=1 $OBOE_CFLAGS" + ac_oboe_ldflags="$OBOE_LDFLAGS $OBOE_LIBS" + AC_MSG_RESULT(yes) + ], + [ + LIBS="$SAVED_LIBS" + LDFLAGS="$SAVED_LDFLAGS" + AC_MSG_RESULT(no) + ] + ) + AC_LANG_POP([C++]) + + # Put back original CXXFLAGS as app won't needed it. + CXXFLAGS="$SAVED_CFLAGS" ] - ) +) if test "$enable_sound" = "no"; then - true; + true; else - AC_SUBST(ac_pjmedia_audiodev_objs) - case $target in - *android*) - if test "x$ac_oboe_cflags" != "x"; then - AC_MSG_RESULT([Checking sound device backend... Oboe]) - else - LIBS="$LIBS -lOpenSLES" - AC_MSG_RESULT([Checking sound device backend... Android]) - fi - ;; - *-apple-darwin_ios*) - LIBS="$LIBS -framework CoreAudio -framework CoreFoundation -framework AudioToolbox -framework CFNetwork -framework UIKit -framework AVFoundation" - ac_pjmedia_audiodev_objs="coreaudio_dev.o" - AC_MSG_RESULT([Checking sound device backend... AudioUnit]) - ;; - *darwin*) - LIBS="$LIBS -framework CoreAudio -framework CoreServices -framework AudioUnit -framework AudioToolbox" - ac_pjmedia_audiodev_objs="coreaudio_dev.o" - if test "`uname -r`" = "6.8"; then - #ac_pa_cflags="$ac_pa_cflags -DPA_OLD_CORE_AUDIO -DMOSX_USE_NON_ATOMIC_FLAG_BITS" - #AC_MSG_RESULT([Setting additional PortAudio CFLAGS.. -DPA_OLD_CORE_AUDIO -DMOSX_USE_NON_ATOMIC_FLAG_BITS]) - #ac_pjmedia_snd=pa_old_darwinos - AC_MSG_RESULT([Checking sound device backend... old coreaudio]) - else - ac_pjmedia_snd=coreaudio - AC_MSG_RESULT([Checking sound device backend... coreaudio]) - fi - ;; - *cygwin* | *mingw*) - ac_pjmedia_snd=win32 - AC_MSG_RESULT([Checking sound device backend... win32 sound]) - ;; - *rtems*) - ac_pjmedia_snd=null - AC_MSG_RESULT([Checking sound device backend... null sound]) - ;; - *) - if test "x$ac_external_pa" != "x1"; then - dnl # Check if ALSA is available - AC_CHECK_HEADER(alsa/version.h, - [LIBS="$LIBS -lasound" - ac_pjmedia_snd=alsa]) - if test "x$ac_pjmedia_snd" = "xalsa"; then - AC_MSG_RESULT([Checking sound device backend... alsa]) - else - ac_pjmedia_snd=null - AC_MSG_RESULT([Checking sound device backend... null sound]) - fi - fi - ;; - esac + AC_SUBST(ac_pjmedia_audiodev_objs) + case $target in + *android*) + if test "x$ac_oboe_cflags" != "x"; then + AC_MSG_RESULT([Checking sound device backend... Oboe]) + else + LIBS="$LIBS -lOpenSLES" + AC_MSG_RESULT([Checking sound device backend... Android]) + fi + ;; + *-apple-darwin_ios*) + LIBS="$LIBS -framework CoreAudio -framework CoreFoundation -framework AudioToolbox -framework CFNetwork -framework UIKit -framework AVFoundation" + ac_pjmedia_audiodev_objs="coreaudio_dev.o" + AC_MSG_RESULT([Checking sound device backend... AudioUnit]) + ;; + *darwin*) + LIBS="$LIBS -framework CoreAudio -framework CoreServices -framework AudioUnit -framework AudioToolbox" + ac_pjmedia_audiodev_objs="coreaudio_dev.o" + if test "`uname -r`" = "6.8"; then + #ac_pa_cflags="$ac_pa_cflags -DPA_OLD_CORE_AUDIO -DMOSX_USE_NON_ATOMIC_FLAG_BITS" + #AC_MSG_RESULT([Setting additional PortAudio CFLAGS.. -DPA_OLD_CORE_AUDIO -DMOSX_USE_NON_ATOMIC_FLAG_BITS]) + #ac_pjmedia_snd=pa_old_darwinos + AC_MSG_RESULT([Checking sound device backend... old coreaudio]) + else + ac_pjmedia_snd=coreaudio + AC_MSG_RESULT([Checking sound device backend... coreaudio]) + fi + ;; + *cygwin* | *mingw*) + ac_pjmedia_snd=win32 + AC_MSG_RESULT([Checking sound device backend... win32 sound]) + ;; + *rtems*) + ac_pjmedia_snd=null + AC_MSG_RESULT([Checking sound device backend... null sound]) + ;; + *) + if test "x$ac_external_pa" != "x1"; then + dnl # Check if ALSA is available + AC_CHECK_HEADER(alsa/version.h, + [LIBS="$LIBS -lasound" + ac_pjmedia_snd=alsa]) + if test "x$ac_pjmedia_snd" = "xalsa"; then + AC_MSG_RESULT([Checking sound device backend... alsa]) + else + ac_pjmedia_snd=null + AC_MSG_RESULT([Checking sound device backend... null sound]) + fi + fi + ;; + esac fi AC_SUBST(ac_pjmedia_video) # Disable video on mingw by default (but respect --enable-video=yes) case $target in - *mingw*) - if test ! "$enable_video" = "yes"; then - enable_video="no" - fi - ;; + *mingw*) + if test ! "$enable_video" = "yes"; then + enable_video="no" + fi + ;; esac dnl # --disable-video option AC_ARG_ENABLE(video, - AS_HELP_STRING([--disable-video], - [Disable video feature]), - [if test "$enable_video" = "no"; then - #AC_DEFINE(PJMEDIA_HAS_VIDEO,0) - AC_MSG_RESULT([Video is disabled]) - enable_sdl="no" - enable_ffmpeg="no" - enable_v4l2="no" - enable_openh264="no" - enable_libyuv="no" - enable_vpx="no" - fi], - []) + AS_HELP_STRING([--disable-video], [Disable video feature]), + [ + if test "$enable_video" = "no"; then + #AC_DEFINE(PJMEDIA_HAS_VIDEO,0) + AC_MSG_RESULT([Video is disabled]) + enable_sdl="no" + enable_ffmpeg="no" + enable_v4l2="no" + enable_openh264="no" + enable_libyuv="no" + enable_vpx="no" + fi + ], + [] +) case $target in - *android*) - LIBS="$LIBS -llog" - ;; - *-apple-darwin_ios*) - LIBS="$LIBS -framework UIKit" - ;; - *darwin*) - LIBS="$LIBS -framework Foundation -framework AppKit" - ;; + *android*) + LIBS="$LIBS -llog" + ;; + *-apple-darwin_ios*) + LIBS="$LIBS -framework UIKit" + ;; + *darwin*) + LIBS="$LIBS -framework Foundation -framework AppKit" + ;; esac if test "$enable_video" = "no"; then - true; + true; else - case $target in - *android*) - ac_pjmedia_video=android_os - AC_SUBST(ac_pjmedia_video_has_android) - AC_SUBST(ac_android_cflags) - SAVED_LIBS="$LIBS" - LIBS="-lGLESv2 -lEGL -landroid -lc" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [])],[ac_pjmedia_video_has_android=yes],[ac_pjmedia_video_has_android=no]) - LIBS="$SAVED_LIBS" - if test "$ac_pjmedia_video_has_android" = "yes"; then - ac_android_cflags="-DPJMEDIA_VIDEO_DEV_HAS_ANDROID_OPENGL=1" - LIBS="$LIBS -lGLESv2 -lEGL -landroid" - AC_MSG_RESULT([Checking if OpenGL ES 2 is available... yes]) - else - AC_MSG_RESULT([Checking if OpenGL ES 2 is available... no]) - fi - ac_android_cflags="$ac_android_cflags -DPJMEDIA_VIDEO_DEV_HAS_ANDROID=1" - ;; - *mingw*) - if test "$enable_video" = "yes"; then - ac_pjmedia_video=windows_os - AC_SUBST(ac_pjmedia_video_dev_has_dshow) - ac_pjmedia_video_dev_has_dshow=yes - AC_SUBST(ac_dshow_cflags) - ac_dshow_cflags="-DPJMEDIA_HAS_VIDEO=1 -DPJMEDIA_VIDEO_DEV_HAS_DSHOW=1" - AC_SUBST(ac_dshow_ldflags) - ac_dshow_ldflags=" -lstdc++ -lquartz -lole32 -loleaut32 -lrpcrt4 -lwinmm -luuid -lmingwex -lstrmiids " - LIBS="$LIBS -lstdc++ -lquartz -lole32 -loleaut32 -lrpcrt4 -lwinmm -luuid -lmingwex -lstrmiids " - fi - ;; - *darwin*) - ac_pjmedia_video=darwin_os - AC_SUBST(ac_pjmedia_video_has_darwin) - AC_SUBST(ac_pjmedia_video_has_metal) - AC_SUBST(ac_pjmedia_video_has_vtoolbox) - AC_SUBST(ac_pjmedia_video_has_ios_opengl) - AC_SUBST(ac_darwin_cflags) - SAVED_LIBS="$LIBS" - LIBS="-framework AVFoundation -framework CoreGraphics -framework QuartzCore -framework CoreVideo -framework CoreMedia" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [])], - [ac_pjmedia_video_has_darwin=yes], - [ac_pjmedia_video_has_darwin=no]) - LIBS="-framework VideoToolbox" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [])], - [ac_pjmedia_video_has_vtoolbox=yes], - [ac_pjmedia_video_has_vtoolbox=no]) - LIBS="-framework Metal" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [])], - [ac_pjmedia_video_has_metal=yes], - [ac_pjmedia_video_has_metal=no]) - LIBS="-framework OpenGLES" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [])], - [ac_pjmedia_video_has_ios_opengl=yes], - [ac_pjmedia_video_has_ios_opengl=no]) - LIBS="$SAVED_LIBS" - if test "$ac_pjmedia_video_has_darwin" = "yes"; then - ac_darwin_cflags="-DPJMEDIA_VIDEO_DEV_HAS_DARWIN=1" - LIBS="$LIBS -framework AVFoundation -framework CoreGraphics -framework QuartzCore -framework CoreVideo -framework CoreMedia" - AC_MSG_RESULT([Checking if AVFoundation framework is available... yes]) - else - AC_MSG_RESULT([Checking if AVFoundation framework is available... no]) - fi - if test "$ac_pjmedia_video_has_metal" = "yes"; then - ac_darwin_cflags+=" -DPJMEDIA_VIDEO_DEV_HAS_METAL=1" - LIBS="$LIBS -framework Metal -framework MetalKit" - AC_MSG_RESULT([Checking if Metal framework is available... yes]) - else - AC_MSG_RESULT([Checking if Metal framework is available... no]) - fi - if test "$ac_pjmedia_video_has_vtoolbox" = "yes"; then - #ac_darwin_cflags+=" -DPJMEDIA_HAS_VID_TOOLBOX_CODEC=1" - LIBS="$LIBS -framework VideoToolbox" - AC_MSG_RESULT([Checking if VideoToolbox framework is available... yes]) - else - AC_MSG_RESULT([Checking if VideoToolbox framework is available... no]) - fi - if test "$ac_pjmedia_video_has_ios_opengl" = "yes"; then - ac_darwin_cflags+=" -DPJMEDIA_VIDEO_DEV_HAS_IOS_OPENGL=1" - LIBS="$LIBS -framework OpenGLES" - AC_MSG_RESULT([Checking if OpenGLES framework is available... yes]) - else - AC_MSG_RESULT([Checking if OpenGLES framework is available... no]) - fi - if false; then - # QTKit is deprecated, see ticket #1931. - ac_pjmedia_video=mac_os - AC_SUBST(ac_pjmedia_video_has_qt) - AC_SUBST(ac_qt_cflags) - SAVED_LIBS="$LIBS" - LIBS="-framework QTKit" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [])],[ac_pjmedia_video_has_qt=yes],[ac_pjmedia_video_has_qt=no]) - LIBS="$SAVED_LIBS" - if test "$ac_pjmedia_video_has_qt" = "yes"; then - ac_qt_cflags="-DPJMEDIA_VIDEO_DEV_HAS_QT=1" - LIBS="$LIBS -framework QTKit -framework QuartzCore -framework OpenGL" - AC_MSG_RESULT([Checking if QTKit framework is available... yes]) - else - AC_MSG_RESULT([Checking if QTKit framework is available... no]) - fi - fi - ;; - esac + case $target in + *android*) + ac_pjmedia_video=android_os + AC_SUBST(ac_pjmedia_video_has_android) + AC_SUBST(ac_android_cflags) + SAVED_LIBS="$LIBS" + LIBS="-lGLESv2 -lEGL -landroid -lc" + AC_LINK_IFELSE( + [ + AC_LANG_PROGRAM([[]], []) + ], + [ac_pjmedia_video_has_android=yes], + [ac_pjmedia_video_has_android=no] + ) + LIBS="$SAVED_LIBS" + if test "$ac_pjmedia_video_has_android" = "yes"; then + ac_android_cflags="-DPJMEDIA_VIDEO_DEV_HAS_ANDROID_OPENGL=1" + LIBS="$LIBS -lGLESv2 -lEGL -landroid" + AC_MSG_RESULT([Checking if OpenGL ES 2 is available... yes]) + else + AC_MSG_RESULT([Checking if OpenGL ES 2 is available... no]) + fi + ac_android_cflags="$ac_android_cflags -DPJMEDIA_VIDEO_DEV_HAS_ANDROID=1" + ;; + *mingw*) + if test "$enable_video" = "yes"; then + ac_pjmedia_video=windows_os + AC_SUBST(ac_pjmedia_video_dev_has_dshow) + ac_pjmedia_video_dev_has_dshow=yes + AC_SUBST(ac_dshow_cflags) + ac_dshow_cflags="-DPJMEDIA_HAS_VIDEO=1 -DPJMEDIA_VIDEO_DEV_HAS_DSHOW=1" + AC_SUBST(ac_dshow_ldflags) + ac_dshow_ldflags=" -lstdc++ -lquartz -lole32 -loleaut32 -lrpcrt4 -lwinmm -luuid -lmingwex -lstrmiids " + LIBS="$LIBS -lstdc++ -lquartz -lole32 -loleaut32 -lrpcrt4 -lwinmm -luuid -lmingwex -lstrmiids " + fi + ;; + *darwin*) + ac_pjmedia_video=darwin_os + AC_SUBST(ac_pjmedia_video_has_darwin) + AC_SUBST(ac_pjmedia_video_has_metal) + AC_SUBST(ac_pjmedia_video_has_vtoolbox) + AC_SUBST(ac_pjmedia_video_has_ios_opengl) + AC_SUBST(ac_darwin_cflags) + SAVED_LIBS="$LIBS" + + LIBS="-framework AVFoundation -framework CoreGraphics -framework QuartzCore -framework CoreVideo -framework CoreMedia" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[]], [])], + [ac_pjmedia_video_has_darwin=yes], + [ac_pjmedia_video_has_darwin=no] + ) + + LIBS="-framework VideoToolbox" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[]], [])], + [ac_pjmedia_video_has_vtoolbox=yes], + [ac_pjmedia_video_has_vtoolbox=no]) + + LIBS="-framework Metal" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[]], [])], + [ac_pjmedia_video_has_metal=yes], + [ac_pjmedia_video_has_metal=no]) + + LIBS="-framework OpenGLES" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[]], [])], + [ac_pjmedia_video_has_ios_opengl=yes], + [ac_pjmedia_video_has_ios_opengl=no]) + + LIBS="$SAVED_LIBS" + if test "$ac_pjmedia_video_has_darwin" = "yes"; then + ac_darwin_cflags="-DPJMEDIA_VIDEO_DEV_HAS_DARWIN=1" + LIBS="$LIBS -framework AVFoundation -framework CoreGraphics -framework QuartzCore -framework CoreVideo -framework CoreMedia" + AC_MSG_RESULT([Checking if AVFoundation framework is available... yes]) + else + AC_MSG_RESULT([Checking if AVFoundation framework is available... no]) + fi + + if test "$ac_pjmedia_video_has_metal" = "yes"; then + ac_darwin_cflags+=" -DPJMEDIA_VIDEO_DEV_HAS_METAL=1" + LIBS="$LIBS -framework Metal -framework MetalKit" + AC_MSG_RESULT([Checking if Metal framework is available... yes]) + else + AC_MSG_RESULT([Checking if Metal framework is available... no]) + fi + + if test "$ac_pjmedia_video_has_vtoolbox" = "yes"; then + #ac_darwin_cflags+=" -DPJMEDIA_HAS_VID_TOOLBOX_CODEC=1" + LIBS="$LIBS -framework VideoToolbox" + AC_MSG_RESULT([Checking if VideoToolbox framework is available... yes]) + else + AC_MSG_RESULT([Checking if VideoToolbox framework is available... no]) + fi + + if test "$ac_pjmedia_video_has_ios_opengl" = "yes"; then + ac_darwin_cflags+=" -DPJMEDIA_VIDEO_DEV_HAS_IOS_OPENGL=1" + LIBS="$LIBS -framework OpenGLES" + AC_MSG_RESULT([Checking if OpenGLES framework is available... yes]) + else + AC_MSG_RESULT([Checking if OpenGLES framework is available... no]) + fi + + if false; then + # QTKit is deprecated, see ticket #1931. + ac_pjmedia_video=mac_os + AC_SUBST(ac_pjmedia_video_has_qt) + AC_SUBST(ac_qt_cflags) + SAVED_LIBS="$LIBS" + LIBS="-framework QTKit" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [])],[ac_pjmedia_video_has_qt=yes],[ac_pjmedia_video_has_qt=no]) + LIBS="$SAVED_LIBS" + if test "$ac_pjmedia_video_has_qt" = "yes"; then + ac_qt_cflags="-DPJMEDIA_VIDEO_DEV_HAS_QT=1" + LIBS="$LIBS -framework QTKit -framework QuartzCore -framework OpenGL" + AC_MSG_RESULT([Checking if QTKit framework is available... yes]) + else + AC_MSG_RESULT([Checking if QTKit framework is available... no]) + fi + fi + ;; + esac fi AC_ARG_ENABLE(ext_sound, - AS_HELP_STRING([--enable-ext-sound], - [PJMEDIA will not provide any sound device backend]), - [if test "$enable_ext_sound" = "yes"; then - [ac_pjmedia_snd=external] - AC_MSG_RESULT([Checking if external sound is set... yes]) - fi] - ) + AS_HELP_STRING([--enable-ext-sound], [PJMEDIA will not provide any sound device backend]), + [ + if test "$enable_ext_sound" = "yes"; then + [ac_pjmedia_snd=external] + AC_MSG_RESULT([Checking if external sound is set... yes]) + fi + ] +) dnl # Include resampling small filter AC_SUBST(ac_no_small_filter) AC_ARG_ENABLE(small-filter, - AS_HELP_STRING([--disable-small-filter], - [Exclude small filter in resampling]), - [if test "$enable_small_filter" = "no"; then - [ac_no_small_filter='-DPJMEDIA_HAS_SMALL_FILTER=0'] - AC_MSG_RESULT([Checking if small filter is disabled... yes]) - fi], - AC_MSG_RESULT([Checking if small filter is disabled... no])) + AS_HELP_STRING([--disable-small-filter], [Exclude small filter in resampling]), + [ + if test "$enable_small_filter" = "no"; then + [ac_no_small_filter='-DPJMEDIA_HAS_SMALL_FILTER=0'] + AC_MSG_RESULT([Checking if small filter is disabled... yes]) + fi + ], + AC_MSG_RESULT([Checking if small filter is disabled... no]) +) dnl # Include resampling large filter AC_SUBST(ac_no_large_filter) AC_ARG_ENABLE(large-filter, - AS_HELP_STRING([--disable-large-filter], - [Exclude large filter in resampling]), - [if test "$enable_large_filter" = "no"; then - [ac_no_large_filter='-DPJMEDIA_HAS_LARGE_FILTER=0'] - AC_MSG_RESULT([Checking if large filter is disabled... yes]) - fi], - AC_MSG_RESULT([Checking if large filter is disabled... no])) + AS_HELP_STRING([--disable-large-filter],[Exclude large filter in resampling]), + [ + if test "$enable_large_filter" = "no"; then + [ac_no_large_filter='-DPJMEDIA_HAS_LARGE_FILTER=0'] + AC_MSG_RESULT([Checking if large filter is disabled... yes]) + fi + ], + AC_MSG_RESULT([Checking if large filter is disabled... no]) +) dnl # Include Speex AEC AC_SUBST(ac_no_speex_aec) AC_ARG_ENABLE(speex-aec, - AS_HELP_STRING([--disable-speex-aec], - [Exclude Speex Acoustic Echo Canceller/AEC]), - [if test "$enable_speex_aec" = "no"; then - [ac_no_speex_aec='-DPJMEDIA_HAS_SPEEX_AEC=0'] - AC_MSG_RESULT([Checking if Speex AEC is disabled...yes]) - fi], - AC_MSG_RESULT([Checking if Speex AEC is disabled...no])) + AS_HELP_STRING([--disable-speex-aec], [Exclude Speex Acoustic Echo Canceller/AEC]), + [ + if test "$enable_speex_aec" = "no"; then + [ac_no_speex_aec='-DPJMEDIA_HAS_SPEEX_AEC=0'] + AC_MSG_RESULT([Checking if Speex AEC is disabled...yes]) + fi + ], + AC_MSG_RESULT([Checking if Speex AEC is disabled...no]) +) dnl # Include G711 codec AC_SUBST(ac_no_g711_codec) AC_ARG_ENABLE(g711-codec, - AS_HELP_STRING([--disable-g711-codec], - [Exclude G.711 codecs from the build]), - [if test "$enable_g711_codec" = "no"; then - [ac_no_g711_codec=1] - AC_DEFINE(PJMEDIA_HAS_G711_CODEC,0) - AC_MSG_RESULT([Checking if G.711 codec is disabled...yes]) - fi], - AC_MSG_RESULT([Checking if G.711 codec is disabled...no])) + AS_HELP_STRING([--disable-g711-codec], [Exclude G.711 codecs from the build]), + [ + if test "$enable_g711_codec" = "no"; then + [ac_no_g711_codec=1] + AC_DEFINE(PJMEDIA_HAS_G711_CODEC,0) + AC_MSG_RESULT([Checking if G.711 codec is disabled...yes]) + fi + ], + AC_MSG_RESULT([Checking if G.711 codec is disabled...no]) +) dnl # Include L16 codec AC_SUBST(ac_no_l16_codec) AC_ARG_ENABLE(l16-codec, - AS_HELP_STRING([--disable-l16-codec], - [Exclude Linear/L16 codec family from the build]), - [if test "$enable_l16_codec" = "no"; then - [ac_no_l16_codec=1] - AC_DEFINE(PJMEDIA_HAS_L16_CODEC,0) - AC_MSG_RESULT([Checking if L16 codecs are disabled...yes]) - fi], - AC_MSG_RESULT([Checking if L16 codec is disabled...no])) - + AS_HELP_STRING([--disable-l16-codec], [Exclude Linear/L16 codec family from the build]), + [ + if test "$enable_l16_codec" = "no"; then + [ac_no_l16_codec=1] + AC_DEFINE(PJMEDIA_HAS_L16_CODEC,0) + AC_MSG_RESULT([Checking if L16 codecs are disabled...yes]) + fi + ], + AC_MSG_RESULT([Checking if L16 codec is disabled...no]) +) dnl # Include GSM codec AC_SUBST(ac_no_gsm_codec) AC_ARG_ENABLE(gsm-codec, - AS_HELP_STRING([--disable-gsm-codec], - [Exclude GSM codec in the build]), - [if test "$enable_gsm_codec" = "no"; then - [ac_no_gsm_codec=1] - AC_DEFINE(PJMEDIA_HAS_GSM_CODEC,0) - AC_MSG_RESULT([Checking if GSM codec is disabled...yes]) - fi], - AC_MSG_RESULT([Checking if GSM codec is disabled...no])) + AS_HELP_STRING([--disable-gsm-codec], [Exclude GSM codec in the build]), + [ + if test "$enable_gsm_codec" = "no"; then + [ac_no_gsm_codec=1] + AC_DEFINE(PJMEDIA_HAS_GSM_CODEC,0) + AC_MSG_RESULT([Checking if GSM codec is disabled...yes]) + fi + ], + AC_MSG_RESULT([Checking if GSM codec is disabled...no]) +) dnl # Include G.722 codec AC_SUBST(ac_no_g722_codec) AC_ARG_ENABLE(g722-codec, - AS_HELP_STRING([--disable-g722-codec], - [Exclude G.722 codec in the build]), - [if test "$enable_g722_codec" = "no"; then - [ac_no_g722_codec=1] - AC_DEFINE(PJMEDIA_HAS_G722_CODEC,0) - AC_MSG_RESULT([Checking if G.722 codec is disabled...yes]) - fi], - AC_MSG_RESULT([Checking if G.722 codec is disabled...no])) + AS_HELP_STRING([--disable-g722-codec], [Exclude G.722 codec in the build]), + [ + if test "$enable_g722_codec" = "no"; then + [ac_no_g722_codec=1] + AC_DEFINE(PJMEDIA_HAS_G722_CODEC,0) + AC_MSG_RESULT([Checking if G.722 codec is disabled...yes]) + fi + ], + AC_MSG_RESULT([Checking if G.722 codec is disabled...no]) +) dnl # Include G722.1 codec AC_SUBST(ac_no_g7221_codec) AC_ARG_ENABLE(g7221-codec, - AS_HELP_STRING([--disable-g7221-codec], - [Exclude G.7221 codec in the build]), - [if test "$enable_g7221_codec" = "no"; then - [ac_no_g7221_codec=1] - AC_DEFINE(PJMEDIA_HAS_G7221_CODEC,0) - AC_MSG_RESULT([Checking if G.722.1 codec is disabled...yes]) - fi], - AC_MSG_RESULT([Checking if G.722.1 codec is disabled...no])) + AS_HELP_STRING([--disable-g7221-codec], [Exclude G.7221 codec in the build]), + [ + if test "$enable_g7221_codec" = "no"; then + [ac_no_g7221_codec=1] + AC_DEFINE(PJMEDIA_HAS_G7221_CODEC,0) + AC_MSG_RESULT([Checking if G.722.1 codec is disabled...yes]) + fi + ], + AC_MSG_RESULT([Checking if G.722.1 codec is disabled...no]) +) dnl # Include Speex codec AC_SUBST(ac_no_speex_codec) AC_ARG_ENABLE(speex-codec, - AS_HELP_STRING([--disable-speex-codec], - [Exclude Speex codecs in the build]), - [if test "$enable_speex_codec" = "no"; then - [ac_no_speex_codec=1] - AC_DEFINE(PJMEDIA_HAS_SPEEX_CODEC,0) - AC_MSG_RESULT([Checking if Speex codec is disabled...yes]) - fi], - AC_MSG_RESULT([Checking if Speex codec is disabled...no])) + AS_HELP_STRING([--disable-speex-codec], [Exclude Speex codecs in the build]), + [ + if test "$enable_speex_codec" = "no"; then + [ac_no_speex_codec=1] + AC_DEFINE(PJMEDIA_HAS_SPEEX_CODEC,0) + AC_MSG_RESULT([Checking if Speex codec is disabled...yes]) + fi + ], + AC_MSG_RESULT([Checking if Speex codec is disabled...no]) +) dnl # Include iLBC codec AC_SUBST(ac_no_ilbc_codec) AC_ARG_ENABLE(ilbc-codec, - AS_HELP_STRING([--disable-ilbc-codec], - [Exclude iLBC codec in the build]), - [if test "$enable_ilbc_codec" = "no"; then - [ac_no_ilbc_codec=1] - AC_DEFINE(PJMEDIA_HAS_ILBC_CODEC,0) - AC_MSG_RESULT([Checking if iLBC codec is disabled...yes]) - fi], - AC_MSG_RESULT([Checking if iLBC codec is disabled...no])) + AS_HELP_STRING([--disable-ilbc-codec], [Exclude iLBC codec in the build]), + [ + if test "$enable_ilbc_codec" = "no"; then + [ac_no_ilbc_codec=1] + AC_DEFINE(PJMEDIA_HAS_ILBC_CODEC,0) + AC_MSG_RESULT([Checking if iLBC codec is disabled...yes]) + fi + ], + AC_MSG_RESULT([Checking if iLBC codec is disabled...no]) +) dnl # Include libsamplerate AC_ARG_ENABLE(libsamplerate, - AS_HELP_STRING([--enable-libsamplerate], - [Link with libsamplerate when available.]), - [ - if test "$enable_libsamplerate" = "yes"; then - AC_MSG_RESULT([Checking if libsamplerate is enabled...yes]) - AC_CHECK_LIB(samplerate,src_new) - [ac_pjmedia_resample=libsamplerate] - else - AC_MSG_RESULT([Checking if libsamplerate is enabled...no]) - fi - ], AC_MSG_RESULT([Checking if libsamplerate is enabled...no])) + AS_HELP_STRING([--enable-libsamplerate], [Link with libsamplerate when available.]), + [ + if test "$enable_libsamplerate" = "yes"; then + AC_MSG_RESULT([Checking if libsamplerate is enabled...yes]) + AC_CHECK_LIB(samplerate,src_new) + [ac_pjmedia_resample=libsamplerate] + else + AC_MSG_RESULT([Checking if libsamplerate is enabled...no]) + fi + ], + AC_MSG_RESULT([Checking if libsamplerate is enabled...no]) +) AC_SUBST(ac_resample_dll) AC_ARG_ENABLE(resample_dll, - AS_HELP_STRING([--enable-resample-dll], - [Build libresample as shared library]), - [if test "$enable_resample_dll" = "yes"; then - [ac_resample_dll=1] - AC_MSG_RESULT([Building libresample as shared library... yes]) - fi], - AC_MSG_RESULT([Building libresample as shared library... no]) - ) + AS_HELP_STRING([--enable-resample-dll], [Build libresample as shared library]), + [ + if test "$enable_resample_dll" = "yes"; then + [ac_resample_dll=1] + AC_MSG_RESULT([Building libresample as shared library... yes]) + fi + ], + AC_MSG_RESULT([Building libresample as shared library... no]) +) dnl # Include Speex resample AC_ARG_ENABLE(speex-resample, - AS_HELP_STRING([--enable-speex-resample], - [Enable Speex resample]), - [ - if test "$enable_speex_resample" = "yes"; then - AC_MSG_RESULT([Checking if Speex resample is enabled... yes]) - [ac_pjmedia_resample=speex] - else - AC_MSG_RESULT([Checking if Speex resample is enabled... no]) - fi - ], AC_MSG_RESULT([Checking if Speex resample is enabled... no])) + AS_HELP_STRING([--enable-speex-resample], [Enable Speex resample]), + [ + if test "$enable_speex_resample" = "yes"; then + AC_MSG_RESULT([Checking if Speex resample is enabled... yes]) + [ac_pjmedia_resample=speex] + else + AC_MSG_RESULT([Checking if Speex resample is enabled... no]) + fi + ], + AC_MSG_RESULT([Checking if Speex resample is enabled... no]) +) dnl # SDL alt prefix AC_ARG_WITH(sdl, - AS_HELP_STRING([--with-sdl=DIR], - [Specify alternate libSDL prefix]), + AS_HELP_STRING([--with-sdl=DIR], [Specify alternate libSDL prefix]), [], [with_sdl=no] - ) +) dnl # Do not use default SDL installation if we are cross-compiling if test "x$ac_cross_compile" != "x" -a "x$with_sdl" = "xno"; then - enable_sdl=no + nable_sdl=no fi dnl # SDL AC_ARG_ENABLE(sdl, - AS_HELP_STRING([--disable-sdl], - [Disable SDL (default: not disabled)]), - [ - if test "$enable_sdl" = "no"; then - AC_MSG_RESULT([Checking if SDL is disabled... yes]) - fi - ], - [ - if test "x$with_sdl" != "xno" -a "x$with_sdl" != "x"; then - AC_MSG_RESULT([Using SDL prefix... $with_sdl]) - AC_PATH_PROGS(SDL_CONFIG,sdl2-config sdl-config,,$with_sdl/bin) - else - AC_PATH_PROGS(SDL_CONFIG, sdl2-config sdl-config) - fi - - AC_MSG_CHECKING([SDL availability]) - if test "x$SDL_CONFIG" = "x"; then - AC_MSG_RESULT([not found]) - elif (sh -c "$SDL_CONFIG --version" | grep -e '^1\.3' -e '^2\.') then - AC_SUBST(ac_sdl_cflags) - AC_SUBST(ac_sdl_ldflags) - ac_sdl_cflags=`$SDL_CONFIG --cflags` - ac_sdl_cflags="-DPJMEDIA_VIDEO_DEV_HAS_SDL=1 $ac_sdl_cflags" - ac_sdl_ldflags=`$SDL_CONFIG --libs` - ac_sdl_ldflags=`echo "${ac_sdl_ldflags}" | sed -e 's/-mwindows//g'` - LIBS="$LIBS $ac_sdl_ldflags" - else - AC_MSG_RESULT([Unsupported SDL version]) - fi - ]) - + AS_HELP_STRING([--disable-sdl], [Disable SDL (default: not disabled)]), + [ + if test "$enable_sdl" = "no"; then + AC_MSG_RESULT([Checking if SDL is disabled... yes]) + fi + ], + [ + if test "x$with_sdl" != "xno" -a "x$with_sdl" != "x"; then + AC_MSG_RESULT([Using SDL prefix... $with_sdl]) + AC_PATH_PROGS(SDL_CONFIG,sdl2-config sdl-config,,$with_sdl/bin) + else + AC_PATH_PROGS(SDL_CONFIG, sdl2-config sdl-config) + fi + + AC_MSG_CHECKING([SDL availability]) + if test "x$SDL_CONFIG" = "x"; then + AC_MSG_RESULT([not found]) + elif (sh -c "$SDL_CONFIG --version" | grep -e '^1\.3' -e '^2\.') then + AC_SUBST(ac_sdl_cflags) + AC_SUBST(ac_sdl_ldflags) + ac_sdl_cflags=`$SDL_CONFIG --cflags` + ac_sdl_cflags="-DPJMEDIA_VIDEO_DEV_HAS_SDL=1 $ac_sdl_cflags" + ac_sdl_ldflags=`$SDL_CONFIG --libs` + ac_sdl_ldflags=`echo "${ac_sdl_ldflags}" | sed -e 's/-mwindows//g'` + LIBS="$LIBS $ac_sdl_ldflags" + else + AC_MSG_RESULT([Unsupported SDL version]) + fi + ] +) AC_ARG_WITH(ffmpeg, - AS_HELP_STRING([--with-ffmpeg=DIR], - [Specify alternate FFMPEG prefix]), + AS_HELP_STRING([--with-ffmpeg=DIR], [Specify alternate FFMPEG prefix]), [], [with_ffmpeg=no] - ) +) dnl # Do not use default ffmpeg installation if we are cross-compiling if test "x$ac_cross_compile" != "x" -a "x$with_ffmpeg" = "xno"; then @@ -1353,157 +1565,133 @@ fi dnl # FFMPEG stuffs AC_ARG_ENABLE(ffmpeg, - AS_HELP_STRING([--disable-ffmpeg], - [Disable ffmpeg (default: not disabled)]), - [ - AC_SUBST(ac_has_ffmpeg,0) - if test "$enable_ffmpeg" = "no"; then - AC_MSG_RESULT([Checking if ffmpeg is disabled... yes]) - fi - ], - [ - AC_SUBST(ac_ffmpeg_cflags) - AC_SUBST(ac_ffmpeg_ldflags) - - FFMPEG_PREFIX="" - AC_SUBST(SAVED_PKG_CONFIG_PATH) - SAVED_PKG_CONFIG_PATH=$PKG_CONFIG_PATH - if test "x$with_ffmpeg" != "xno" -a "x$with_ffmpeg" != "x"; then - FFMPEG_PREFIX=$with_ffmpeg - AC_MSG_RESULT([Using ffmpeg prefix... $FFMPEG_PREFIX]) - export PKG_CONFIG_PATH=$FFMPEG_PREFIX/lib/pkgconfig - fi - - AC_CHECK_PROGS(PKG_CONFIG,pkg-config "python pkgconfig.py",none) - - if test "$PKG_CONFIG" != "none"; then - AC_MSG_CHECKING([ffmpeg packages]) - av_pkg="" - if $PKG_CONFIG --exists libavdevice; then - ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVDEVICE=1" - av_pkg="$av_pkg libavdevice" - fi - if $PKG_CONFIG --exists libavformat; then - ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVFORMAT=1" - av_pkg="$av_pkg libavformat" - fi - if $PKG_CONFIG --exists libavcodec; then - ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVCODEC=1" - av_pkg="$av_pkg libavcodec" - fi - if $PKG_CONFIG --exists libswscale; then - ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBSWSCALE=1" - av_pkg="$av_pkg libswscale" - fi - if $PKG_CONFIG --exists libavutil; then - ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVUTIL=1" - av_pkg="$av_pkg libavutil" - fi - - if test "x$av_pkg" = "x"; then - AC_MSG_RESULT([none detected (check the prefix)! **]) - else - AC_MSG_RESULT([$av_pkg]) - fi - - ac_ffmpeg_cflags="$ac_ffmpeg_cflags `$PKG_CONFIG --cflags $av_pkg`" - ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags `$PKG_CONFIG --libs $av_pkg`" - - else - dnl # - dnl # Use hardcoded values to configure ffmpeg - dnl # - - AC_MSG_RESULT([*** Warning: neither pkg-config nor python is available, ffmpeg dependency cannot be calculated. If ffmpeg libraries are not detected, you need to specify the correct CFLAGS and LDFLAGS settings for ffmpeg prior to invoking configure ***]) - - LIBS="-L$FFMPEG_PREFIX/lib $LIBS" - LDFLAGS="-L$FFMPEG_PREFIX/lib $LDFLAGS" - CFLAGS="-I$FFMPEG_PREFIX/include $CFLAGS" - - AC_CHECK_LIB(avdevice, - avdevice_version, - [ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVDEVICE=1" - ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavdevice" - ] - ) - AC_CHECK_LIB(avutil, - av_malloc, - [ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVUTIL=1" - ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavutil" - ] - ) - AC_CHECK_LIB(avcodec, - avcodec_init, - [ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVCODEC=1" - ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavcodec" - ], - [], - [-lavutil] - ) - AC_CHECK_LIB(avformat, - av_register_all, - [ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVFORMAT=1" - ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavformat" - ], - [], - [-lavcodec -lavutil] - ) - AC_CHECK_LIB(swscale, - sws_scale, - [ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBSWSCALE=1" - ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lswscale" - ], - [], - [-lavutil] - ) - AC_CHECK_LIB(avcore, - avcore_version, - [ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVCORE=1" - ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavcore" - ] - ) - - fi - - AC_CHECK_TYPES(enum AVPixelFormat, - [], - [ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_USE_OLD_FFMPEG=1"], - [[#include ]] - ) - - LIBS="$LIBS $ac_ffmpeg_ldflags" - export PKG_CONFIG_PATH=$SAVED_PKG_CONFIG_PATH - ] - ) + AS_HELP_STRING([--disable-ffmpeg], [Disable ffmpeg (default: not disabled)]), + [ + AC_SUBST(ac_has_ffmpeg,0) + if test "$enable_ffmpeg" = "no"; then + AC_MSG_RESULT([Checking if ffmpeg is disabled... yes]) + fi + ], + [ + AC_SUBST(ac_ffmpeg_cflags) + AC_SUBST(ac_ffmpeg_ldflags) + + FFMPEG_PREFIX="" + AC_SUBST(SAVED_PKG_CONFIG_PATH) + SAVED_PKG_CONFIG_PATH=$PKG_CONFIG_PATH + if test "x$with_ffmpeg" != "xno" -a "x$with_ffmpeg" != "x"; then + FFMPEG_PREFIX=$with_ffmpeg + AC_MSG_RESULT([Using ffmpeg prefix... $FFMPEG_PREFIX]) + export PKG_CONFIG_PATH=$FFMPEG_PREFIX/lib/pkgconfig + fi + + AC_CHECK_PROGS(PKG_CONFIG,pkg-config "python pkgconfig.py",none) + + if test "$PKG_CONFIG" != "none"; then + AC_MSG_CHECKING([ffmpeg packages]) + av_pkg="" + if $PKG_CONFIG --exists libavdevice; then + ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVDEVICE=1" + av_pkg="$av_pkg libavdevice" + fi + if $PKG_CONFIG --exists libavformat; then + ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVFORMAT=1" + av_pkg="$av_pkg libavformat" + fi + if $PKG_CONFIG --exists libavcodec; then + ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVCODEC=1" + av_pkg="$av_pkg libavcodec" + fi + if $PKG_CONFIG --exists libswscale; then + ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBSWSCALE=1" + av_pkg="$av_pkg libswscale" + fi + if $PKG_CONFIG --exists libavutil; then + ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVUTIL=1" + av_pkg="$av_pkg libavutil" + fi + + if test "x$av_pkg" = "x"; then + AC_MSG_RESULT([none detected (check the prefix)! **]) + else + AC_MSG_RESULT([$av_pkg]) + fi + + ac_ffmpeg_cflags="$ac_ffmpeg_cflags `$PKG_CONFIG --cflags $av_pkg`" + ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags `$PKG_CONFIG --libs $av_pkg`" + + else + dnl # + dnl # Use hardcoded values to configure ffmpeg + dnl # + + AC_MSG_RESULT([*** Warning: neither pkg-config nor python is available, ffmpeg dependency cannot be calculated. If ffmpeg libraries are not detected, you need to specify the correct CFLAGS and LDFLAGS settings for ffmpeg prior to invoking configure ***]) + + LIBS="-L$FFMPEG_PREFIX/lib $LIBS" + LDFLAGS="-L$FFMPEG_PREFIX/lib $LDFLAGS" + CFLAGS="-I$FFMPEG_PREFIX/include $CFLAGS" + + AC_CHECK_LIB(avdevice, avdevice_version, [ + ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVDEVICE=1" + ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavdevice"]) + + AC_CHECK_LIB(avutil, av_malloc, [ + ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVUTIL=1" + ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavutil"]) + + AC_CHECK_LIB(avcodec, avcodec_init, [ + ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVCODEC=1" + ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavcodec"], + [], [-lavutil]) + + AC_CHECK_LIB(avformat, av_register_all, [ + ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVFORMAT=1" + ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavformat"], + [], [-lavcodec -lavutil]) + + AC_CHECK_LIB(swscale, sws_scale, [ + ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBSWSCALE=1" + ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lswscale"], + [], [-lavutil]) + + AC_CHECK_LIB(avcore, avcore_version, [ + ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVCORE=1" + ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavcore"]) + fi + + AC_CHECK_TYPES(enum AVPixelFormat,[],[ + ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_USE_OLD_FFMPEG=1"], + [[#include ]]) + + LIBS="$LIBS $ac_ffmpeg_ldflags" + export PKG_CONFIG_PATH=$SAVED_PKG_CONFIG_PATH + ] +) dnl # Video for Linux 2 AC_ARG_ENABLE(v4l2, - AS_HELP_STRING([--disable-v4l2], - [Disable Video4Linux2 (default: not disabled)]), - [ - if test "$enable_v4l2" = "no"; then - AC_MSG_RESULT([Checking if V4L2 is disabled... yes]) - fi - ], - [ - AC_SUBST(ac_v4l2_cflags) - AC_SUBST(ac_v4l2_ldflags) - AC_CHECK_LIB(v4l2, - v4l2_open, - [ac_v4l2_cflags="-DPJMEDIA_VIDEO_DEV_HAS_V4L2=1" - ac_v4l2_ldflags="-lv4l2" - LIBS="$LIBS -lv4l2" - ] - ) - ]) + AS_HELP_STRING([--disable-v4l2], [Disable Video4Linux2 (default: not disabled)]), + [ + if test "$enable_v4l2" = "no"; then + AC_MSG_RESULT([Checking if V4L2 is disabled... yes]) + fi + ], + [ + AC_SUBST(ac_v4l2_cflags) + AC_SUBST(ac_v4l2_ldflags) + AC_CHECK_LIB(v4l2, v4l2_open, [ + ac_v4l2_cflags="-DPJMEDIA_VIDEO_DEV_HAS_V4L2=1" + ac_v4l2_ldflags="-lv4l2" + LIBS="$LIBS -lv4l2"]) + ] +) dnl # OpenH264 alt prefix AC_ARG_WITH(openh264, - AS_HELP_STRING([--with-openh264=DIR], - [Specify alternate OpenH264 prefix]), - [], - [with_openh264=no] - ) + AS_HELP_STRING([--with-openh264=DIR], [Specify alternate OpenH264 prefix]), + [], + [with_openh264=no] +) dnl # Do not use default OpenH264 installation if we are cross-compiling if test "x$ac_cross_compile" != "x" -a "x$with_openh264" = "xno"; then @@ -1514,61 +1702,63 @@ dnl # OpenH264 AC_SUBST(ac_openh264_cflags) AC_SUBST(ac_openh264_ldflags) AC_ARG_ENABLE(openh264, - AS_HELP_STRING([--disable-openh264], - [Disable OpenH264 (default: not disabled)]), - [ - if test "$enable_openh264" = "no"; then - AC_MSG_RESULT([Checking if OpenH264 is disabled... yes]) - fi - ], - [ - if test "x$with_openh264" != "xno" -a "x$with_openh264" != "x"; then - OPENH264_PREFIX=$with_openh264 - OPENH264_CFLAGS="-I$OPENH264_PREFIX/include" - OPENH264_LDFLAGS="-L$OPENH264_PREFIX/lib" - AC_MSG_RESULT([Using OpenH264 prefix... $with_openh264]) - else - OPENH264_CFLAGS="" - OPENH264_LDFLAGS="" - fi - - AC_MSG_CHECKING([OpenH264 usability]) - - OPENH264_LIBS="-lopenh264 -lstdc++" - - SAVED_LIBS="$LIBS" - SAVED_LDFLAGS="$LDFLAGS" - SAVED_CFLAGS="$CFLAGS" - - LIBS="$OPENH264_LIBS $LIBS" - LDFLAGS="$OPENH264_LDFLAGS $LDFLAGS" - CFLAGS="$OPENH264_CFLAGS $CFLAGS" - - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include - #include - ]], - [WelsCreateSVCEncoder(0);] - )], - [ ac_openh264_cflags="-DPJMEDIA_HAS_OPENH264_CODEC=1 $OPENH264_CFLAGS" - ac_openh264_ldflags="$OPENH264_LDFLAGS $OPENH264_LIBS" - AC_MSG_RESULT(yes) - ], - [ - LIBS="$SAVED_LIBS" - LDFLAGS="$SAVED_LDFLAGS" - CFLAGS="$SAVED_CFLAGS" - AC_MSG_RESULT(no) - ]) - - ]) + AS_HELP_STRING([--disable-openh264], [Disable OpenH264 (default: not disabled)]), + [ + if test "$enable_openh264" = "no"; then + AC_MSG_RESULT([Checking if OpenH264 is disabled... yes]) + fi + ], + [ + if test "x$with_openh264" != "xno" -a "x$with_openh264" != "x"; then + OPENH264_PREFIX=$with_openh264 + OPENH264_CFLAGS="-I$OPENH264_PREFIX/include" + OPENH264_LDFLAGS="-L$OPENH264_PREFIX/lib" + AC_MSG_RESULT([Using OpenH264 prefix... $with_openh264]) + else + OPENH264_CFLAGS="" + OPENH264_LDFLAGS="" + fi + + AC_MSG_CHECKING([OpenH264 usability]) + + OPENH264_LIBS="-lopenh264 -lstdc++" + + SAVED_LIBS="$LIBS" + SAVED_LDFLAGS="$LDFLAGS" + SAVED_CFLAGS="$CFLAGS" + + LIBS="$OPENH264_LIBS $LIBS" + LDFLAGS="$OPENH264_LDFLAGS $LDFLAGS" + CFLAGS="$OPENH264_CFLAGS $CFLAGS" + + AC_LINK_IFELSE( + [ + AC_LANG_PROGRAM([ + [#include + #include ]], + [WelsCreateSVCEncoder(0);]) + ], + [ + ac_openh264_cflags="-DPJMEDIA_HAS_OPENH264_CODEC=1 $OPENH264_CFLAGS" + ac_openh264_ldflags="$OPENH264_LDFLAGS $OPENH264_LIBS" + AC_MSG_RESULT(yes) + ], + [ + LIBS="$SAVED_LIBS" + LDFLAGS="$SAVED_LDFLAGS" + CFLAGS="$SAVED_CFLAGS" + AC_MSG_RESULT(no) + ] + ) + ] +) dnl # VPX alt prefix AC_ARG_WITH(vpx, - AS_HELP_STRING([--with-vpx=DIR], - [Specify alternate VPX prefix]), - [], - [with_vpx=no] - ) + AS_HELP_STRING([--with-vpx=DIR], [Specify alternate VPX prefix]), + [], + [with_vpx=no] +) dnl # Do not use default VPX installation if we are cross-compiling if test "x$ac_cross_compile" != "x" -a "x$with_vpx" = "xno"; then @@ -1579,276 +1769,282 @@ dnl # VPX AC_SUBST(ac_vpx_cflags) AC_SUBST(ac_vpx_ldflags) AC_ARG_ENABLE(vpx, - AS_HELP_STRING([--disable-vpx], - [Disable VPX (default: not disabled)]), - [ - if test "$enable_vpx" = "no"; then - AC_MSG_RESULT([Checking if VPX is disabled... yes]) - fi - ], - [ - if test "x$with_vpx" != "xno" -a "x$with_vpx" != "x"; then - VPX_PREFIX=$with_vpx - VPX_CFLAGS="-I$VPX_PREFIX/include" - VPX_LDFLAGS="-L$VPX_PREFIX/lib" - AC_MSG_RESULT([Using VPX prefix... $with_vpx]) - else - VPX_CFLAGS="" - VPX_LDFLAGS="" - fi - - AC_MSG_CHECKING([VPX usability]) - - VPX_LIBS="-lvpx" - - SAVED_LIBS="$LIBS" - SAVED_LDFLAGS="$LDFLAGS" - SAVED_CFLAGS="$CFLAGS" - - LIBS="$VPX_LIBS $LIBS" - LDFLAGS="$VPX_LDFLAGS $LDFLAGS" - CFLAGS="$VPX_CFLAGS $CFLAGS" - - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include - #include - ]], - [vpx_codec_iface_t *(*enc_if)() = &vpx_codec_vp8_cx;] - )], - [ ac_vpx_cflags="-DPJMEDIA_HAS_VPX_CODEC=1 $VPX_CFLAGS" - ac_vpx_ldflags="$VPX_LDFLAGS $VPX_LIBS" - AC_MSG_RESULT(yes) - ], - [ - LIBS="$SAVED_LIBS" - LDFLAGS="$SAVED_LDFLAGS" - CFLAGS="$SAVED_CFLAGS" - AC_MSG_RESULT(no) - ]) - - ]) - + AS_HELP_STRING([--disable-vpx], [Disable VPX (default: not disabled)]), + [ + if test "$enable_vpx" = "no"; then + AC_MSG_RESULT([Checking if VPX is disabled... yes]) + fi + ], + [ + if test "x$with_vpx" != "xno" -a "x$with_vpx" != "x"; then + VPX_PREFIX=$with_vpx + VPX_CFLAGS="-I$VPX_PREFIX/include" + VPX_LDFLAGS="-L$VPX_PREFIX/lib" + AC_MSG_RESULT([Using VPX prefix... $with_vpx]) + else + VPX_CFLAGS="" + VPX_LDFLAGS="" + fi + + AC_MSG_CHECKING([VPX usability]) + + VPX_LIBS="-lvpx" + + SAVED_LIBS="$LIBS" + SAVED_LDFLAGS="$LDFLAGS" + SAVED_CFLAGS="$CFLAGS" + + LIBS="$VPX_LIBS $LIBS" + LDFLAGS="$VPX_LDFLAGS $LDFLAGS" + CFLAGS="$VPX_CFLAGS $CFLAGS" + + AC_LINK_IFELSE( + [ + AC_LANG_PROGRAM([ + [#include + #include ]], + [vpx_codec_iface_t *(*enc_if)() = &vpx_codec_vp8_cx;]) + ], + [ + ac_vpx_cflags="-DPJMEDIA_HAS_VPX_CODEC=1 $VPX_CFLAGS" + ac_vpx_ldflags="$VPX_LDFLAGS $VPX_LIBS" + AC_MSG_RESULT(yes) + ], + [ + LIBS="$SAVED_LIBS" + LDFLAGS="$SAVED_LDFLAGS" + CFLAGS="$SAVED_CFLAGS" + AC_MSG_RESULT(no) + ] + ) + ] +) dnl ######################################################## dnl # Intel IPP support dnl # AC_ARG_ENABLE(ipp, AS_HELP_STRING([--enable-ipp], - [Enable Intel IPP support. Specify the Intel IPP package and samples location using IPPROOT and IPPSAMPLES env var or with --with-ipp and --with-ipp-samples options]), + [Enable Intel IPP support. Specify the Intel IPP package and samples location using IPPROOT and IPPSAMPLES env var or with --with-ipp and --with-ipp-samples options]), [], [enable_ipp=no] - ) +) AC_ARG_WITH(ipp, - AS_HELP_STRING([--with-ipp=DIR], - [Specify the Intel IPP location]), + AS_HELP_STRING([--with-ipp=DIR], [Specify the Intel IPP location]), [], [with_ipp=no] - ) +) AC_ARG_WITH(ipp-samples, - AS_HELP_STRING([--with-ipp-samples=DIR], - [Specify the Intel IPP samples location]), + AS_HELP_STRING([--with-ipp-samples=DIR], [Specify the Intel IPP samples location]), [], [with_ipp_samples=no] - ) +) AC_ARG_WITH(ipp-arch, AS_HELP_STRING([--with-ipp-arch=ARCH], - [Specify the Intel IPP ARCH suffix, e.g. "64" or "em64t. Default is blank for IA32"]), + [Specify the Intel IPP ARCH suffix, e.g. "64" or "em64t. Default is blank for IA32"]), [], [with_ipp_arch=no] - ) +) if test "x$enable_ipp" != "xno"; then - dnl # + dnl # dnl # Verifying Intel IPP path dnl # AC_MSG_CHECKING([Intel IPP location]) if test "x$with_ipp" != "xno" -a "x$with_ipp" != "x"; then - AC_MSG_RESULT([$with_ipp]) - IPPROOT=$with_ipp + AC_MSG_RESULT([$with_ipp]) + IPPROOT=$with_ipp elif test "x$IPPROOT" = "x"; then - if test -d /opt/intel/ipp; then - IPPROOT=`ls -d /opt/intel/ipp/*/* | head -1` - AC_MSG_RESULT([autodetected in $IPPROOT]) - fi + if test -d /opt/intel/ipp; then + IPPROOT=`ls -d /opt/intel/ipp/*/* | head -1` + AC_MSG_RESULT([autodetected in $IPPROOT]) + fi else - AC_MSG_RESULT([$IPPROOT]) + AC_MSG_RESULT([$IPPROOT]) fi if test "x$with_ipp_arch" != "xno"; then - IPP_SUFFIX=$with_ipp_arch - AC_MSG_RESULT([IPP arch suffix is set to $IPP_SUFFIX]) + IPP_SUFFIX=$with_ipp_arch + AC_MSG_RESULT([IPP arch suffix is set to $IPP_SUFFIX]) else - IPP_SUFFIX="" - AC_MSG_RESULT([IPP arch suffix is set to empty]) + IPP_SUFFIX="" + AC_MSG_RESULT([IPP arch suffix is set to empty]) fi if test x$IPPROOT = x; then - AC_MSG_ERROR([the location is neither specified nor can be guessed. Please specify with IPPROOT env var or with --with-ipp option]) + AC_MSG_ERROR([the location is neither specified nor can be guessed. Please specify with IPPROOT env var or with --with-ipp option]) elif test ! -d $IPPROOT; then - AC_MSG_ERROR([not found]) + AC_MSG_ERROR([not found]) elif test ! -d $IPPROOT/include; then - AC_MSG_ERROR([directory doesn't seem to be valid]) + AC_MSG_ERROR([directory doesn't seem to be valid]) else - # IPP directory looks okay. - # Remove trailing backslash - IPPROOT=`echo $IPPROOT | sed 's/\/$//'` - - SAVED_CFLAGS="$CFLAGS" - SAVED_LDFLAGS="$LDFLAGS" - SAVED_LIBS="$LIBS" - - IPP_CFLAGS="-I$IPPROOT/include" - IPP_LIBS="-lippsc${IPP_SUFFIX} -lipps${IPP_SUFFIX} -lippcore${IPP_SUFFIX}" - -# - # Some differences between Mac OS X and Linux - case $target in - *darwin* ) - IPP_LDFLAGS="-L$IPPROOT/Libraries -L$IPPROOT/lib" - ;; - *) - # Find out where the libraries live. - IPP7_ARCH="" - if test -d $IPPROOT/lib/intel64; then - IPP7_ARCH="intel64" - elif test -d $IPPROOT/lib/ia32; then - IPP7_ARCH="ia32" - elif test -d $IPPROOT/lib/mic; then - IPP7_ARCH="mic" - fi - - if test -z "$IPP7_ARCH"; then - # IPP6 (and possibly below) - IPP_LDFLAGS="-L$IPPROOT/sharedlib" - IPP_LIBS="$IPP_LIBS -lippsr${IPP_SUFFIX} -lguide" - else - # IPP7 - if ! test -d $IPPROOT/../compiler; then - AC_MSG_ERROR([Cannot find $IPPROOT/../compiler directory. Please set IPPROOT variable correctly]) - fi - IPP_CFLAGS="$IPP_CFLAGS" - IPP_LDFLAGS="-L$IPPROOT/lib/intel64 -L$IPPROOT/../compiler/lib/$IPP7_ARCH" - IPP_LIBS="$IPP_LIBS -liomp5" - fi - ;; - esac - - #IPP_LDFLAGS="-L$IPPROOT/sharedlib" - #Static: - #IPP_LIBS="-lippscmerged -lippsrmerged -lippsmerged -lippcore" - - CFLAGS="$CFLAGS $IPP_CFLAGS" - LDFLAGS="$LDFLAGS $IPP_LDFLAGS" - LIBS="$IPP_LIBS $LIBS" - - - AC_MSG_CHECKING([Intel IPP usability]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include - ]], - [ippStaticInit();])], - [AC_MSG_RESULT(yes)], - [AC_MSG_FAILURE([Error: unable to recognize your IPP installation. Make sure the paths and ARCH suffix are set correctly, run with --help for more info])]) - - CFLAGS="$SAVED_CFLAGS" - LDFLAGS="$SAVED_LDFLAGS" - LIBS="$SAVED_LIBS" + # IPP directory looks okay. + # Remove trailing backslash + IPPROOT=`echo $IPPROOT | sed 's/\/$//'` + + SAVED_CFLAGS="$CFLAGS" + SAVED_LDFLAGS="$LDFLAGS" + SAVED_LIBS="$LIBS" + + IPP_CFLAGS="-I$IPPROOT/include" + IPP_LIBS="-lippsc${IPP_SUFFIX} -lipps${IPP_SUFFIX} -lippcore${IPP_SUFFIX}" + + # Some differences between Mac OS X and Linux + case $target in + *darwin* ) + IPP_LDFLAGS="-L$IPPROOT/Libraries -L$IPPROOT/lib" + ;; + *) + # Find out where the libraries live. + IPP7_ARCH="" + if test -d $IPPROOT/lib/intel64; then + IPP7_ARCH="intel64" + elif test -d $IPPROOT/lib/ia32; then + IPP7_ARCH="ia32" + elif test -d $IPPROOT/lib/mic; then + IPP7_ARCH="mic" + fi + + if test -z "$IPP7_ARCH"; then + # IPP6 (and possibly below) + IPP_LDFLAGS="-L$IPPROOT/sharedlib" + IPP_LIBS="$IPP_LIBS -lippsr${IPP_SUFFIX} -lguide" + else + # IPP7 + if ! test -d $IPPROOT/../compiler; then + AC_MSG_ERROR([Cannot find $IPPROOT/../compiler directory. Please set IPPROOT variable correctly]) + fi + IPP_CFLAGS="$IPP_CFLAGS" + IPP_LDFLAGS="-L$IPPROOT/lib/intel64 -L$IPPROOT/../compiler/lib/$IPP7_ARCH" + IPP_LIBS="$IPP_LIBS -liomp5" + fi + ;; + esac + + #IPP_LDFLAGS="-L$IPPROOT/sharedlib" + #Static: + #IPP_LIBS="-lippscmerged -lippsrmerged -lippsmerged -lippcore" + + CFLAGS="$CFLAGS $IPP_CFLAGS" + LDFLAGS="$LDFLAGS $IPP_LDFLAGS" + LIBS="$IPP_LIBS $LIBS" + + AC_MSG_CHECKING([Intel IPP usability]) + AC_LINK_IFELSE( + [ + AC_LANG_PROGRAM([ + [#include ]], + [ippStaticInit();]) + ], + [AC_MSG_RESULT(yes)], + [AC_MSG_FAILURE([Error: unable to recognize your IPP installation. Make sure the paths and ARCH suffix are set correctly, run with --help for more info])] + ) + + CFLAGS="$SAVED_CFLAGS" + LDFLAGS="$SAVED_LDFLAGS" + LIBS="$SAVED_LIBS" fi - dnl # + dnl # dnl # Verifying Intel IPP samples path dnl # AC_MSG_CHECKING([Intel IPP samples location]) if test "x$with_ipp_samples" != "xno" -a "x$with_ipp_samples" != "x"; then - AC_MSG_RESULT([$with_ipp_samples]) - IPPSAMPLES=$with_ipp_samples + AC_MSG_RESULT([$with_ipp_samples]) + IPPSAMPLES=$with_ipp_samples elif test "x$IPPSAMPLES" = "x"; then - if test -d /opt/intel/ipp-samples; then - IPPSAMPLES=/opt/intel/ipp-samples - AC_MSG_RESULT([autodetected in $IPPSAMPLES]) - fi + if test -d /opt/intel/ipp-samples; then + IPPSAMPLES=/opt/intel/ipp-samples + AC_MSG_RESULT([autodetected in $IPPSAMPLES]) + fi else - AC_MSG_RESULT([$IPPSAMPLES]) + AC_MSG_RESULT([$IPPSAMPLES]) fi if test x$IPPSAMPLES = x; then - AC_MSG_ERROR([the location is neither specified nor can be guessed. Please specify with IPPSAMPLES env var or with --with-ipp-samples option]) + AC_MSG_ERROR([the location is neither specified nor can be guessed. Please specify with IPPSAMPLES env var or with --with-ipp-samples option]) elif test ! -d $IPPSAMPLES; then - AC_MSG_ERROR([not found]) + AC_MSG_ERROR([not found]) elif test ! -d $IPPSAMPLES/speech-codecs; then - AC_MSG_ERROR([directory doesn't seem to be valid]) + AC_MSG_ERROR([directory doesn't seem to be valid]) else - # Remove trailing backslash - IPPSAMPLES=`echo $IPPSAMPLES | sed 's/\/$//'` - - # Guess the libusc.a/libspeech.a build location - AC_MSG_CHECKING([Intel IPP USC build location]) - if test -d $IPPSAMPLES/speech-codecs/bin; then - IPPVER=5 - IPPSAMP_DIR=`ls -d $IPPSAMPLES/speech-codecs/bin/*gcc*/lib | head -1` - elif test -d $IPPSAMPLES/speech-codecs/_bin; then - IPPVER=6 - if test -d $IPPSAMPLES/speech-codecs/_bin/*gcc*; then - # gcc compiler - IPPSAMP_DIR=`ls -d $IPPSAMPLES/speech-codecs/_bin/*gcc*/lib | head -1` - elif test -d $IPPSAMPLES/speech-codecs/_bin/*icc*; then - # icc compiler - IPPSAMP_DIR=`ls -d $IPPSAMPLES/speech-codecs/_bin/*icc*/lib | head -1` - else - AC_MSG_FAILURE([Unable to find to find built binaries under $IPPSAMPLES/speech-codecs/{bin,_bin}. Have you built the IPP samples?]) - fi - else - AC_MSG_FAILURE([unable to find $IPPSAMPLES/speech-codecs/bin/*gcc*/lib or $IPPSAMPLES/speech-codecs/_bin/*gcc*/lib directory. Have you built the samples?]) - fi - - # Test the directory - if test ! -d $IPPSAMP_DIR; then - AC_MSG_FAILURE([There's something wrong with this script, directory $IPPSAMP_DIR does not exist]) - exit 1; - fi - - if test "x$IPPVER" = "x5"; then - IPPSAMP_LIBS="libusc.a" - IPPSAMP_LDLIBS="-lusc" - elif test "x$IPPVER" = "x6"; then - IPPSAMP_LIBS="libspeech.a" - IPPSAMP_LDLIBS="-lspeech" - else - AC_MSG_FAILURE([bug in this script: unsupported IPP version]) - fi - - if test ! -f $IPPSAMP_DIR/$IPPSAMP_LIBS; then - AC_MSG_FAILURE([$IPPSAMP_LIBS doesn't exist in $IPPSAMP_DIR]) - fi - - AC_MSG_RESULT([$IPPSAMP_DIR]) - - SAVED_CFLAGS="$CFLAGS" - SAVED_LDFLAGS="$LDFLAGS" - SAVED_LIBS="$LIBS" - - IPPSAMP_INC="-I$IPPSAMPLES/speech-codecs/core/usc/include" - CFLAGS="$CFLAGS $IPPSAMP_INC" - LDFLAGS="$LDFLAGS -L$IPPSAMP_DIR" - LIBS="$IPPSAMP_LDLIBS $LIBS" - - AC_MSG_CHECKING([Intel IPP USC usability]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include - ]], - [extern USC_Fxns USC_G729AFP_Fxns;])], - [AC_MSG_RESULT(yes)], - [AC_MSG_FAILURE(no)]) - - CFLAGS="$SAVED_CFLAGS" - LDFLAGS="$IPP_LDFLAGS $SAVED_LDFLAGS" - LIBS="$IPP_LIBS $SAVED_LIBS" - - IPP_CFLAGS="$IPP_CFLAGS $IPPSAMP_INC" - IPP_LDFLAGS="$IPP_LDFLAGS -L$IPPSAMP_DIR" - IPP_LIBS="$IPPSAMP_LDLIBS $IPP_LIBS" + # Remove trailing backslash + IPPSAMPLES=`echo $IPPSAMPLES | sed 's/\/$//'` + + # Guess the libusc.a/libspeech.a build location + AC_MSG_CHECKING([Intel IPP USC build location]) + if test -d $IPPSAMPLES/speech-codecs/bin; then + IPPVER=5 + IPPSAMP_DIR=`ls -d $IPPSAMPLES/speech-codecs/bin/*gcc*/lib | head -1` + elif test -d $IPPSAMPLES/speech-codecs/_bin; then + IPPVER=6 + if test -d $IPPSAMPLES/speech-codecs/_bin/*gcc*; then + # gcc compiler + IPPSAMP_DIR=`ls -d $IPPSAMPLES/speech-codecs/_bin/*gcc*/lib | head -1` + elif test -d $IPPSAMPLES/speech-codecs/_bin/*icc*; then + # icc compiler + IPPSAMP_DIR=`ls -d $IPPSAMPLES/speech-codecs/_bin/*icc*/lib | head -1` + else + AC_MSG_FAILURE([Unable to find to find built binaries under $IPPSAMPLES/speech-codecs/{bin,_bin}. Have you built the IPP samples?]) + fi + else + AC_MSG_FAILURE([unable to find $IPPSAMPLES/speech-codecs/bin/*gcc*/lib or $IPPSAMPLES/speech-codecs/_bin/*gcc*/lib directory. Have you built the samples?]) + fi + + # Test the directory + if test ! -d $IPPSAMP_DIR; then + AC_MSG_FAILURE([There's something wrong with this script, directory $IPPSAMP_DIR does not exist]) + exit 1; + fi + + if test "x$IPPVER" = "x5"; then + IPPSAMP_LIBS="libusc.a" + IPPSAMP_LDLIBS="-lusc" + elif test "x$IPPVER" = "x6"; then + IPPSAMP_LIBS="libspeech.a" + IPPSAMP_LDLIBS="-lspeech" + else + AC_MSG_FAILURE([bug in this script: unsupported IPP version]) + fi + + if test ! -f $IPPSAMP_DIR/$IPPSAMP_LIBS; then + AC_MSG_FAILURE([$IPPSAMP_LIBS doesn't exist in $IPPSAMP_DIR]) + fi + + AC_MSG_RESULT([$IPPSAMP_DIR]) + + SAVED_CFLAGS="$CFLAGS" + SAVED_LDFLAGS="$LDFLAGS" + SAVED_LIBS="$LIBS" + + IPPSAMP_INC="-I$IPPSAMPLES/speech-codecs/core/usc/include" + CFLAGS="$CFLAGS $IPPSAMP_INC" + LDFLAGS="$LDFLAGS -L$IPPSAMP_DIR" + LIBS="$IPPSAMP_LDLIBS $LIBS" + + AC_MSG_CHECKING([Intel IPP USC usability]) + AC_LINK_IFELSE( + [ + AC_LANG_PROGRAM([ + [#include ]], + [extern USC_Fxns USC_G729AFP_Fxns;]) + ], + [AC_MSG_RESULT(yes)], + [AC_MSG_FAILURE(no)] + ) + + CFLAGS="$SAVED_CFLAGS" + LDFLAGS="$IPP_LDFLAGS $SAVED_LDFLAGS" + LIBS="$IPP_LIBS $SAVED_LIBS" + + IPP_CFLAGS="$IPP_CFLAGS $IPPSAMP_INC" + IPP_LDFLAGS="$IPP_LDFLAGS -L$IPPSAMP_DIR" + IPP_LIBS="$IPPSAMP_LDLIBS $IPP_LIBS" fi CFLAGS="$CFLAGS $IPP_CFLAGS" @@ -1856,9 +2052,9 @@ if test "x$enable_ipp" != "xno"; then LIBS="$LIBS $IPP_LIBS" ac_build_mak_vars="$ac_build_mak_vars\n\ -export IPP_CFLAGS=$IPP_CFLAGS\n\ -export IPP_LDFLAGS=$IPP_LDFLAGS\n\ -export IPP_LIBS=$IPP_LIBS" + export IPP_CFLAGS=$IPP_CFLAGS\n\ + export IPP_LDFLAGS=$IPP_LDFLAGS\n\ + export IPP_LIBS=$IPP_LIBS" else AC_MSG_RESULT([Skipping Intel IPP settings (not wanted)]) fi @@ -1867,25 +2063,29 @@ dnl # Include Android MediaCodec AC_SUBST(ac_no_mediacodec) AC_ARG_ENABLE(android-mediacodec, - AS_HELP_STRING([--disable-android-mediacodec], - [Exclude Android MediaCodec (default: autodetect)]), - [if test "$enable_android_mediacodec" = "no"; then - [ac_no_mediacodec=1] - AC_MSG_RESULT([Checking if Android MediaCodec support is disabled... yes]) - fi], - [ - case $target in - *android*) - AC_CHECK_LIB(mediandk,AMediaCodec_createDecoderByType,[ac_pjmedia_has_amediacodec=1 && LIBS="-lmediandk $LIBS"]) - if test "x$ac_pjmedia_has_amediacodec" = "x1"; then - AC_MSG_RESULT([Checking if Android AMediaCodec library is available... yes]) - AC_DEFINE(PJMEDIA_HAS_ANDROID_MEDIACODEC, 1) - else - AC_MSG_RESULT([Checking if Android AMediaCodec library is available... no]) - fi - ;; - esac - ]) + AS_HELP_STRING([--disable-android-mediacodec], [Exclude Android MediaCodec (default: autodetect)]), + [ + if test "$enable_android_mediacodec" = "no"; then + [ac_no_mediacodec=1] + AC_MSG_RESULT([Checking if Android MediaCodec support is disabled... yes]) + fi + ], + [ + case $target in + *android*) + AC_CHECK_LIB(mediandk, AMediaCodec_createDecoderByType, [ + ac_pjmedia_has_amediacodec=1 && LIBS="-lmediandk $LIBS"]) + + if test "x$ac_pjmedia_has_amediacodec" = "x1"; then + AC_MSG_RESULT([Checking if Android AMediaCodec library is available... yes]) + AC_DEFINE(PJMEDIA_HAS_ANDROID_MEDIACODEC, 1) + else + AC_MSG_RESULT([Checking if Android AMediaCodec library is available... no]) + fi + ;; + esac + ] +) dnl ########################################## dnl # @@ -1895,20 +2095,19 @@ dnl # dnl # SSL alt prefix AC_ARG_WITH(ssl, AS_HELP_STRING([--with-ssl=DIR], - [Specify alternate SSL library prefix. This option will try - to find OpenSSL first, then if not found, GnuTLS. To skip - OpenSSL finding, use --with-gnutls option instead.]), + [Specify alternate SSL library prefix. This option will try + to find OpenSSL first, then if not found, GnuTLS. To skip + OpenSSL finding, use --with-gnutls option instead.]), [], [with_ssl=no] - ) +) dnl # GnuTLS alt prefix AC_ARG_WITH(gnutls, - AS_HELP_STRING([--with-gnutls=DIR], - [Specify alternate GnuTLS prefix]), + AS_HELP_STRING([--with-gnutls=DIR], [Specify alternate GnuTLS prefix]), [], [with_gnutls=no] - ) +) dnl # Do not use default SSL installation if we are cross-compiling if test "x$ac_cross_compile" != "x" -a "x$with_ssl" = "xno" -a "x$with_gnutls" = "xno"; then @@ -1921,154 +2120,174 @@ AC_SUBST(ac_ssl_has_aes_gcm,0) AC_SUBST(ac_ssl_backend) AC_ARG_ENABLE(darwin-ssl, - AS_HELP_STRING([--disable-darwin-ssl], - [Exclude Darwin SSL (default: autodetect)]), - [if test "$enable_darwin_ssl" = "no"; then - AC_MSG_RESULT([Checking if Darwin SSL support is disabled... yes]) - fi], - [ - case $target in - *darwin*) - SAVED_CFLAGS="$CFLAGS" - CFLAGS="-Werror" - SAVED_LIBS="$LIBS" - LIBS="-framework Security" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], - [if (__builtin_available(macOS 10.12, iOS 10.0, *)) { - SSLContextRef ssl_ctx; - SSLReHandshake(ssl_ctx); - }])], - [ac_ssl_backend=darwin],) - CFLAGS="$SAVED_CFLAGS" - LIBS="$SAVED_LIBS" - if test "x$ac_ssl_backend" = "xdarwin"; then - AC_DEFINE(PJ_HAS_SSL_SOCK, 1) - AC_DEFINE(PJ_SSL_SOCK_IMP, PJ_SSL_SOCK_IMP_DARWIN) - LIBS="$LIBS -framework Security" - AC_MSG_RESULT([Checking if Darwin SSL is available... yes]) - else - AC_MSG_RESULT([Checking if Darwin SSL is available... no]) - fi - ;; - esac - ]) + AS_HELP_STRING([--disable-darwin-ssl], [Exclude Darwin SSL (default: autodetect)]), + [ + if test "$enable_darwin_ssl" = "no"; then + AC_MSG_RESULT([Checking if Darwin SSL support is disabled... yes]) + fi + ], + [ + case $target in + *darwin*) + SAVED_CFLAGS="$CFLAGS" + CFLAGS="-Werror" + SAVED_LIBS="$LIBS" + + LIBS="-framework Security" + AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([ + [#include ]], + [if (__builtin_available(macOS 10.12, iOS 10.0, *)) { + SSLContextRef ssl_ctx; + SSLReHandshake(ssl_ctx); + }]) + ], + [ac_ssl_backend=darwin], + ) + + CFLAGS="$SAVED_CFLAGS" + LIBS="$SAVED_LIBS" + if test "x$ac_ssl_backend" = "xdarwin"; then + AC_DEFINE(PJ_HAS_SSL_SOCK, 1) + AC_DEFINE(PJ_SSL_SOCK_IMP, PJ_SSL_SOCK_IMP_DARWIN) + LIBS="$LIBS -framework Security" + AC_MSG_RESULT([Checking if Darwin SSL is available... yes]) + else + AC_MSG_RESULT([Checking if Darwin SSL is available... no]) + fi + ;; + esac + ] +) AC_ARG_ENABLE(ssl, - AS_HELP_STRING([--disable-ssl], - [Exclude SSL support the build (default: autodetect)]) - , - [ - if test "$enable_ssl" = "no"; then - [ac_no_ssl=1] - AC_MSG_RESULT([Checking if SSL support is disabled... yes]) - fi - ], - [ - if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then - CFLAGS="$CFLAGS -I$with_ssl/include" - CPPFLAGS="$CPPFLAGS -I$with_ssl/include" - LDFLAGS="$LDFLAGS -L$with_ssl/lib" - AC_MSG_RESULT([Using SSL prefix... $with_ssl]) + AS_HELP_STRING([--disable-ssl], [Exclude SSL support the build (default: autodetect)]), + [ + if test "$enable_ssl" = "no"; then + [ac_no_ssl=1] + AC_MSG_RESULT([Checking if SSL support is disabled... yes]) + fi + ], + [ + if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then + CFLAGS="$CFLAGS -I$with_ssl/include" + CPPFLAGS="$CPPFLAGS -I$with_ssl/include" + LDFLAGS="$LDFLAGS -L$with_ssl/lib" + AC_MSG_RESULT([Using SSL prefix... $with_ssl]) + fi + + if test "x$with_gnutls" = "xno"; then + # We still need to check for OpenSSL installations even if + # we find Darwin SSL above since DTLS requires OpenSSL. + AC_MSG_RESULT([checking for OpenSSL installations..]) + AC_SUBST(openssl_h_present) + AC_SUBST(libssl_present) + AC_SUBST(libcrypto_present) + AC_CHECK_HEADER(openssl/ssl.h,[openssl_h_present=1]) + + AC_CHECK_LIB(crypto,ERR_load_BIO_strings,[ + libcrypto_present=1 && LIBS="-lcrypto $LIBS"], + [ + AC_CHECK_LIB(crypto,ERR_get_error,[libcrypto_present=1 && LIBS="-lcrypto $LIBS"]) + ] + ) + + AC_CHECK_LIB(ssl,SSL_CTX_new,[libssl_present=1 && LIBS="-lssl $LIBS"]) + + if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then + AC_MSG_RESULT([OpenSSL library found, SSL support enabled]) + + # Check if SRTP should be compiled with OpenSSL + # support, to enable cryptos such as AES GCM. + + # EVP_CIPHER_CTX is now opaque in OpenSSL 1.1.0, libsrtp 1.5.4 uses it as a transparent type. + # Update 2.7: our bundled libsrtp has been upgraded to 2.1.0, + # so we can omit EVP_CIPHER_CTX definition check now. + AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([ + [#include ]], + [EVP_CIPHER_CTX *ctx;EVP_aes_128_gcm();]) + ], + [ + AC_CHECK_LIB(crypto,EVP_aes_128_gcm,[ac_ssl_has_aes_gcm=1]) + ] + ) + + if test "x$ac_ssl_has_aes_gcm" = "x1"; then + AC_MSG_RESULT([OpenSSL has AES GCM support, SRTP will use OpenSSL]) + else + AC_MSG_RESULT([OpenSSL AES GCM support not found, SRTP will only support AES CM cryptos]) fi - if test "x$with_gnutls" = "xno"; then - # We still need to check for OpenSSL installations even if - # we find Darwin SSL above since DTLS requires OpenSSL. - AC_MSG_RESULT([checking for OpenSSL installations..]) - AC_SUBST(openssl_h_present) - AC_SUBST(libssl_present) - AC_SUBST(libcrypto_present) - AC_CHECK_HEADER(openssl/ssl.h,[openssl_h_present=1]) - AC_CHECK_LIB(crypto,ERR_load_BIO_strings,[libcrypto_present=1 && LIBS="-lcrypto $LIBS"], [AC_CHECK_LIB(crypto,ERR_get_error,[libcrypto_present=1 && LIBS="-lcrypto $LIBS"])]) - AC_CHECK_LIB(ssl,SSL_CTX_new,[libssl_present=1 && LIBS="-lssl $LIBS"]) - if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then - AC_MSG_RESULT([OpenSSL library found, SSL support enabled]) - - # Check if SRTP should be compiled with OpenSSL - # support, to enable cryptos such as AES GCM. - - # EVP_CIPHER_CTX is now opaque in OpenSSL 1.1.0, libsrtp 1.5.4 uses it as a transparent type. - # Update 2.7: our bundled libsrtp has been upgraded to 2.1.0, - # so we can omit EVP_CIPHER_CTX definition check now. - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], - [EVP_CIPHER_CTX *ctx;EVP_aes_128_gcm();])], - [AC_CHECK_LIB(crypto,EVP_aes_128_gcm,[ac_ssl_has_aes_gcm=1])]) - if test "x$ac_ssl_has_aes_gcm" = "x1"; then - AC_MSG_RESULT([OpenSSL has AES GCM support, SRTP will use OpenSSL]) - else - AC_MSG_RESULT([OpenSSL AES GCM support not found, SRTP will only support AES CM cryptos]) - fi - - if test "x$ac_ssl_backend" = "x"; then - # PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK - #AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1) - AC_DEFINE(PJ_HAS_SSL_SOCK, 1) - AC_DEFINE(PJ_SSL_SOCK_IMP, PJ_SSL_SOCK_IMP_OPENSSL) - ac_ssl_backend="openssl" - fi - else - AC_MSG_RESULT([** OpenSSL libraries not found **]) - fi - - fi - - if test "x$ac_ssl_backend" = "x"; then - - if test "x$with_gnutls" != "xno" -a "x$with_gnutls" != "x"; then - CFLAGS="$CFLAGS -I$with_gnutls/include" - LDFLAGS="$LDFLAGS -L$with_gnutls/lib" - AC_MSG_RESULT([Using GnuTLS prefix... $with_gnutls]) - fi - - AC_CHECK_PROGS(PKG_CONFIG, + if test "x$ac_ssl_backend" = "x"; then + # PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK + #AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1) + AC_DEFINE(PJ_HAS_SSL_SOCK, 1) + AC_DEFINE(PJ_SSL_SOCK_IMP, PJ_SSL_SOCK_IMP_OPENSSL) + ac_ssl_backend="openssl" + fi + else + AC_MSG_RESULT([** OpenSSL libraries not found **]) + fi + fi + + if test "x$ac_ssl_backend" = "x"; then + if test "x$with_gnutls" != "xno" -a "x$with_gnutls" != "x"; then + CFLAGS="$CFLAGS -I$with_gnutls/include" + LDFLAGS="$LDFLAGS -L$with_gnutls/lib" + AC_MSG_RESULT([Using GnuTLS prefix... $with_gnutls]) + fi + + AC_CHECK_PROGS(PKG_CONFIG, $host-pkg-config pkg-config "python pkgconfig.py", none) - AC_MSG_RESULT([checking for GnuTLS installations..]) - AC_SUBST(gnutls_h_present) - AC_SUBST(libgnutls_present) - AC_CHECK_HEADER(gnutls/gnutls.h, [gnutls_h_present=1]) - - if test "$PKG_CONFIG" != "none"; then - if $PKG_CONFIG --exists gnutls; then - LIBS="$LIBS `$PKG_CONFIG --libs gnutls`" - libgnutls_present=1 - else - AC_CHECK_LIB(gnutls, - gnutls_certificate_set_x509_system_trust, - [libgnutls_present=1 && - LIBS="$LIBS -lgnutls"]) - fi - else - AC_MSG_RESULT([*** Warning: neither pkg-config nor python is available, disabling gnutls. ***]) - fi - - if test "x$gnutls_h_present" = "x1" -a "x$libgnutls_present" = "x1"; then - AC_MSG_RESULT([GnuTLS library found, SSL support enabled]) - AC_DEFINE(PJ_HAS_SSL_SOCK, 1) - AC_DEFINE(PJ_SSL_SOCK_IMP, PJ_SSL_SOCK_IMP_GNUTLS) - ac_ssl_backend="gnutls" - else - AC_MSG_RESULT([** No GnuTLS libraries found, disabling SSL support **]) - fi - - fi - ]) + + AC_MSG_RESULT([checking for GnuTLS installations..]) + AC_SUBST(gnutls_h_present) + AC_SUBST(libgnutls_present) + AC_CHECK_HEADER(gnutls/gnutls.h, [gnutls_h_present=1]) + + if test "$PKG_CONFIG" != "none"; then + if $PKG_CONFIG --exists gnutls; then + LIBS="$LIBS `$PKG_CONFIG --libs gnutls`" + libgnutls_present=1 + else + AC_CHECK_LIB(gnutls, gnutls_certificate_set_x509_system_trust, [ + libgnutls_present=1 && LIBS="$LIBS -lgnutls"]) + fi + else + AC_MSG_RESULT([*** Warning: neither pkg-config nor python is available, disabling gnutls. ***]) + fi + + if test "x$gnutls_h_present" = "x1" -a "x$libgnutls_present" = "x1"; then + AC_MSG_RESULT([GnuTLS library found, SSL support enabled]) + AC_DEFINE(PJ_HAS_SSL_SOCK, 1) + AC_DEFINE(PJ_SSL_SOCK_IMP, PJ_SSL_SOCK_IMP_GNUTLS) + ac_ssl_backend="gnutls" + else + AC_MSG_RESULT([** No GnuTLS libraries found, disabling SSL support **]) + fi + + fi + ] +) dnl # Obsolete option --with-opencore-amrnb AC_ARG_WITH(opencore-amrnb, AS_HELP_STRING([--with-opencore-amrnb=DIR], - [This option is obsolete and replaced by --with-opencore-amr=DIR]), + [This option is obsolete and replaced by --with-opencore-amr=DIR]), [AC_MSG_ERROR(This option is obsolete and replaced by --with-opencore-amr=DIR)], [true;] - ) +) dnl # opencore-amr alt prefix AC_ARG_WITH(opencore-amr, - AS_HELP_STRING([--with-opencore-amr=DIR], - [Specify alternate libopencore-amr prefix]), + AS_HELP_STRING([--with-opencore-amr=DIR], [Specify alternate libopencore-amr prefix]), [], [with_opencore_amr=no] - ) +) dnl # Do not use default opencore-amr installation if we are cross-compiling if test "x$ac_cross_compile" != "x" -a "x$with_opencore_amr" = "xno"; then @@ -2077,11 +2296,10 @@ fi dnl # vo-amrwbenc alt prefix AC_ARG_WITH(opencore-amrwbenc, - AS_HELP_STRING([--with-opencore-amrwbenc=DIR], - [Specify alternate libvo-amrwbenc prefix]), + AS_HELP_STRING([--with-opencore-amrwbenc=DIR], [Specify alternate libvo-amrwbenc prefix]), [], [with_opencore_amrwbenc=no] - ) +) dnl # Do not use default vo-amrwbenc installation if we are cross-compiling if test "x$ac_cross_compile" != "x" -a "x$with_opencore_amrwbenc" = "xno"; then @@ -2093,68 +2311,75 @@ dnl # Include opencore-amr support AC_SUBST(ac_no_opencore_amrnb) AC_SUBST(ac_no_opencore_amrwb) AC_ARG_ENABLE(opencore_amr, - AS_HELP_STRING([--disable-opencore-amr], - [Exclude OpenCORE AMR support from the build (default: autodetect)]) - , - [ - if test "$enable_opencore_amr" = "no"; then - [ac_no_opencore_amrnb=1] - [ac_no_opencore_amrwb=1] - AC_DEFINE(PJMEDIA_HAS_OPENCORE_AMRNB_CODEC,0) - AC_DEFINE(PJMEDIA_HAS_OPENCORE_AMRWB_CODEC,0) - AC_MSG_RESULT([Checking if OpenCORE AMR support is disabled... yes]) - fi - ], - [ - AC_MSG_RESULT([checking for OpenCORE AMR installations..]) - if test "x$with_opencore_amr" != "xno" -a "x$with_opencore_amr" != "x"; then - CFLAGS="$CFLAGS -I$with_opencore_amr/include" - CPPFLAGS="$CPPFLAGS -I$with_opencore_amr/include" - LDFLAGS="$LDFLAGS -L$with_opencore_amr/lib" - AC_MSG_RESULT([Using OpenCORE AMR prefix... $with_opencore_amr]) - fi - if test "x$with_opencore_amrwbenc" != "xno" -a "x$with_opencore_amrwbenc" != "x"; then - CFLAGS="$CFLAGS -I$with_opencore_amrwbenc/include" - CPPFLAGS="$CPPFLAGS -I$with_opencore_amrwbenc/include" - LDFLAGS="$LDFLAGS -L$with_opencore_amrwbenc/lib" - AC_MSG_RESULT([Using OpenCORE AMRWB-enc prefix... $with_opencore_amrwbenc]) - fi - AC_SUBST(opencore_amrnb_h_present) - AC_SUBST(opencore_amrnb_present) - AC_CHECK_HEADER(opencore-amrnb/interf_enc.h,[opencore_amrnb_h_present=1]) - AC_CHECK_LIB(opencore-amrnb,Encoder_Interface_init,[opencore_amrnb_present=1 && LIBS="$LIBS -lopencore-amrnb"]) - if test "x$opencore_amrnb_h_present" = "x1" -a "x$opencore_amrnb_present" = "x1"; then - AC_MSG_RESULT([OpenCORE AMR-NB library found, AMR-NB support enabled]) - AC_DEFINE(PJMEDIA_HAS_OPENCORE_AMRNB_CODEC,1) - else - [ac_no_opencore_amrnb=1] - AC_DEFINE(PJMEDIA_HAS_OPENCORE_AMRNB_CODEC,0) - fi - AC_SUBST(opencore_amrwb_enc_h_present) - AC_SUBST(opencore_amrwb_enc_present) - AC_SUBST(opencore_amrwb_dec_h_present) - AC_SUBST(opencore_amrwb_dec_present) - AC_CHECK_HEADER(vo-amrwbenc/enc_if.h,[opencore_amrwb_enc_h_present=1]) - AC_CHECK_HEADER(opencore-amrwb/dec_if.h,[opencore_amrwb_dec_h_present=1]) - AC_CHECK_LIB(opencore-amrwb,D_IF_init,[opencore_amrwb_dec_present=1 && LIBS="$LIBS -lopencore-amrwb"]) - AC_CHECK_LIB(vo-amrwbenc,E_IF_init,[opencore_amrwb_enc_present=1 && LIBS="$LIBS -lvo-amrwbenc"]) - if test "x$opencore_amrwb_enc_h_present" = "x1" -a "x$opencore_amrwb_dec_h_present" = "x1" -a "x$opencore_amrwb_enc_present" = "x1" -a "x$opencore_amrwb_dec_present" = "x1"; then - AC_MSG_RESULT([OpenCORE AMR-WB library found, AMR-WB support enabled]) - AC_DEFINE(PJMEDIA_HAS_OPENCORE_AMRWB_CODEC,1) - else - [ac_no_opencore_amrwb=1] - AC_DEFINE(PJMEDIA_HAS_OPENCORE_AMRWB_CODEC,0) - fi - - ]) + AS_HELP_STRING([--disable-opencore-amr], [Exclude OpenCORE AMR support from the build (default: autodetect)]), + [ + if test "$enable_opencore_amr" = "no"; then + [ac_no_opencore_amrnb=1] + [ac_no_opencore_amrwb=1] + AC_DEFINE(PJMEDIA_HAS_OPENCORE_AMRNB_CODEC,0) + AC_DEFINE(PJMEDIA_HAS_OPENCORE_AMRWB_CODEC,0) + AC_MSG_RESULT([Checking if OpenCORE AMR support is disabled... yes]) + fi + ], + [ + AC_MSG_RESULT([checking for OpenCORE AMR installations..]) + if test "x$with_opencore_amr" != "xno" -a "x$with_opencore_amr" != "x"; then + CFLAGS="$CFLAGS -I$with_opencore_amr/include" + CPPFLAGS="$CPPFLAGS -I$with_opencore_amr/include" + LDFLAGS="$LDFLAGS -L$with_opencore_amr/lib" + AC_MSG_RESULT([Using OpenCORE AMR prefix... $with_opencore_amr]) + fi + + if test "x$with_opencore_amrwbenc" != "xno" -a "x$with_opencore_amrwbenc" != "x"; then + CFLAGS="$CFLAGS -I$with_opencore_amrwbenc/include" + CPPFLAGS="$CPPFLAGS -I$with_opencore_amrwbenc/include" + LDFLAGS="$LDFLAGS -L$with_opencore_amrwbenc/lib" + AC_MSG_RESULT([Using OpenCORE AMRWB-enc prefix... $with_opencore_amrwbenc]) + fi + + AC_SUBST(opencore_amrnb_h_present) + AC_SUBST(opencore_amrnb_present) + AC_CHECK_HEADER(opencore-amrnb/interf_enc.h,[opencore_amrnb_h_present=1]) + AC_CHECK_LIB(opencore-amrnb,Encoder_Interface_init,[ + opencore_amrnb_present=1 && LIBS="$LIBS -lopencore-amrnb"]) + + if test "x$opencore_amrnb_h_present" = "x1" -a "x$opencore_amrnb_present" = "x1"; then + AC_MSG_RESULT([OpenCORE AMR-NB library found, AMR-NB support enabled]) + AC_DEFINE(PJMEDIA_HAS_OPENCORE_AMRNB_CODEC,1) + else + [ac_no_opencore_amrnb=1] + AC_DEFINE(PJMEDIA_HAS_OPENCORE_AMRNB_CODEC,0) + fi + + AC_SUBST(opencore_amrwb_enc_h_present) + AC_SUBST(opencore_amrwb_enc_present) + AC_SUBST(opencore_amrwb_dec_h_present) + AC_SUBST(opencore_amrwb_dec_present) + AC_CHECK_HEADER(vo-amrwbenc/enc_if.h,[opencore_amrwb_enc_h_present=1]) + AC_CHECK_HEADER(opencore-amrwb/dec_if.h,[opencore_amrwb_dec_h_present=1]) + + AC_CHECK_LIB(opencore-amrwb,D_IF_init,[ + opencore_amrwb_dec_present=1 && LIBS="$LIBS -lopencore-amrwb"]) + + AC_CHECK_LIB(vo-amrwbenc,E_IF_init,[ + opencore_amrwb_enc_present=1 && LIBS="$LIBS -lvo-amrwbenc"]) + + if test "x$opencore_amrwb_enc_h_present" = "x1" -a "x$opencore_amrwb_dec_h_present" = "x1" -a "x$opencore_amrwb_enc_present" = "x1" -a "x$opencore_amrwb_dec_present" = "x1"; then + AC_MSG_RESULT([OpenCORE AMR-WB library found, AMR-WB support enabled]) + AC_DEFINE(PJMEDIA_HAS_OPENCORE_AMRWB_CODEC,1) + else + [ac_no_opencore_amrwb=1] + AC_DEFINE(PJMEDIA_HAS_OPENCORE_AMRWB_CODEC,0) + fi + ] +) dnl # SILK prefix AC_ARG_WITH(silk, - AS_HELP_STRING([--with-silk=DIR], - [Specify alternate SILK prefix]), + AS_HELP_STRING([--with-silk=DIR], [Specify alternate SILK prefix]), [], [with_silk=no] - ) +) dnl # Do not use default SILK installation if we are cross-compiling if test "x$ac_cross_compile" != "x" -a "x$with_silk" = "xno"; then @@ -2164,36 +2389,38 @@ fi dnl # Include SILK support AC_SUBST(ac_no_silk) AC_ARG_ENABLE(silk, - AS_HELP_STRING([--disable-silk], - [Exclude SILK support from the build (default: autodetect)]) - , - [ - if test "$enable_silk" = "no"; then - [ac_no_silk=1] - AC_DEFINE(PJMEDIA_HAS_SILK_CODEC,0) - AC_MSG_RESULT([Checking if SILK support is disabled... yes]) - fi - ], - [ - AC_MSG_RESULT([checking for SILK installations..]) - if test "x$with_silk" != "xno" -a "x$with_silk" != "x"; then - CFLAGS="$CFLAGS -I$with_silk/interface" - CPPFLAGS="$CPPFLAGS -I$with_silk/interface" - LDFLAGS="$LDFLAGS -L$with_silk" - AC_MSG_RESULT([Using SILK prefix... $with_silk]) - fi - AC_SUBST(silk_h_present) - AC_SUBST(silk_present) - AC_CHECK_HEADER(SKP_Silk_SDK_API.h,[silk_h_present=1]) - AC_CHECK_LIB(SKP_SILK_SDK,SKP_Silk_SDK_get_version,[silk_present=1 && LIBS="$LIBS -lSKP_SILK_SDK"]) - if test "x$silk_h_present" = "x1" -a "x$silk_present" = "x1"; then - AC_MSG_RESULT([SILK library found, SILK support enabled]) - AC_DEFINE(PJMEDIA_HAS_SILK_CODEC,1) - else - [ac_no_silk=1] - AC_DEFINE(PJMEDIA_HAS_SILK_CODEC,0) - fi - ]) + AS_HELP_STRING([--disable-silk], [Exclude SILK support from the build (default: autodetect)]), + [ + if test "$enable_silk" = "no"; then + [ac_no_silk=1] + AC_DEFINE(PJMEDIA_HAS_SILK_CODEC,0) + AC_MSG_RESULT([Checking if SILK support is disabled... yes]) + fi + ], + [ + AC_MSG_RESULT([checking for SILK installations..]) + if test "x$with_silk" != "xno" -a "x$with_silk" != "x"; then + CFLAGS="$CFLAGS -I$with_silk/interface" + CPPFLAGS="$CPPFLAGS -I$with_silk/interface" + LDFLAGS="$LDFLAGS -L$with_silk" + AC_MSG_RESULT([Using SILK prefix... $with_silk]) + fi + + AC_SUBST(silk_h_present) + AC_SUBST(silk_present) + AC_CHECK_HEADER(SKP_Silk_SDK_API.h,[silk_h_present=1]) + AC_CHECK_LIB(SKP_SILK_SDK,SKP_Silk_SDK_get_version,[ + silk_present=1 && LIBS="$LIBS -lSKP_SILK_SDK"]) + + if test "x$silk_h_present" = "x1" -a "x$silk_present" = "x1"; then + AC_MSG_RESULT([SILK library found, SILK support enabled]) + AC_DEFINE(PJMEDIA_HAS_SILK_CODEC,1) + else + [ac_no_silk=1] + AC_DEFINE(PJMEDIA_HAS_SILK_CODEC,0) + fi + ] +) dnl # Do not use default OPUS installation if we are cross-compiling if test "x$ac_cross_compile" != "x" -a "x$with_opus" = "xno"; then @@ -2202,54 +2429,53 @@ fi dnl # OPUS prefix AC_ARG_WITH(opus, - AS_HELP_STRING([--with-opus=DIR], - [Specify alternate OPUS prefix]), + AS_HELP_STRING([--with-opus=DIR], [Specify alternate OPUS prefix]), [], [with_opus=no] - ) +) dnl # Include OPUS support AC_SUBST(ac_no_opus) AC_ARG_ENABLE(opus, - AS_HELP_STRING([--disable-opus], - [Exclude OPUS support from the build (default: autodetect)]) - , - [ - if test "$enable_opus" = "no"; then - [ac_no_opus=1] - AC_DEFINE(PJMEDIA_HAS_OPUS_CODEC,0) - AC_MSG_RESULT([Checking if OPUS support is disabled... yes]) - fi - ], - [ - AC_MSG_RESULT([checking for OPUS installations..]) - if test "x$with_opus" != "xno" -a "x$with_opus" != "x"; then - CFLAGS="$CFLAGS -I$with_opus/include" - CPPFLAGS="$CPPFLAGS -I$with_opus/include" - LDFLAGS="$LDFLAGS -L$with_opus/lib" - AC_MSG_RESULT([Using OPUS prefix... $with_opus]) - fi - AC_SUBST(opus_h_present) - AC_SUBST(opus_present) - AC_CHECK_HEADER(opus/opus.h,[opus_h_present=1]) - AC_CHECK_LIB(opus,opus_repacketizer_get_size,[opus_present=1 && LIBS="-lopus $LIBS"]) - if test "x$opus_h_present" = "x1" -a "x$opus_present" = "x1"; then - AC_MSG_RESULT([OPUS library found, OPUS support enabled]) - AC_DEFINE(PJMEDIA_HAS_OPUS_CODEC,1) - else - [ac_no_opus=1] - AC_MSG_RESULT([OPUS library not found, OPUS support disabled]) - AC_DEFINE(PJMEDIA_HAS_OPUS_CODEC,0) - fi - ]) + AS_HELP_STRING([--disable-opus], [Exclude OPUS support from the build (default: autodetect)]), + [ + if test "$enable_opus" = "no"; then + [ac_no_opus=1] + AC_DEFINE(PJMEDIA_HAS_OPUS_CODEC,0) + AC_MSG_RESULT([Checking if OPUS support is disabled... yes]) + fi + ], + [ + AC_MSG_RESULT([checking for OPUS installations..]) + if test "x$with_opus" != "xno" -a "x$with_opus" != "x"; then + CFLAGS="$CFLAGS -I$with_opus/include" + CPPFLAGS="$CPPFLAGS -I$with_opus/include" + LDFLAGS="$LDFLAGS -L$with_opus/lib" + AC_MSG_RESULT([Using OPUS prefix... $with_opus]) + fi + AC_SUBST(opus_h_present) + AC_SUBST(opus_present) + AC_CHECK_HEADER(opus/opus.h,[opus_h_present=1]) + AC_CHECK_LIB(opus,opus_repacketizer_get_size,[ + opus_present=1 && LIBS="-lopus $LIBS"]) + + if test "x$opus_h_present" = "x1" -a "x$opus_present" = "x1"; then + AC_MSG_RESULT([OPUS library found, OPUS support enabled]) + AC_DEFINE(PJMEDIA_HAS_OPUS_CODEC,1) + else + [ac_no_opus=1] + AC_MSG_RESULT([OPUS library not found, OPUS support disabled]) + AC_DEFINE(PJMEDIA_HAS_OPUS_CODEC,0) + fi + ] +) dnl # bcg729 prefix AC_ARG_WITH(bcg729, - AS_HELP_STRING([--with-bcg729=DIR], - [Specify alternate bcg729 prefix]), - [], - [with_bcg729=no] - ) + AS_HELP_STRING([--with-bcg729=DIR], [Specify alternate bcg729 prefix]), + [], + [with_bcg729=no] +) dnl # Do not use default bcg729 installation if we are cross-compiling if test "x$ac_cross_compile" != "x" -a "x$with_bcg729" = "xno"; then @@ -2259,65 +2485,66 @@ fi dnl # bcg729 AC_SUBST(ac_no_bcg729) AC_ARG_ENABLE(bcg729, - AS_HELP_STRING([--disable-bcg729], - [Disable bcg729 (default: not disabled)]), - [ - if test "$enable_bcg729" = "no"; then - [ac_no_bcg729=1] - AC_DEFINE(PJMEDIA_HAS_BCG729,0) - AC_MSG_RESULT([Checking if bcg729 is disabled... yes]) - fi - ], - [ - if test "x$with_bcg729" != "xno" -a "x$with_bcg729" != "x"; then - BCG729_PREFIX=$with_bcg729 - BCG729_CFLAGS="-I$BCG729_PREFIX/include" - BCG729_LDFLAGS="-L$BCG729_PREFIX/lib" - AC_MSG_RESULT([Using bcg729 prefix... $with_bcg729]) - else - BCG729_CFLAGS="" - BCG729_LDFLAGS="" - fi - - AC_MSG_CHECKING([bcg729 usability]) - - BCG729_LIBS="-lbcg729" - - SAVED_LIBS="$LIBS" - SAVED_LDFLAGS="$LDFLAGS" - SAVED_CFLAGS="$CFLAGS" - - LIBS="$BCG729_LIBS $LIBS" - LDFLAGS="$BCG729_LDFLAGS $LDFLAGS" - CFLAGS="$BCG729_CFLAGS $CFLAGS" - - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include - #include - ]], - [initBcg729EncoderChannel(0);] - )], - [ - AC_DEFINE(PJMEDIA_HAS_BCG729,1) - AC_MSG_RESULT(yes) - ], - [ - [ac_no_bcg729=1] - AC_DEFINE(PJMEDIA_HAS_BCG729,0) - LIBS="$SAVED_LIBS" - LDFLAGS="$SAVED_LDFLAGS" - CFLAGS="$SAVED_CFLAGS" - AC_MSG_RESULT(no) - ]) - - ]) - + AS_HELP_STRING([--disable-bcg729], [Disable bcg729 (default: not disabled)]), + [ + if test "$enable_bcg729" = "no"; then + [ac_no_bcg729=1] + AC_DEFINE(PJMEDIA_HAS_BCG729,0) + AC_MSG_RESULT([Checking if bcg729 is disabled... yes]) + fi + ], + [ + if test "x$with_bcg729" != "xno" -a "x$with_bcg729" != "x"; then + BCG729_PREFIX=$with_bcg729 + BCG729_CFLAGS="-I$BCG729_PREFIX/include" + BCG729_LDFLAGS="-L$BCG729_PREFIX/lib" + AC_MSG_RESULT([Using bcg729 prefix... $with_bcg729]) + else + BCG729_CFLAGS="" + BCG729_LDFLAGS="" + fi + + AC_MSG_CHECKING([bcg729 usability]) + + BCG729_LIBS="-lbcg729" + + SAVED_LIBS="$LIBS" + SAVED_LDFLAGS="$LDFLAGS" + SAVED_CFLAGS="$CFLAGS" + + LIBS="$BCG729_LIBS $LIBS" + LDFLAGS="$BCG729_LDFLAGS $LDFLAGS" + CFLAGS="$BCG729_CFLAGS $CFLAGS" + + AC_LINK_IFELSE( + [ + AC_LANG_PROGRAM([ + [#include + #include ]], + [initBcg729EncoderChannel(0);]) + ], + [ + AC_DEFINE(PJMEDIA_HAS_BCG729,1) + AC_MSG_RESULT(yes) + ], + [ + [ac_no_bcg729=1] + AC_DEFINE(PJMEDIA_HAS_BCG729,0) + LIBS="$SAVED_LIBS" + LDFLAGS="$SAVED_LDFLAGS" + CFLAGS="$SAVED_CFLAGS" + AC_MSG_RESULT(no) + ] + ) + ] +) + dnl # lyra prefix AC_ARG_WITH(lyra, - AS_HELP_STRING([--with-lyra=DIR], - [Specify alternate lyra prefix]), - [], - [with_lyra=no] - ) + AS_HELP_STRING([--with-lyra=DIR], [Specify alternate lyra prefix]), + [], + [with_lyra=no] +) dnl # Do not use default lyra installation if we are cross-compiling if test "x$ac_cross_compile" != "x" -a "x$with_lyra" = "xno"; then @@ -2328,93 +2555,96 @@ dnl # lyra AC_SUBST(ac_no_lyra_codec) AC_SUBST(ac_lyra_model_path) AC_ARG_ENABLE(lyra, - AS_HELP_STRING([--disable-lyra], - [Disable lyra (default: not disabled)]), - [ - if test "$enable_lyra" = "no"; then - [ac_no_lyra_codec=1] - AC_DEFINE(PJMEDIA_HAS_LYRA_CODEC,0) - AC_MSG_RESULT([Checking if lyra is disabled... yes]) - fi - ], - [ - if test "x$with_lyra" != "xno" -a "x$with_lyra" != "x"; then - LYRA_PREFIX=$with_lyra - dnl # inside autoconf, single quoted preprocessor definition will raise error - LYRA_CPPFLAGS="-DGLOG_DEPRECATED=__attribute__((deprecated)) -DGLOG_EXPORT=__attribute__((visibility(\"default\"))) -DGLOG_NO_EXPORT=__attribute__((visibility(\"default\")))" - LYRA_CXXFLAGS="-std=c++17 -Wno-deprecated-builtins -I$LYRA_PREFIX/include/com_google_absl -I$LYRA_PREFIX/include/gulrak_filesystem -I$LYRA_PREFIX/include/com_google_glog/src -I$LYRA_PREFIX" - LYRA_LDFLAGS="-L$LYRA_PREFIX/lib" - AC_MSG_RESULT([Using lyra prefix... $with_lyra]) - else - LYRA_CXXFLAGS="" - LYRA_LDFLAGS="" - fi - - AC_MSG_CHECKING([lyra usability]) - - LYRA_LIBS="-llyra" - - SAVED_LIBS="$LIBS" - SAVED_LDFLAGS="$LDFLAGS" - SAVED_CXXFLAGS="$CXXFLAGS" - SAVED_CPPFLAGS="$CPPFLAGS" - - LIBS="$LYRA_LIBS $LIBS" - LDFLAGS="$LYRA_LDFLAGS $LDFLAGS" - CXXFLAGS="$LYRA_CXXFLAGS $CXXFLAGS" - CPPFLAGS="$LYRA_CPPFLAGS $CPPFLAGS" - - AC_LANG_PUSH([C++]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "lyra_decoder.h" - ]], - [std::unique_ptr dec = chromemedia::codec::LyraDecoder::Create(8000,1,"");] - )], - [ - [ac_lyra_model_path="$LYRA_PREFIX/model_coeffs"] - AC_DEFINE(PJMEDIA_HAS_LYRA_CODEC,1) - dnl # use single quoted preprocessor definition - LYRA_CPPFLAGS="'-DGLOG_DEPRECATED=__attribute__((deprecated))' '-DGLOG_EXPORT=__attribute__((visibility(\"default\")))' '-DGLOG_NO_EXPORT=__attribute__((visibility(\"default\")))'" - CXXFLAGS="$LYRA_CPPFLAGS $CXXFLAGS" - AC_MSG_RESULT(yes) - ], - [ - [ac_no_lyra_codec=1] - LIBS="$SAVED_LIBS" - LDFLAGS="$SAVED_LDFLAGS" - CXXFLAGS="$SAVED_CXXFLAGS" - AC_MSG_RESULT(no) - ]) - AC_LANG_POP([C++]) - CPPFLAGS="$SAVED_CPPFLAGS" - ]) - - + AS_HELP_STRING([--disable-lyra], [Disable lyra (default: not disabled)]), + [ + if test "$enable_lyra" = "no"; then + [ac_no_lyra_codec=1] + AC_DEFINE(PJMEDIA_HAS_LYRA_CODEC,0) + AC_MSG_RESULT([Checking if lyra is disabled... yes]) + fi + ], + [ + if test "x$with_lyra" != "xno" -a "x$with_lyra" != "x"; then + LYRA_PREFIX=$with_lyra + dnl # inside autoconf, single quoted preprocessor definition will raise error + LYRA_CPPFLAGS="-DGLOG_DEPRECATED=__attribute__((deprecated)) -DGLOG_EXPORT=__attribute__((visibility(\"default\"))) -DGLOG_NO_EXPORT=__attribute__((visibility(\"default\")))" + LYRA_CXXFLAGS="-std=c++17 -Wno-deprecated-builtins -I$LYRA_PREFIX/include/com_google_absl -I$LYRA_PREFIX/include/gulrak_filesystem -I$LYRA_PREFIX/include/com_google_glog/src -I$LYRA_PREFIX" + LYRA_LDFLAGS="-L$LYRA_PREFIX/lib" + AC_MSG_RESULT([Using lyra prefix... $with_lyra]) + else + LYRA_CXXFLAGS="" + LYRA_LDFLAGS="" + fi + + AC_MSG_CHECKING([lyra usability]) + + LYRA_LIBS="-llyra" + + SAVED_LIBS="$LIBS" + SAVED_LDFLAGS="$LDFLAGS" + SAVED_CXXFLAGS="$CXXFLAGS" + SAVED_CPPFLAGS="$CPPFLAGS" + + LIBS="$LYRA_LIBS $LIBS" + LDFLAGS="$LYRA_LDFLAGS $LDFLAGS" + CXXFLAGS="$LYRA_CXXFLAGS $CXXFLAGS" + CPPFLAGS="$LYRA_CPPFLAGS $CPPFLAGS" + + AC_LANG_PUSH([C++]) + AC_LINK_IFELSE( + [ + AC_LANG_PROGRAM([ + [#include "lyra_decoder.h"]], + [std::unique_ptr dec = chromemedia::codec::LyraDecoder::Create(8000,1,"");]) + ], + [ + [ac_lyra_model_path="$LYRA_PREFIX/model_coeffs"] + AC_DEFINE(PJMEDIA_HAS_LYRA_CODEC,1) + dnl # use single quoted preprocessor definition + LYRA_CPPFLAGS="'-DGLOG_DEPRECATED=__attribute__((deprecated))' '-DGLOG_EXPORT=__attribute__((visibility(\"default\")))' '-DGLOG_NO_EXPORT=__attribute__((visibility(\"default\")))'" + CXXFLAGS="$LYRA_CPPFLAGS $CXXFLAGS" + AC_MSG_RESULT(yes) + ], + [ + [ac_no_lyra_codec=1] + LIBS="$SAVED_LIBS" + LDFLAGS="$SAVED_LDFLAGS" + CXXFLAGS="$SAVED_CXXFLAGS" + AC_MSG_RESULT(no) + ] + ) + AC_LANG_POP([C++]) + CPPFLAGS="$SAVED_CPPFLAGS" + ] +) dnl # Include libsrtp AC_SUBST(ac_no_srtp) AC_ARG_ENABLE(libsrtp, - AS_HELP_STRING([--disable-libsrtp], - [Exclude libsrtp in the build]), - [if test "$enable_libsrtp" = "no"; then - [ac_no_srtp=1] - CFLAGS="$CFLAGS -DPJMEDIA_HAS_SRTP=0" - AC_MSG_RESULT([Checking if libsrtp is disabled...yes]) - fi], - AC_MSG_RESULT([Checking if libsrtp is disabled...no])) - + AS_HELP_STRING([--disable-libsrtp], [Exclude libsrtp in the build]), + [ + if test "$enable_libsrtp" = "no"; then + [ac_no_srtp=1] + CFLAGS="$CFLAGS -DPJMEDIA_HAS_SRTP=0" + AC_MSG_RESULT([Checking if libsrtp is disabled...yes]) + fi + ], + AC_MSG_RESULT([Checking if libsrtp is disabled...no]) +) dnl # Include libyuv AC_SUBST(ac_no_yuv) AC_ARG_ENABLE(libyuv, - AS_HELP_STRING([--disable-libyuv], - [Exclude libyuv in the build]), - [if test "$enable_libyuv" = "no"; then - [ac_no_yuv=1] - AC_DEFINE(PJMEDIA_HAS_LIBYUV,0) - AC_MSG_RESULT([Checking if libyuv is disabled...yes]) - fi], - AC_MSG_RESULT([Checking if libyuv is disabled...no])) - + AS_HELP_STRING([--disable-libyuv], [Exclude libyuv in the build]), + [ + if test "$enable_libyuv" = "no"; then + [ac_no_yuv=1] + AC_DEFINE(PJMEDIA_HAS_LIBYUV,0) + AC_MSG_RESULT([Checking if libyuv is disabled...yes]) + fi + ], + AC_MSG_RESULT([Checking if libyuv is disabled...no]) +) dnl # Include webrtc AC_SUBST(ac_no_webrtc) @@ -2422,81 +2652,83 @@ AC_SUBST(ac_webrtc_instset) AC_SUBST(ac_webrtc_cflags) AC_SUBST(ac_webrtc_ldflags) AC_ARG_ENABLE(libwebrtc, - AS_HELP_STRING([--disable-libwebrtc], - [Exclude libwebrtc in the build]), - [if test "$enable_libwebrtc" = "no"; then - [ac_no_webrtc=1] - AC_DEFINE(PJMEDIA_HAS_LIBWEBRTC,0) - AC_MSG_RESULT([Checking if libwebrtc is disabled...yes]) - fi], - [ - AC_MSG_RESULT([Checking if libwebrtc is disabled...no]) - case $target in - *-apple-darwin_ios*) - case $target in - arm64*) - ac_webrtc_instset=neon - ac_webrtc_cflags="-DWEBRTC_ARCH_ARM64" - ;; - *arm*) - ac_webrtc_instset=neon - ;; - *) - ac_webrtc_instset=sse2 - ;; - esac - ;; - *android*) - case $TARGET_ABI in - armeabi-v7a) - ac_webrtc_instset=neon - ac_webrtc_cflags="-mfloat-abi=softfp -mfpu=neon" - ;; - armeabi) - ac_webrtc_instset=neon - ac_webrtc_cflags="-mthumb -mfloat-abi=softfp -mfpu=neon -march=armv7" - ;; - arm64*) - ac_webrtc_instset=neon - ac_webrtc_cflags="-DWEBRTC_ARCH_ARM64" - ;; - mips64*) - ac_webrtc_instset=generic - ;; - mips*) - ac_webrtc_instset=mips - ;; - x86*) - ac_webrtc_instset=sse2 - ;; - *) - ac_webrtc_instset=generic - ;; - esac - ;; - *mingw* | *cygw*) - ac_webrtc_instset=sse2 - ac_webrtc_cflags="-msse2" - ;; - *win32* | *w32* | *darwin* | *linux*) - case $target in - armv7l*gnueabihf) - ac_webrtc_instset=neon - ac_webrtc_cflags="-DWEBRTC_ARCH_ARM_V7 -mfloat-abi=hard -mfpu=neon" - ;; - arm-apple-darwin* | aarch64*) - ac_webrtc_instset=neon - ac_webrtc_cflags="-DWEBRTC_ARCH_ARM64" - ;; - *) - ac_webrtc_instset=sse2 - ;; - esac - ;; - *) - ;; - esac - ]) + AS_HELP_STRING([--disable-libwebrtc], [Exclude libwebrtc in the build]), + [ + if test "$enable_libwebrtc" = "no"; then + [ac_no_webrtc=1] + AC_DEFINE(PJMEDIA_HAS_LIBWEBRTC,0) + AC_MSG_RESULT([Checking if libwebrtc is disabled...yes]) + fi + ], + [ + AC_MSG_RESULT([Checking if libwebrtc is disabled...no]) + case $target in + *-apple-darwin_ios*) + case $target in + arm64*) + ac_webrtc_instset=neon + ac_webrtc_cflags="-DWEBRTC_ARCH_ARM64" + ;; + *arm*) + ac_webrtc_instset=neon + ;; + *) + ac_webrtc_instset=sse2 + ;; + esac + ;; + *android*) + case $TARGET_ABI in + armeabi-v7a) + ac_webrtc_instset=neon + ac_webrtc_cflags="-mfloat-abi=softfp -mfpu=neon" + ;; + armeabi) + ac_webrtc_instset=neon + ac_webrtc_cflags="-mthumb -mfloat-abi=softfp -mfpu=neon -march=armv7" + ;; + arm64*) + ac_webrtc_instset=neon + ac_webrtc_cflags="-DWEBRTC_ARCH_ARM64" + ;; + mips64*) + ac_webrtc_instset=generic + ;; + mips*) + ac_webrtc_instset=mips + ;; + x86*) + ac_webrtc_instset=sse2 + ;; + *) + ac_webrtc_instset=generic + ;; + esac + ;; + *mingw* | *cygw*) + ac_webrtc_instset=sse2 + ac_webrtc_cflags="-msse2" + ;; + *win32* | *w32* | *darwin* | *linux*) + case $target in + armv7l*gnueabihf) + ac_webrtc_instset=neon + ac_webrtc_cflags="-DWEBRTC_ARCH_ARM_V7 -mfloat-abi=hard -mfpu=neon" + ;; + arm-apple-darwin* | aarch64*) + ac_webrtc_instset=neon + ac_webrtc_cflags="-DWEBRTC_ARCH_ARM64" + ;; + *) + ac_webrtc_instset=sse2 + ;; + esac + ;; + *) + ;; + esac + ] +) dnl # Include webrtc AEC3 @@ -2505,104 +2737,112 @@ AC_SUBST(ac_webrtc_aec3_instset) AC_SUBST(ac_webrtc_aec3_cflags) AC_SUBST(ac_webrtc_aec3_ldflags) AC_ARG_ENABLE(libwebrtc_aec3, - AS_HELP_STRING([--enable-libwebrtc-aec3], - [Build libwebrtc-aec3 that's included in PJSIP]), - [ - if test "$enable_libwebrtc_aec3" = "yes"; then - # Test if we can build WebRtc AEC3 - AC_MSG_CHECKING([if WebRtc AEC3 can be compiled with C++17]) - - SAVED_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -std=c++17" - - AC_LANG_PUSH([C++]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [])], - [AC_MSG_RESULT(yes) - LD="$CXX"], - [AC_MSG_RESULT(no) - CXXFLAGS="$SAVED_CXXFLAGS" - ac_no_webrtc_aec3=1 - AC_DEFINE(PJMEDIA_HAS_LIBWEBRTC_AEC3,0)]) - AC_LANG_POP([C++]) - - case $target in - *-apple-darwin_ios*) - case $target in - arm64*) - ac_webrtc_aec3_instset=neon - ac_webrtc_aec3_cflags="-DWEBRTC_ARCH_ARM64" - ;; - *arm*) - ac_webrtc_aec3_instset=neon - ;; - *) - ac_webrtc_aec3_instset=sse2 - ;; - esac - ac_webrtc_aec3_cflags+=" -DWEBRTC_IOS=1" - ;; - *android*) - case $TARGET_ABI in - armeabi-v7a) - ac_webrtc_aec3_instset=neon - ac_webrtc_aec3_cflags="-mfloat-abi=softfp -mfpu=neon" - ;; - armeabi) - ac_webrtc_aec3_instset=neon - ac_webrtc_aec3_cflags="-mthumb -mfloat-abi=softfp -mfpu=neon -march=armv7" - ;; - arm64*) - ac_webrtc_aec3_instset=neon - ac_webrtc_aec3_cflags="-DWEBRTC_ARCH_ARM64" - ;; - x86*) - ac_webrtc_aec3_instset=sse2 - ;; - esac - ac_webrtc_aec3_cflags+=" -DWEBRTC_ANDROID=1" - ;; - *mingw* | *cygw*) - ac_webrtc_aec3_instset=sse2 - ac_webrtc_aec3_cflags="-msse2" - ;; - *win32* | *w32* | *darwin* | *linux*) - case $target in - armv7l*gnueabihf) - ac_webrtc_aec3_instset=neon - ac_webrtc_aec3_cflags="-DWEBRTC_ARCH_ARM_V7 -mfloat-abi=hard -mfpu=neon" - ;; - arm-apple-darwin* | aarch64*) - ac_webrtc_aec3_instset=neon - ac_webrtc_aec3_cflags="-DWEBRTC_ARCH_ARM64" - ;; - *) - ac_webrtc_aec3_instset=sse2 - ;; - esac - case $target in - *darwin*) - ac_webrtc_aec3_cflags+=" -DWEBRTC_MAC=1" - ;; - *linux*) - ac_webrtc_aec3_cflags+=" -DWEBRTC_LINUX=1" - ;; - esac - ;; - *) - ;; - esac - ac_webrtc_aec3_cflags+=" -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_POSIX=1" - else - ac_no_webrtc_aec3=1 - AC_DEFINE(PJMEDIA_HAS_LIBWEBRTC_AEC3,0) - AC_MSG_RESULT([Checking if libwebrtc-aec3 is enabled...no]) - fi - ], - [ac_no_webrtc_aec3=1 - AC_DEFINE(PJMEDIA_HAS_LIBWEBRTC_AEC3,0) - AC_MSG_RESULT([Checking if libwebrtc-aec3 is enabled...no]) - ]) - + AS_HELP_STRING([--enable-libwebrtc-aec3], [Build libwebrtc-aec3 that's included in PJSIP]), + [ + if test "$enable_libwebrtc_aec3" = "yes"; then + # Test if we can build WebRtc AEC3 + AC_MSG_CHECKING([if WebRtc AEC3 can be compiled with C++17]) + + SAVED_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS -std=c++17" + + AC_LANG_PUSH([C++]) + AC_LINK_IFELSE( + [ + AC_LANG_PROGRAM([[]], []) + ], + [ + AC_MSG_RESULT(yes) + LD="$CXX" + ], + [ + AC_MSG_RESULT(no) + CXXFLAGS="$SAVED_CXXFLAGS" + ac_no_webrtc_aec3=1 + AC_DEFINE(PJMEDIA_HAS_LIBWEBRTC_AEC3,0) + ] + ) + AC_LANG_POP([C++]) + + case $target in + *-apple-darwin_ios*) + case $target in + arm64*) + ac_webrtc_aec3_instset=neon + ac_webrtc_aec3_cflags="-DWEBRTC_ARCH_ARM64" + ;; + *arm*) + ac_webrtc_aec3_instset=neon + ;; + *) + ac_webrtc_aec3_instset=sse2 + ;; + esac + ac_webrtc_aec3_cflags+=" -DWEBRTC_IOS=1" + ;; + *android*) + case $TARGET_ABI in + armeabi-v7a) + ac_webrtc_aec3_instset=neon + ac_webrtc_aec3_cflags="-mfloat-abi=softfp -mfpu=neon" + ;; + armeabi) + ac_webrtc_aec3_instset=neon + ac_webrtc_aec3_cflags="-mthumb -mfloat-abi=softfp -mfpu=neon -march=armv7" + ;; + arm64*) + ac_webrtc_aec3_instset=neon + ac_webrtc_aec3_cflags="-DWEBRTC_ARCH_ARM64" + ;; + x86*) + ac_webrtc_aec3_instset=sse2 + ;; + esac + ac_webrtc_aec3_cflags+=" -DWEBRTC_ANDROID=1" + ;; + *mingw* | *cygw*) + ac_webrtc_aec3_instset=sse2 + ac_webrtc_aec3_cflags="-msse2" + ;; + *win32* | *w32* | *darwin* | *linux*) + case $target in + armv7l*gnueabihf) + ac_webrtc_aec3_instset=neon + ac_webrtc_aec3_cflags="-DWEBRTC_ARCH_ARM_V7 -mfloat-abi=hard -mfpu=neon" + ;; + arm-apple-darwin* | aarch64*) + ac_webrtc_aec3_instset=neon + ac_webrtc_aec3_cflags="-DWEBRTC_ARCH_ARM64" + ;; + *) + ac_webrtc_aec3_instset=sse2 + ;; + esac + case $target in + *darwin*) + ac_webrtc_aec3_cflags+=" -DWEBRTC_MAC=1" + ;; + *linux*) + ac_webrtc_aec3_cflags+=" -DWEBRTC_LINUX=1" + ;; + esac + ;; + *) + ;; + esac + ac_webrtc_aec3_cflags+=" -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_POSIX=1" + else + ac_no_webrtc_aec3=1 + AC_DEFINE(PJMEDIA_HAS_LIBWEBRTC_AEC3,0) + AC_MSG_RESULT([Checking if libwebrtc-aec3 is enabled...no]) + fi + ], + [ + ac_no_webrtc_aec3=1 + AC_DEFINE(PJMEDIA_HAS_LIBWEBRTC_AEC3,0) + AC_MSG_RESULT([Checking if libwebrtc-aec3 is enabled...no]) + ] +) dnl ########################################## dnl # @@ -2615,13 +2855,15 @@ dnl # correct value (max_fd+1). If zero, nfds will be filled up with dnl # PJ_FD_SETSIZE AC_MSG_CHECKING([if select() needs correct nfds]) case $target in - *rtems*) AC_DEFINE(PJ_SELECT_NEEDS_NFDS,1) - AC_MSG_RESULT(yes) - ;; - *) AC_DEFINE(PJ_SELECT_NEEDS_NFDS,0) - AC_MSG_RESULT([no (default)]) - AC_MSG_RESULT([** Decided that select() doesn't need correct nfds (please check)]) - ;; + *rtems*) + AC_DEFINE(PJ_SELECT_NEEDS_NFDS,1) + AC_MSG_RESULT(yes) + ;; + *) + AC_DEFINE(PJ_SELECT_NEEDS_NFDS,0) + AC_MSG_RESULT([no (default)]) + AC_MSG_RESULT([** Decided that select() doesn't need correct nfds (please check)]) + ;; esac dnl # Determine if pj_thread_create() should enforce thread stack size when @@ -2629,46 +2871,52 @@ dnl # creating thread. Default is zero, to allow OS to allocate appropriate dnl # thread's stack size. AC_MSG_CHECKING([if pj_thread_create() should enforce stack size]) case $target in - *rtems*) AC_DEFINE(PJ_THREAD_SET_STACK_SIZE,1) - AC_MSG_RESULT(yes) - ;; - *) AC_DEFINE(PJ_THREAD_SET_STACK_SIZE,0) - AC_MSG_RESULT([no (default)]) - ;; + *rtems*) + AC_DEFINE(PJ_THREAD_SET_STACK_SIZE,1) + AC_MSG_RESULT(yes) + ;; + *) + AC_DEFINE(PJ_THREAD_SET_STACK_SIZE,0) + AC_MSG_RESULT([no (default)]) + ;; esac dnl # Determine if pj_thread_create() should allocate thread's stack from dnl # the pool. Default is zero, to let OS allocate thread's stack. AC_MSG_CHECKING([if pj_thread_create() should allocate stack]) case $target in - *rtems*) AC_DEFINE(PJ_THREAD_ALLOCATE_STACK,1) - AC_MSG_RESULT(yes) - ;; - *) AC_DEFINE(PJ_THREAD_ALLOCATE_STACK,0) - AC_MSG_RESULT([no (default)]) - ;; + *rtems*) + AC_DEFINE(PJ_THREAD_ALLOCATE_STACK,1) + AC_MSG_RESULT(yes) + ;; + *) + AC_DEFINE(PJ_THREAD_ALLOCATE_STACK,0) + AC_MSG_RESULT([no (default)]) + ;; esac dnl # This value specifies the value set in errno by the OS when a non-blocking dnl # socket recv() can not return immediate data. case $target in - *mingw* | *cygw* | *win32* | *w32* ) - AC_DEFINE(PJ_BLOCKING_ERROR_VAL,WSAEWOULDBLOCK) - ;; - *) AC_DEFINE(PJ_BLOCKING_ERROR_VAL,EAGAIN) - AC_MSG_RESULT([** Setting non-blocking recv() retval to EAGAIN (please check)]) - ;; + *mingw* | *cygw* | *win32* | *w32* ) + AC_DEFINE(PJ_BLOCKING_ERROR_VAL,WSAEWOULDBLOCK) + ;; + *) + AC_DEFINE(PJ_BLOCKING_ERROR_VAL,EAGAIN) + AC_MSG_RESULT([** Setting non-blocking recv() retval to EAGAIN (please check)]) + ;; esac dnl # This value specifies the value set in errno by the OS when a non-blocking dnl # socket connect() can not get connected immediately. case $target in - *mingw* | *cygw* | *win32* | *w32* ) - AC_DEFINE(PJ_BLOCKING_CONNECT_ERROR_VAL,WSAEWOULDBLOCK) - ;; - *) AC_DEFINE(PJ_BLOCKING_CONNECT_ERROR_VAL,EINPROGRESS) - AC_MSG_RESULT([** Setting non-blocking connect() retval to EINPROGRESS (please check)]) - ;; + *mingw* | *cygw* | *win32* | *w32* ) + AC_DEFINE(PJ_BLOCKING_CONNECT_ERROR_VAL,WSAEWOULDBLOCK) + ;; + *) + AC_DEFINE(PJ_BLOCKING_CONNECT_ERROR_VAL,EINPROGRESS) + AC_MSG_RESULT([** Setting non-blocking connect() retval to EINPROGRESS (please check)]) + ;; esac dnl @@ -2678,11 +2926,11 @@ dnl # pthread_setname_np()/pthread_set_name_np() in pthread_np.h on bsd dnl case $target in - *linux* | *darwin* | *bsd*) - AC_CHECK_HEADER(pthread_np.h,[AC_DEFINE(PJ_HAS_PTHREAD_NP_H,1)]) - AC_CHECK_FUNC(pthread_setname_np,[AC_DEFINE(PJ_HAS_PTHREAD_SETNAME_NP,1)]) - AC_CHECK_FUNC(pthread_set_name_np,[AC_DEFINE(PJ_HAS_PTHREAD_SET_NAME_NP,1)]) - ;; + *linux* | *darwin* | *bsd*) + AC_CHECK_HEADER(pthread_np.h,[AC_DEFINE(PJ_HAS_PTHREAD_NP_H,1)]) + AC_CHECK_FUNC(pthread_setname_np,[AC_DEFINE(PJ_HAS_PTHREAD_SETNAME_NP,1)]) + AC_CHECK_FUNC(pthread_set_name_np,[AC_DEFINE(PJ_HAS_PTHREAD_SET_NAME_NP,1)]) + ;; esac @@ -2690,19 +2938,18 @@ AC_SUBST(target) AC_SUBST(ac_host,unix) AC_SUBST(ac_main_obj) case $target in - *rtems*) - ac_main_obj=main_rtems.o - ;; - *) - ac_main_obj=main.o - ;; + *rtems*) + ac_main_obj=main_rtems.o + ;; + *) + ac_main_obj=main.o + ;; esac AC_SUBST(CC) ac_build_mak_vars=`echo $ac_build_mak_vars | sed 's/\\\\n/\n/g'` AC_OUTPUT - AC_MSG_RESULT([ Configurations for current target have been written to 'build.mak', and 'os-auto.mak' in various build directories, and pjlib/include/pj/compat/os_auto.h.