diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-08-20 20:47:34 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-08-20 20:47:34 +0000 |
commit | 763d1e9a8ed2e44419760db370e9280426a0b617 (patch) | |
tree | f4c5765dfe86b65375a06cc505a8334361cffadd | |
parent | dc216fbe98f8335de253cf671528b6e0dc2cb509 (diff) |
Finishing autoconf work, also fixed compilation error in publish.h
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@689 74dad513-b988-da41-8d7b-12977e46ad98
-rwxr-xr-x | aconfigure | 1705 | ||||
-rw-r--r-- | aconfigure.ac | 247 | ||||
-rw-r--r-- | build.mak.in | 8 | ||||
-rw-r--r-- | build/m-auto.mak | 1 | ||||
-rw-r--r-- | build/os-auto.mak.in | 11 | ||||
-rw-r--r-- | build/os-darwinos.mak | 2 | ||||
-rw-r--r-- | build/os-linux.mak | 2 | ||||
-rw-r--r-- | build/os-rtems.mak | 2 | ||||
-rw-r--r-- | build/os-sunos.mak | 3 | ||||
-rw-r--r-- | build/os-win32.mak | 3 | ||||
-rw-r--r-- | pjlib-util/build/os-auto.mak.in | 3 | ||||
-rw-r--r-- | pjlib/build/os-auto.mak.in | 35 | ||||
-rw-r--r-- | pjlib/include/pj/compat/m_auto.h.in | 38 | ||||
-rw-r--r-- | pjlib/include/pj/config.h | 16 | ||||
-rw-r--r-- | pjmedia/build/Makefile | 4 | ||||
-rw-r--r-- | pjmedia/build/os-auto.mak.in | 123 | ||||
-rw-r--r-- | pjmedia/src/pjmedia/portaudio/pa_unix_hostapis.c | 8 | ||||
-rw-r--r-- | pjsip/build/Makefile | 2 | ||||
-rw-r--r-- | pjsip/build/os-auto.mak.in | 0 | ||||
-rw-r--r-- | pjsip/include/pjsip-simple/publish.h | 1 |
20 files changed, 1999 insertions, 215 deletions
@@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for pjproject 0.5.7. +# Generated by GNU Autoconf 2.59 for pjproject 0.5.8. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation @@ -267,8 +267,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='pjproject' PACKAGE_TARNAME='pjproject' -PACKAGE_VERSION='0.5.7' -PACKAGE_STRING='pjproject 0.5.7' +PACKAGE_VERSION='0.5.8' +PACKAGE_STRING='pjproject 0.5.8' PACKAGE_BUGREPORT='' # Factoring default headers for most tests. @@ -308,7 +308,7 @@ ac_includes_default="\ # include <unistd.h> #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX ac_bigendian CPP EGREP ac_pjmedia_snd ac_pa_use_alsa ac_no_small_filter ac_no_large_filter ac_no_g711_plc ac_no_speex_aec ac_no_g711_codec ac_no_l16_codec ac_no_gsm_codec ac_no_speex_codec ac_no_ilbc_codec ac_cross_compile ac_linux_poll ac_host ac_main_obj LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -765,6 +765,14 @@ ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CXX_set=${CXX+set} +ac_env_CXX_value=$CXX +ac_cv_env_CXX_set=${CXX+set} +ac_cv_env_CXX_value=$CXX +ac_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_env_CXXFLAGS_value=$CXXFLAGS +ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_cv_env_CXXFLAGS_value=$CXXFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} @@ -777,7 +785,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures pjproject 0.5.7 to adapt to many kinds of systems. +\`configure' configures pjproject 0.5.8 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -839,10 +847,25 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of pjproject 0.5.7:";; + short | recursive ) echo "Configuration of pjproject 0.5.8:";; esac cat <<\_ACEOF +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-floating-point + Disable floating point where possible + --disable-small-filter Exclude small filter in resampling + --disable-large-filter Exclude large filter in resampling + --disable-g711-plc Exclude G.711 Annex A PLC + --disable-speex-aec Exclude Speex Acoustic Echo Canceller/AEC + --disable-g711-codec Exclude G.711 codecs from the build + --disable-l16-codec Exclude Linear/L16 codec family from the build + --disable-gsm-codec Exclude GSM codec in the build + --disable-speex-codec Exclude Speex codecs in the build + --disable-ilbc-codec Exclude iLBC codec in the build + Some influential environment variables: CC C compiler command CFLAGS C compiler flags @@ -850,6 +873,8 @@ Some influential environment variables: nonstandard directory <lib dir> CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> + CXX C++ compiler command + CXXFLAGS C++ compiler flags CPP C preprocessor Use these variables to override the choices made by `configure' or to help @@ -950,7 +975,7 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -pjproject configure 0.5.7 +pjproject configure 0.5.8 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -964,7 +989,7 @@ cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by pjproject $as_me 0.5.7, which was +It was created by pjproject $as_me 0.5.8, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1407,7 +1432,9 @@ test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- - ac_config_headers="$ac_config_headers pjlib/include/pj/compat/os_auto.h" + ac_config_headers="$ac_config_headers pjlib/include/pj/compat/os_auto.h pjlib/include/pj/compat/m_auto.h" + + ac_config_files="$ac_config_files build.mak build/os-auto.mak pjlib/build/os-auto.mak pjlib-util/build/os-auto.mak pjmedia/build/os-auto.mak pjsip/build/os-auto.mak" ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -2339,6 +2366,361 @@ 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 +ac_ext=cc +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 +if test -n "$ac_tool_prefix"; then + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CXX" && break +done +test -n "$ac_ct_CXX" || ac_ct_CXX="g++" + + CXX=$ac_ct_CXX +fi + + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 + (eval $ac_compiler --version </dev/null >&5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 + (eval $ac_compiler -v </dev/null >&5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 + (eval $ac_compiler -V </dev/null >&5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +CXXFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_cxx_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +#include <stdlib.h> +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +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 + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -2347,6 +2729,434 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + +echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 +echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6 +if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char pthread_create (); +int +main () +{ +pthread_create (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_pthread_pthread_create=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_pthread_pthread_create=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6 +if test $ac_cv_lib_pthread_pthread_create = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPTHREAD 1 +_ACEOF + + LIBS="-lpthread $LIBS" + +fi + + +echo "$as_me:$LINENO: result: Setting PJ_M_NAME to $target_cpu" >&5 +echo "${ECHO_T}Setting PJ_M_NAME to $target_cpu" >&6 +cat >>confdefs.h <<_ACEOF +#define PJ_M_NAME "$target_cpu" +_ACEOF + + +# Endianness detection +echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 +if test "${ac_cv_c_bigendian+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # See if sys/param.h defines the BYTE_ORDER macro. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <sys/types.h> +#include <sys/param.h> + +int +main () +{ +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN + bogus endian macros +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + # It does; now see whether it defined to BIG_ENDIAN or not. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <sys/types.h> +#include <sys/param.h> + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_c_bigendian=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +# It does not; compile a test program. +if test "$cross_compiling" = yes; then + # try to guess the endianness by grepping values into an object file + ac_cv_c_bigendian=unknown + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } +short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } +int +main () +{ + _ascii (); _ebcdic (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then + ac_cv_c_bigendian=yes +fi +if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +int +main () +{ + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long l; + char c[sizeof (long)]; + } u; + u.l = 1; + exit (u.c[sizeof (long) - 1] == 1); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=no +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_c_bigendian=yes +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6 +case $ac_cv_c_bigendian in + yes) + ac_bigendian=1 + + cat >>confdefs.h <<\_ACEOF +#define PJ_IS_LITTLE_ENDIAN 0 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define PJ_IS_BIG_ENDIAN 1 +_ACEOF + + ;; + no) + ac_bigendian=0 + + cat >>confdefs.h <<\_ACEOF +#define PJ_IS_LITTLE_ENDIAN 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define PJ_IS_BIG_ENDIAN 0 +_ACEOF + + ;; + *) + { { echo "$as_me:$LINENO: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +echo "$as_me: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; +esac + + +# --disable-floating-point option +# Check whether --enable-floating-point or --disable-floating-point was given. +if test "${enable_floating_point+set}" = set; then + enableval="$enable_floating_point" + if test "$enable_floating_point" = "no"; then + cat >>confdefs.h <<\_ACEOF +#define PJ_HAS_FLOATING_POINT 0 +_ACEOF + + echo "$as_me:$LINENO: result: Checking if floating point is disabled... yes" >&5 +echo "${ECHO_T}Checking if floating point is disabled... yes" >&6 + fi +else + + cat >>confdefs.h <<\_ACEOF +#define PJ_HAS_FLOATING_POINT 1 +_ACEOF + + echo "$as_me:$LINENO: result: Checking if floating point is disabled... no" >&5 +echo "${ECHO_T}Checking if floating point is disabled... no" >&6 + +echo "$as_me:$LINENO: checking for fmod in -lm" >&5 +echo $ECHO_N "checking for fmod in -lm... $ECHO_C" >&6 +if test "${ac_cv_lib_m_fmod+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char fmod (); +int +main () +{ +fmod (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_m_fmod=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_m_fmod=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_m_fmod" >&5 +echo "${ECHO_T}$ac_cv_lib_m_fmod" >&6 +if test $ac_cv_lib_m_fmod = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBM 1 +_ACEOF + + LIBS="-lm $LIBS" + +fi + + +fi; + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -6461,144 +7271,46 @@ fi -if test "${ac_cv_header_alsa_version_h+set}" = set; then - echo "$as_me:$LINENO: checking for alsa/version.h" >&5 -echo $ECHO_N "checking for alsa/version.h... $ECHO_C" >&6 -if test "${ac_cv_header_alsa_version_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: $ac_cv_header_alsa_version_h" >&5 -echo "${ECHO_T}$ac_cv_header_alsa_version_h" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking alsa/version.h usability" >&5 -echo $ECHO_N "checking alsa/version.h usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +echo "$as_me:$LINENO: result: Setting PJ_OS_NAME to $target" >&5 +echo "${ECHO_T}Setting PJ_OS_NAME to $target" >&6 +cat >>confdefs.h <<_ACEOF +#define PJ_OS_NAME "$target" _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <alsa/version.h> + + +echo "$as_me:$LINENO: result: Setting PJ_HAS_ERRNO_VAR to 1" >&5 +echo "${ECHO_T}Setting PJ_HAS_ERRNO_VAR to 1" >&6 +cat >>confdefs.h <<\_ACEOF +#define PJ_HAS_ERRNO_VAR 1 _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 -# Is the header present? -echo "$as_me:$LINENO: checking alsa/version.h presence" >&5 -echo $ECHO_N "checking alsa/version.h presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +echo "$as_me:$LINENO: result: Setting PJ_HAS_HIGH_RES_TIMER to 1" >&5 +echo "${ECHO_T}Setting PJ_HAS_HIGH_RES_TIMER to 1" >&6 +cat >>confdefs.h <<\_ACEOF +#define PJ_HAS_HIGH_RES_TIMER 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <alsa/version.h> + + +echo "$as_me:$LINENO: result: Setting PJ_HAS_MALLOC to 1" >&5 +echo "${ECHO_T}Setting PJ_HAS_MALLOC to 1" >&6 +cat >>confdefs.h <<\_ACEOF +#define PJ_HAS_MALLOC 1 _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: alsa/version.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: alsa/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: alsa/version.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: alsa/version.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: alsa/version.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: alsa/version.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: alsa/version.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: alsa/version.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: alsa/version.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: alsa/version.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: alsa/version.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: alsa/version.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: alsa/version.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: alsa/version.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: alsa/version.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: alsa/version.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to the pjproject lists. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for alsa/version.h" >&5 -echo $ECHO_N "checking for alsa/version.h... $ECHO_C" >&6 -if test "${ac_cv_header_alsa_version_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_alsa_version_h=$ac_header_preproc -fi -echo "$as_me:$LINENO: result: $ac_cv_header_alsa_version_h" >&5 -echo "${ECHO_T}$ac_cv_header_alsa_version_h" >&6 +echo "$as_me:$LINENO: result: Setting PJ_NATIVE_STRING_IS_UNICODE to 0" >&5 +echo "${ECHO_T}Setting PJ_NATIVE_STRING_IS_UNICODE to 0" >&6 +cat >>confdefs.h <<\_ACEOF +#define PJ_NATIVE_STRING_IS_UNICODE 0 +_ACEOF -fi +echo "$as_me:$LINENO: result: Setting PJ_ATOMIC_VALUE_TYPE to long" >&5 +echo "${ECHO_T}Setting PJ_ATOMIC_VALUE_TYPE to long" >&6 +cat >>confdefs.h <<\_ACEOF +#define PJ_ATOMIC_VALUE_TYPE long +_ACEOF # Determine if inet_aton() is available @@ -6822,21 +7534,349 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 +cat >>confdefs.h <<\_ACEOF +#define PJ_EMULATE_RWMUTEX 1 +_ACEOF + + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +########################################## +# +# PJMEDIA +# + +# Sound device backend selection + +case $target in + *cygwin* | *win* | *mingw*) + ac_pjmedia_snd=pa_win32 + echo "$as_me:$LINENO: result: Checking sound device backend... win32 sound" >&5 +echo "${ECHO_T}Checking sound device backend... win32 sound" >&6 + ;; + *rtems*) + ac_pjmedia_snd=null + echo "$as_me:$LINENO: result: Checking sound device backend... null sound" >&5 +echo "${ECHO_T}Checking sound device backend... null sound" >&6 + ;; + *darwin*) + ac_pjmedia_snd=pa_darwin_os + echo "$as_me:$LINENO: result: Checking sound device backend... coreaudio" >&5 +echo "${ECHO_T}Checking sound device backend... coreaudio" >&6 + ;; + *) + ac_pjmedia_snd=pa_unix + if test "${ac_cv_header_alsa_version_h+set}" = set; then + echo "$as_me:$LINENO: checking for alsa/version.h" >&5 +echo $ECHO_N "checking for alsa/version.h... $ECHO_C" >&6 +if test "${ac_cv_header_alsa_version_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_alsa_version_h" >&5 +echo "${ECHO_T}$ac_cv_header_alsa_version_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking alsa/version.h usability" >&5 +echo $ECHO_N "checking alsa/version.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <alsa/version.h> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking alsa/version.h presence" >&5 +echo $ECHO_N "checking alsa/version.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <alsa/version.h> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: alsa/version.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: alsa/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: alsa/version.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: alsa/version.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: alsa/version.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: alsa/version.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: alsa/version.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: alsa/version.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: alsa/version.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: alsa/version.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: alsa/version.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: alsa/version.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: alsa/version.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: alsa/version.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: alsa/version.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: alsa/version.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to the pjproject lists. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for alsa/version.h" >&5 +echo $ECHO_N "checking for alsa/version.h... $ECHO_C" >&6 +if test "${ac_cv_header_alsa_version_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_alsa_version_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_alsa_version_h" >&5 +echo "${ECHO_T}$ac_cv_header_alsa_version_h" >&6 + +fi +if test $ac_cv_header_alsa_version_h = yes; then + ac_pa_use_alsa=1 + + LIBS="$LIBS -lasound" + +else + ac_pa_use_alsa=0 + +fi + + + echo "$as_me:$LINENO: result: Checking sound device backend... unix" >&5 +echo "${ECHO_T}Checking sound device backend... unix" >&6 + ;; +esac + +# Include resampling small filter + +# Check whether --enable-small-filter or --disable-small-filter was given. +if test "${enable_small_filter+set}" = set; then + enableval="$enable_small_filter" + if test "$enable_small_filter" = "no"; then + ac_no_small_filter='-DPJMEDIA_HAS_SMALL_FILTER=0' + echo "$as_me:$LINENO: result: Checking if small filter is disabled... yes" >&5 +echo "${ECHO_T}Checking if small filter is disabled... yes" >&6 + fi +else + echo "$as_me:$LINENO: result: Checking if small filter is disabled... no" >&5 +echo "${ECHO_T}Checking if small filter is disabled... no" >&6 +fi; + +# Include resampling large filter + +# Check whether --enable-large-filter or --disable-large-filter was given. +if test "${enable_large_filter+set}" = set; then + enableval="$enable_large_filter" + if test "$enable_large_filter" = "no"; then + ac_no_large_filter='-DPJMEDIA_HAS_LARGE_FILTER=0' + echo "$as_me:$LINENO: result: Checking if large filter is disabled... yes" >&5 +echo "${ECHO_T}Checking if large filter is disabled... yes" >&6 + fi +else + echo "$as_me:$LINENO: result: Checking if large filter is disabled... no" >&5 +echo "${ECHO_T}Checking if large filter is disabled... no" >&6 +fi; + +# Include G.711 Annex A PLC + +# Check whether --enable-g711-plc or --disable-g711-plc was given. +if test "${enable_g711_plc+set}" = set; then + enableval="$enable_g711_plc" + if test "$enable_g711_plc" = "no"; then + ac_no_g711_plc='-DPJMEDIA_HAS_G711_PLC=0' + echo "$as_me:$LINENO: result: Checking if G.711 Annex A PLC is disabled...yes" >&5 +echo "${ECHO_T}Checking if G.711 Annex A PLC is disabled...yes" >&6 + fi +else + echo "$as_me:$LINENO: result: Checking if G.711 Annex A PLC is disabled...no" >&5 +echo "${ECHO_T}Checking if G.711 Annex A PLC is disabled...no" >&6 +fi; + +# Include Speex AEC + +# Check whether --enable-speex-aec or --disable-speex-aec was given. +if test "${enable_speex_aec+set}" = set; then + enableval="$enable_speex_aec" + if test "$enable_speex_aec" = "no"; then + ac_no_speex_aec='-DPJMEDIA_HAS_SPEEX_AEC=0' + echo "$as_me:$LINENO: result: Checking if Speex AEC is disabled...yes" >&5 +echo "${ECHO_T}Checking if Speex AEC is disabled...yes" >&6 + fi +else + echo "$as_me:$LINENO: result: Checking if Speex AEC is disabled...no" >&5 +echo "${ECHO_T}Checking if Speex AEC is disabled...no" >&6 +fi; + +# Include G711 codec + +# Check whether --enable-g711-codec or --disable-g711-codec was given. +if test "${enable_g711_codec+set}" = set; then + enableval="$enable_g711_codec" + if test "$enable_g711_codec" = "no"; then + ac_no_g711_codec=1 + echo "$as_me:$LINENO: result: Checking if G.711 codec is disabled...yes" >&5 +echo "${ECHO_T}Checking if G.711 codec is disabled...yes" >&6 + fi +else + echo "$as_me:$LINENO: result: Checking if G.711 codec is disabled...no" >&5 +echo "${ECHO_T}Checking if G.711 codec is disabled...no" >&6 +fi; + + +# Include L16 codec + +# Check whether --enable-l16-codec or --disable-l16-codec was given. +if test "${enable_l16_codec+set}" = set; then + enableval="$enable_l16_codec" + if test "$enable_l16_codec" = "no"; then + ac_no_l16_codec=1 + echo "$as_me:$LINENO: result: Checking if L16 codecs are disabled...yes" >&5 +echo "${ECHO_T}Checking if L16 codecs are disabled...yes" >&6 + fi +else + echo "$as_me:$LINENO: result: Checking if G.711 codec is disabled...no" >&5 +echo "${ECHO_T}Checking if G.711 codec is disabled...no" >&6 +fi; + + +# Include GSM codec + +# Check whether --enable-gsm-codec or --disable-gsm-codec was given. +if test "${enable_gsm_codec+set}" = set; then + enableval="$enable_gsm_codec" + if test "$enable_gsm_codec" = "no"; then + ac_no_gsm_codec=1 + echo "$as_me:$LINENO: result: Checking if GSM codec is disabled...yes" >&5 +echo "${ECHO_T}Checking if GSM codec is disabled...yes" >&6 + fi +else + echo "$as_me:$LINENO: result: Checking if GSM codec is disabled...no" >&5 +echo "${ECHO_T}Checking if GSM codec is disabled...no" >&6 +fi; + +# Include Speex codec + +# Check whether --enable-speex-codec or --disable-speex-codec was given. +if test "${enable_speex_codec+set}" = set; then + enableval="$enable_speex_codec" + if test "$enable_speex_codec" = "no"; then + ac_no_speex_codec=1 + echo "$as_me:$LINENO: result: Checking if Speex codec is disabled...yes" >&5 +echo "${ECHO_T}Checking if Speex codec is disabled...yes" >&6 + fi +else + echo "$as_me:$LINENO: result: Checking if Speex codec is disabled...no" >&5 +echo "${ECHO_T}Checking if Speex codec is disabled...no" >&6 +fi; + +# Include iLBC codec + +# Check whether --enable-ilbc-codec or --disable-ilbc-codec was given. +if test "${enable_ilbc_codec+set}" = set; then + enableval="$enable_ilbc_codec" + if test "$enable_ilbc_codec" = "no"; then + ac_no_ilbc_codec=1 + echo "$as_me:$LINENO: result: Checking if iLBC codec is disabled...yes" >&5 +echo "${ECHO_T}Checking if iLBC codec is disabled...yes" >&6 + fi +else + echo "$as_me:$LINENO: result: Checking if iLBC codec is disabled...no" >&5 +echo "${ECHO_T}Checking if iLBC codec is disabled...no" >&6 +fi; + + + +########################################## +# +# MANUAL CONFIG +# + + # Determine if select() requires nfds to be filled up with # correct value (max_fd+1). If zero, nfds will be filled up with # PJ_FD_SETSIZE +echo "$as_me:$LINENO: checking if select() needs correct nfds" >&5 +echo $ECHO_N "checking if select() needs correct nfds... $ECHO_C" >&6 case $target in *rtems*) cat >>confdefs.h <<\_ACEOF #define PJ_SELECT_NEEDS_NFDS 1 _ACEOF - echo "$as_me:$LINENO: checking if select() needs correct nfds" >&5 -echo $ECHO_N "checking if select() needs correct nfds... $ECHO_C" >&6 echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 ;; @@ -6918,48 +7958,27 @@ echo "${ECHO_T}** Setting non-blocking connect() retval to EINPROGRESS (please c ;; esac -echo "$as_me:$LINENO: result: Setting PJ_OS_NAME to $target" >&5 -echo "${ECHO_T}Setting PJ_OS_NAME to $target" >&6 -cat >>confdefs.h <<_ACEOF -#define PJ_OS_NAME "$target" -_ACEOF - - -echo "$as_me:$LINENO: result: Setting PJ_HAS_ERRNO_VAR to 1" >&5 -echo "${ECHO_T}Setting PJ_HAS_ERRNO_VAR to 1" >&6 -cat >>confdefs.h <<\_ACEOF -#define PJ_HAS_ERRNO_VAR 1 -_ACEOF - - -echo "$as_me:$LINENO: result: Setting PJ_HAS_HIGH_RES_TIMER to 1" >&5 -echo "${ECHO_T}Setting PJ_HAS_HIGH_RES_TIMER to 1" >&6 -cat >>confdefs.h <<\_ACEOF -#define PJ_HAS_HIGH_RES_TIMER 1 -_ACEOF - - -echo "$as_me:$LINENO: result: Setting PJ_HAS_MALLOC to 1" >&5 -echo "${ECHO_T}Setting PJ_HAS_MALLOC to 1" >&6 -cat >>confdefs.h <<\_ACEOF -#define PJ_HAS_MALLOC 1 -_ACEOF -echo "$as_me:$LINENO: result: Setting PJ_NATIVE_STRING_IS_UNICODE to 0" >&5 -echo "${ECHO_T}Setting PJ_NATIVE_STRING_IS_UNICODE to 0" >&6 -cat >>confdefs.h <<\_ACEOF -#define PJ_NATIVE_STRING_IS_UNICODE 0 -_ACEOF +if test "$build" = "$host"; then + ac_cross_compile= +else + ac_cross_compile=${host}- +fi +ac_linux_poll=select -echo "$as_me:$LINENO: result: Setting PJ_ATOMIC_VALUE_TYPE to long" >&5 -echo "${ECHO_T}Setting PJ_ATOMIC_VALUE_TYPE to long" >&6 -cat >>confdefs.h <<\_ACEOF -#define PJ_ATOMIC_VALUE_TYPE long -_ACEOF +ac_host=unix +case $target in + *rtems*) + ac_main_obj=main_rtems.o + ;; + *) + ac_main_obj=main.o + ;; +esac cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -7323,7 +8342,7 @@ _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by pjproject $as_me 0.5.7, which was +This file was extended by pjproject $as_me 0.5.8, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -7367,9 +8386,14 @@ Usage: $0 [OPTIONS] [FILE]... -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE +Configuration files: +$config_files + Configuration headers: $config_headers @@ -7378,7 +8402,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -pjproject config.status 0.5.7 +pjproject config.status 0.5.8 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" @@ -7480,7 +8504,14 @@ for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. + "build.mak" ) CONFIG_FILES="$CONFIG_FILES build.mak" ;; + "build/os-auto.mak" ) CONFIG_FILES="$CONFIG_FILES build/os-auto.mak" ;; + "pjlib/build/os-auto.mak" ) CONFIG_FILES="$CONFIG_FILES pjlib/build/os-auto.mak" ;; + "pjlib-util/build/os-auto.mak" ) CONFIG_FILES="$CONFIG_FILES pjlib-util/build/os-auto.mak" ;; + "pjmedia/build/os-auto.mak" ) CONFIG_FILES="$CONFIG_FILES pjmedia/build/os-auto.mak" ;; + "pjsip/build/os-auto.mak" ) CONFIG_FILES="$CONFIG_FILES pjsip/build/os-auto.mak" ;; "pjlib/include/pj/compat/os_auto.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pjlib/include/pj/compat/os_auto.h" ;; + "pjlib/include/pj/compat/m_auto.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pjlib/include/pj/compat/m_auto.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; @@ -7492,6 +8523,7 @@ done # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi @@ -7522,6 +8554,323 @@ $debug || _ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + +# +# CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@build@,$build,;t t +s,@build_cpu@,$build_cpu,;t t +s,@build_vendor@,$build_vendor,;t t +s,@build_os@,$build_os,;t t +s,@host@,$host,;t t +s,@host_cpu@,$host_cpu,;t t +s,@host_vendor@,$host_vendor,;t t +s,@host_os@,$host_os,;t t +s,@target@,$target,;t t +s,@target_cpu@,$target_cpu,;t t +s,@target_vendor@,$target_vendor,;t t +s,@target_os@,$target_os,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@CXX@,$CXX,;t t +s,@CXXFLAGS@,$CXXFLAGS,;t t +s,@ac_ct_CXX@,$ac_ct_CXX,;t t +s,@ac_bigendian@,$ac_bigendian,;t t +s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t +s,@ac_pjmedia_snd@,$ac_pjmedia_snd,;t t +s,@ac_pa_use_alsa@,$ac_pa_use_alsa,;t t +s,@ac_no_small_filter@,$ac_no_small_filter,;t t +s,@ac_no_large_filter@,$ac_no_large_filter,;t t +s,@ac_no_g711_plc@,$ac_no_g711_plc,;t t +s,@ac_no_speex_aec@,$ac_no_speex_aec,;t t +s,@ac_no_g711_codec@,$ac_no_g711_codec,;t t +s,@ac_no_l16_codec@,$ac_no_l16_codec,;t t +s,@ac_no_gsm_codec@,$ac_no_gsm_codec,;t t +s,@ac_no_speex_codec@,$ac_no_speex_codec,;t t +s,@ac_no_ilbc_codec@,$ac_no_ilbc_codec,;t t +s,@ac_cross_compile@,$ac_cross_compile,;t t +s,@ac_linux_poll@,$ac_linux_poll,;t t +s,@ac_host@,$ac_host,;t t +s,@ac_main_obj@,$ac_main_obj,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + +done +_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # diff --git a/aconfigure.ac b/aconfigure.ac index 903b90cb..a01e4d22 100644 --- a/aconfigure.ac +++ b/aconfigure.ac @@ -1,9 +1,51 @@ -AC_INIT(pjproject,0.5.7) +AC_INIT(pjproject,0.5.8) +AC_CANONICAL_BUILD +AC_CANONICAL_HOST AC_CANONICAL_TARGET -AC_CONFIG_HEADER(pjlib/include/pj/compat/os_auto.h) +AC_CONFIG_HEADER([pjlib/include/pj/compat/os_auto.h + pjlib/include/pj/compat/m_auto.h + ]) +AC_CONFIG_FILES([build.mak + build/os-auto.mak + pjlib/build/os-auto.mak + pjlib-util/build/os-auto.mak + pjmedia/build/os-auto.mak + pjsip/build/os-auto.mak + ]) AC_PROG_CC +AC_PROG_CXX AC_LANG_C +AC_CHECK_LIB(pthread,pthread_create) + +AC_MSG_RESULT([Setting PJ_M_NAME to $target_cpu]) +AC_DEFINE_UNQUOTED(PJ_M_NAME,["$target_cpu"]) + +# Endianness detection +AC_C_BIGENDIAN([AC_SUBST(ac_bigendian,1) + AC_DEFINE(PJ_IS_LITTLE_ENDIAN,0) + AC_DEFINE(PJ_IS_BIG_ENDIAN,1) + ], + [AC_SUBST(ac_bigendian,0) + AC_DEFINE(PJ_IS_LITTLE_ENDIAN,1) + AC_DEFINE(PJ_IS_BIG_ENDIAN,0) + ]) + +# --disable-floating-point option +AC_ARG_ENABLE(floating-point, + AC_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_LIB(m,fmod) + ]) + + AC_CHECK_HEADER(arpa/inet.h,[AC_DEFINE(PJ_HAS_ARPA_INET_H,1)]) AC_CHECK_HEADER(assert.h,[AC_DEFINE(PJ_HAS_ASSERT_H,1)]) AC_CHECK_HEADER(ctype.h,[AC_DEFINE(PJ_HAS_CTYPE_H,1)]) @@ -30,7 +72,23 @@ AC_CHECK_HEADER(mswsock.h,[AC_DEFINE(PJ_HAS_MSWSOCK_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(alsa/version.h) +AC_MSG_RESULT([Setting PJ_OS_NAME to $target]) +AC_DEFINE_UNQUOTED(PJ_OS_NAME,["$target"]) + +AC_MSG_RESULT([Setting PJ_HAS_ERRNO_VAR to 1]) +AC_DEFINE(PJ_HAS_ERRNO_VAR,1) + +AC_MSG_RESULT([Setting PJ_HAS_HIGH_RES_TIMER to 1]) +AC_DEFINE(PJ_HAS_HIGH_RES_TIMER,1) + +AC_MSG_RESULT([Setting PJ_HAS_MALLOC to 1]) +AC_DEFINE(PJ_HAS_MALLOC,1) + +AC_MSG_RESULT([Setting PJ_NATIVE_STRING_IS_UNICODE to 0]) +AC_DEFINE(PJ_NATIVE_STRING_IS_UNICODE,0) + +AC_MSG_RESULT([Setting PJ_ATOMIC_VALUE_TYPE to long]) +AC_DEFINE(PJ_ATOMIC_VALUE_TYPE,long) # Determine if inet_aton() is available AC_MSG_CHECKING([if inet_aton is available]) @@ -68,14 +126,156 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>], [pthread_rwlock_t *x;])], [AC_DEFINE(PJ_EMULATE_RWMUTEX,0) AC_MSG_RESULT(yes)], - AC_MSG_RESULT(no)) + [AC_DEFINE(PJ_EMULATE_RWMUTEX,1) + AC_MSG_RESULT(no)]) + + +########################################## +# +# PJMEDIA +# + +# Sound device backend selection +AC_SUBST(ac_pjmedia_snd) +case $target in + *cygwin* | *win* | *mingw*) + ac_pjmedia_snd=pa_win32 + AC_MSG_RESULT([Checking sound device backend... win32 sound]) + ;; + *rtems*) + ac_pjmedia_snd=null + AC_MSG_RESULT([Checking sound device backend... null sound]) + ;; + *darwin*) + ac_pjmedia_snd=pa_darwin_os + AC_MSG_RESULT([Checking sound device backend... coreaudio]) + ;; + *) + ac_pjmedia_snd=pa_unix + AC_CHECK_HEADER(alsa/version.h, + [AC_SUBST(ac_pa_use_alsa,1) + LIBS="$LIBS -lasound" + ], + [AC_SUBST(ac_pa_use_alsa,0)]) + AC_MSG_RESULT([Checking sound device backend... unix]) + ;; +esac + +# Include resampling small filter +AC_SUBST(ac_no_small_filter) +AC_ARG_ENABLE(small-filter, + AC_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])) + +# Include resampling large filter +AC_SUBST(ac_no_large_filter) +AC_ARG_ENABLE(large-filter, + AC_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])) + +# Include G.711 Annex A PLC +AC_SUBST(ac_no_g711_plc) +AC_ARG_ENABLE(g711-plc, + AC_HELP_STRING([--disable-g711-plc], + [Exclude G.711 Annex A PLC]), + [if test "$enable_g711_plc" = "no"; then + [ac_no_g711_plc='-DPJMEDIA_HAS_G711_PLC=0'] + AC_MSG_RESULT([Checking if G.711 Annex A PLC is disabled...yes]) + fi], + AC_MSG_RESULT([Checking if G.711 Annex A PLC is disabled...no])) + +# Include Speex AEC +AC_SUBST(ac_no_speex_aec) +AC_ARG_ENABLE(speex-aec, + AC_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])) + +# Include G711 codec +AC_SUBST(ac_no_g711_codec) +AC_ARG_ENABLE(g711-codec, + AC_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_MSG_RESULT([Checking if G.711 codec is disabled...yes]) + fi], + AC_MSG_RESULT([Checking if G.711 codec is disabled...no])) + + +# Include L16 codec +AC_SUBST(ac_no_l16_codec) +AC_ARG_ENABLE(l16-codec, + AC_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_MSG_RESULT([Checking if L16 codecs are disabled...yes]) + fi], + AC_MSG_RESULT([Checking if G.711 codec is disabled...no])) + + +# Include GSM codec +AC_SUBST(ac_no_gsm_codec) +AC_ARG_ENABLE(gsm-codec, + AC_HELP_STRING([--disable-gsm-codec], + [Exclude GSM codec in the build]), + [if test "$enable_gsm_codec" = "no"; then + [ac_no_gsm_codec=1] + AC_MSG_RESULT([Checking if GSM codec is disabled...yes]) + fi], + AC_MSG_RESULT([Checking if GSM codec is disabled...no])) + +# Include Speex codec +AC_SUBST(ac_no_speex_codec) +AC_ARG_ENABLE(speex-codec, + AC_HELP_STRING([--disable-speex-codec], + [Exclude Speex codecs in the build]), + [if test "$enable_speex_codec" = "no"; then + [ac_no_speex_codec=1] + AC_MSG_RESULT([Checking if Speex codec is disabled...yes]) + fi], + AC_MSG_RESULT([Checking if Speex codec is disabled...no])) + +# Include iLBC codec +AC_SUBST(ac_no_ilbc_codec) +AC_ARG_ENABLE(ilbc-codec, + AC_HELP_STRING([--disable-ilbc-codec], + [Exclude iLBC codec in the build]), + [if test "$enable_ilbc_codec" = "no"; then + [ac_no_ilbc_codec=1] + AC_MSG_RESULT([Checking if iLBC codec is disabled...yes]) + fi], + AC_MSG_RESULT([Checking if iLBC codec is disabled...no])) + + + +########################################## +# +# MANUAL CONFIG +# + # Determine if select() requires nfds to be filled up with # correct value (max_fd+1). If zero, nfds will be filled up with # PJ_FD_SETSIZE +AC_MSG_CHECKING([if select() needs correct nfds]) case $target in *rtems*) AC_DEFINE(PJ_SELECT_NEEDS_NFDS,1) - AC_MSG_CHECKING([if select() needs correct nfds]) AC_MSG_RESULT(yes) ;; *) AC_DEFINE(PJ_SELECT_NEEDS_NFDS,0) @@ -125,24 +325,25 @@ case $target in ;; esac -AC_MSG_RESULT([Setting PJ_OS_NAME to $target]) -AC_DEFINE_UNQUOTED(PJ_OS_NAME,["$target"]) - -AC_MSG_RESULT([Setting PJ_HAS_ERRNO_VAR to 1]) -AC_DEFINE(PJ_HAS_ERRNO_VAR,1) - -AC_MSG_RESULT([Setting PJ_HAS_HIGH_RES_TIMER to 1]) -AC_DEFINE(PJ_HAS_HIGH_RES_TIMER,1) - -AC_MSG_RESULT([Setting PJ_HAS_MALLOC to 1]) -AC_DEFINE(PJ_HAS_MALLOC,1) - -AC_MSG_RESULT([Setting PJ_NATIVE_STRING_IS_UNICODE to 0]) -AC_DEFINE(PJ_NATIVE_STRING_IS_UNICODE,0) - -AC_MSG_RESULT([Setting PJ_ATOMIC_VALUE_TYPE to long]) -AC_DEFINE(PJ_ATOMIC_VALUE_TYPE,long) - +AC_SUBST(target) +AC_SUBST(ac_cross_compile) +if test "$build" = "$host"; then + ac_cross_compile= +else + ac_cross_compile=${host}- +fi +AC_SUBST(ac_linux_poll,select) +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 + ;; +esac +AC_SUBST(CC) AC_OUTPUT() diff --git a/build.mak.in b/build.mak.in new file mode 100644 index 00000000..36c2746d --- /dev/null +++ b/build.mak.in @@ -0,0 +1,8 @@ +# @configure_input@ +export MACHINE_NAME := auto +export OS_NAME := auto +export HOST_NAME := unix +export CC_NAME := @CC@ +export TARGET_NAME := @target@ +export CROSS_COMPILE := @ac_cross_compile@ +export LINUX_POLL := @ac_linux_poll@ diff --git a/build/m-auto.mak b/build/m-auto.mak new file mode 100644 index 00000000..3bd2ac34 --- /dev/null +++ b/build/m-auto.mak @@ -0,0 +1 @@ +# Nothing needs to be defined here diff --git a/build/os-auto.mak.in b/build/os-auto.mak.in new file mode 100644 index 00000000..3d99927e --- /dev/null +++ b/build/os-auto.mak.in @@ -0,0 +1,11 @@ +# @configure_input@ + +export OS_CFLAGS := $(CC_DEF)PJ_AUTOCONF=1 @CFLAGS@ + +export OS_CXXFLAGS := $(CC_DEF)PJ_AUTOCONF=1 @CXXFLAGS@ + +export OS_LDFLAGS := @LDFLAGS@ @LIBS@ + +export OS_SOURCES := + + diff --git a/build/os-darwinos.mak b/build/os-darwinos.mak index 22e80516..9db31a16 100644 --- a/build/os-darwinos.mak +++ b/build/os-darwinos.mak @@ -2,7 +2,7 @@ export OS_CFLAGS := $(CC_DEF)PJ_DARWINOS=1 export OS_CXXFLAGS := -export OS_LDFLAGS := $(CC_LIB)pthread$(LIBEXT2) -framework CoreAudio +export OS_LDFLAGS := $(CC_LIB)pthread$(LIBEXT2) -framework CoreAudio -lm export OS_SOURCES := diff --git a/build/os-linux.mak b/build/os-linux.mak index c0c4a445..4c9e4ec3 100644 --- a/build/os-linux.mak +++ b/build/os-linux.mak @@ -2,7 +2,7 @@ export OS_CFLAGS := $(CC_DEF)PJ_LINUX=1 export OS_CXXFLAGS := -export OS_LDFLAGS := $(CC_LIB)pthread$(LIBEXT2) +export OS_LDFLAGS := $(CC_LIB)pthread$(LIBEXT2) -lm export OS_SOURCES := diff --git a/build/os-rtems.mak b/build/os-rtems.mak index 78729402..af99dbfc 100644 --- a/build/os-rtems.mak +++ b/build/os-rtems.mak @@ -11,7 +11,7 @@ export OS_CFLAGS := $(CC_DEF)PJ_RTEMS=1 \ export OS_CXXFLAGS := -export OS_LDFLAGS := -B$(RTEMS_LIBRARY_PATH)/lib/ -specs bsp_specs -qrtems +export OS_LDFLAGS := -B$(RTEMS_LIBRARY_PATH)/lib/ -specs bsp_specs -qrtems -lm export OS_SOURCES := diff --git a/build/os-sunos.mak b/build/os-sunos.mak index 4af21040..608f9ebb 100644 --- a/build/os-sunos.mak +++ b/build/os-sunos.mak @@ -5,7 +5,8 @@ export OS_CXXFLAGS := export OS_LDFLAGS := $(CC_LIB)pthread$(LIBEXT2) \ $(CC_LIB)socket$(LIBEXT2) \ $(CC_LIB)rt$(LIBEXT2) \ - $(CC_LIB)nsl$(LIBEXT2) + $(CC_LIB)nsl$(LIBEXT2) \ + $(CC_LIB)m$(LIBEXT2) export OS_SOURCES := diff --git a/build/os-win32.mak b/build/os-win32.mak index 3f29776c..816a97f1 100644 --- a/build/os-win32.mak +++ b/build/os-win32.mak @@ -4,7 +4,8 @@ export OS_CXXFLAGS := export OS_LDFLAGS := $(CC_LIB)wsock32$(LIBEXT2) \ $(CC_LIB)ws2_32$(LIBEXT2)\ - $(CC_LIB)ole32$(LIBEXT2) + $(CC_LIB)ole32$(LIBEXT2)\ + $(CC_LIB)m$(LIBEXT2) export OS_SOURCES := diff --git a/pjlib-util/build/os-auto.mak.in b/pjlib-util/build/os-auto.mak.in new file mode 100644 index 00000000..b416085b --- /dev/null +++ b/pjlib-util/build/os-auto.mak.in @@ -0,0 +1,3 @@ +# @configure_input@ +export UTIL_TEST_OBJS = @ac_main_obj@ + diff --git a/pjlib/build/os-auto.mak.in b/pjlib/build/os-auto.mak.in new file mode 100644 index 00000000..f441104c --- /dev/null +++ b/pjlib/build/os-auto.mak.in @@ -0,0 +1,35 @@ +# @configure_input@ + +# +# PJLIB_OBJS specified here are object files to be included in PJLIB +# (the library) for this specific operating system. Object files common +# to all operating systems should go in Makefile instead. +# +export PJLIB_OBJS += addr_resolv_sock.o guid_simple.o \ + log_writer_stdout.o os_core_unix.o \ + os_error_unix.o os_time_unix.o \ + os_timestamp_common.o os_timestamp_posix.o \ + pool_policy_malloc.o sock_bsd.o sock_select.o + +export PJLIB_OBJS += ioqueue_select.o +export PJLIB_OBJS += file_access_unistd.o file_io_ansi.o + +# +# TEST_OBJS are operating system specific object files to be included in +# the test application. +# +export TEST_OBJS += @ac_main_obj@ + +# +# Additional LDFLAGS for pjlib-test +# +export TEST_LDFLAGS += @LDFLAGS@ @LIBS@ + +# +# TARGETS are make targets in the Makefile, to be executed for this given +# operating system. +# +export TARGETS = pjlib pjlib-test + + + diff --git a/pjlib/include/pj/compat/m_auto.h.in b/pjlib/include/pj/compat/m_auto.h.in new file mode 100644 index 00000000..c429019b --- /dev/null +++ b/pjlib/include/pj/compat/m_auto.h.in @@ -0,0 +1,38 @@ +/* $Id$ */ +/* + * Copyright (C)2003-2006 Benny Prijono <benny@prijono.org> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __PJ_COMPAT_M_AUTO_H__ +#define __PJ_COMPAT_M_AUTO_H__ + +/** + * @file m_auto.h + * @brief Automatically generated process definition file. + */ + +#undef PJ_M_NAME + +#undef PJ_IS_LITTLE_ENDIAN +#undef PJ_IS_BIG_ENDIAN + +/* Specify if floating point is present/desired */ +#undef PJ_HAS_FLOATING_POINT + +/* Deprecated */ +#define PJ_HAS_PENTIUM 0 + +#endif /* __PJ_COMPAT_M_AUTO_H__ */ diff --git a/pjlib/include/pj/config.h b/pjlib/include/pj/config.h index 0ceb863e..71bf37c3 100644 --- a/pjlib/include/pj/config.h +++ b/pjlib/include/pj/config.h @@ -39,7 +39,13 @@ /******************************************************************** * Include target OS specific configuration. */ -#if defined(PJ_WIN32_WINCE) || defined(_WIN32_WCE) || defined(UNDER_CE) +#if defined(PJ_AUTOCONF) + /* + * Autoconf + */ +# include <pj/compat/os_auto.h> + +#elif defined(PJ_WIN32_WINCE) || defined(_WIN32_WCE) || defined(UNDER_CE) /* * Windows CE */ @@ -108,7 +114,13 @@ /******************************************************************** * Target machine specific configuration. */ -#if defined (PJ_M_I386) || defined(_i386_) || defined(i_386_) || \ +#if defined(PJ_AUTOCONF) + /* + * Autoconf configured + */ +#include <pj/compat/m_auto.h> + +#elif defined (PJ_M_I386) || defined(_i386_) || defined(i_386_) || \ defined(_X86_) || defined(x86) || defined(__i386__) || \ defined(__i386) || defined(_M_IX86) || defined(__I86__) /* diff --git a/pjmedia/build/Makefile b/pjmedia/build/Makefile index 2c8a3b54..14dfc5a2 100644 --- a/pjmedia/build/Makefile +++ b/pjmedia/build/Makefile @@ -11,7 +11,7 @@ export SOUND_OBJS = $(PORTAUDIO_OBJS) # E.g., to exclude Speex, we need to exclude SPEEX_OBJS from CODEC_OBJS, AND specify # "#define PJMEDIA_HAS_SPEEX_CODEC 0" in pj/config_site.h. # -export CODEC_OBJS = $(GSM_OBJS) $(SPEEX_OBJS) $(ILBC_OBJS) +export CODEC_OBJS = l16.o $(GSM_OBJS) $(SPEEX_OBJS) $(ILBC_OBJS) include ../../build/common.mak @@ -133,7 +133,7 @@ ILBC_OBJS := ilbc.o \ ILBC_CFLAGS := export PJMEDIA_CODEC_SRCDIR = ../src/pjmedia-codec -export PJMEDIA_CODEC_OBJS += l16.o \ +export PJMEDIA_CODEC_OBJS += \ $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \ $(CODEC_OBJS) export PJMEDIA_CODEC_CFLAGS += $(_CFLAGS) $(GSM_CFLAGS) $(SPEEX_CFLAGS) \ diff --git a/pjmedia/build/os-auto.mak.in b/pjmedia/build/os-auto.mak.in new file mode 100644 index 00000000..8ef29227 --- /dev/null +++ b/pjmedia/build/os-auto.mak.in @@ -0,0 +1,123 @@ +# @configure_input@ + +# PJMEDIA features exclusion +export CFLAGS += @ac_no_small_filter@ @ac_no_large_filter@ @ac_no_g711_plc@ @ac_no_speex_aec@ + +# Define the desired sound device backend +# Valid values are: +# - pa_unix: PortAudio on Unix (OSS or ALSA) +# - pa_darwinos: PortAudio on MacOSX (CoreAudio) +# - pa_win32: PortAudio on Win32 (WMME) +# - ds: Win32 DirectSound (dsound.c) +# - null: Null sound device (nullsound.c) +AC_PJMEDIA_SND=@ac_pjmedia_snd@ + +# For Unix, specify if ALSA should be supported +AC_PA_USE_ALSA=@ac_pa_use_alsa@ + +# PortAudio endianness +AC_PA_BIGENDIAN=@ac_bigendian@ +ifeq ($(AC_PA_BIGENDIAN),1) +export CFLAGS += -DPA_BIG_ENDIAN=1 +else +export CFLAGS += -DPA_LITTLE_ENDIAN=1 +endif + +# +# Codecs +# +AC_NO_G711_CODEC=@ac_no_g711_codec@ +AC_NO_L16_CODEC=@ac_no_l16_codec@ +AC_NO_GSM_CODEC=@ac_no_gsm_codec@ +AC_NO_SPEEX_CODEC=@ac_no_speex_codec@ +AC_NO_ILBC_CODEC=@ac_no_ilbc_codec@ + +export CODEC_OBJS= + +ifeq ($(AC_NO_G711_CODEC),1) +export CFLAGS += -DPJMEDIA_HAS_G711_CODEC=0 +else +export CODEC_OBJS += +endif + +ifeq ($(AC_NO_L16_CODEC),1) +export CFLAGS += -DPJMEDIA_HAS_L16_CODEC=0 +else +export CODEC_OBJS += l16.o +endif + +ifeq ($(AC_NO_GSM_CODEC),1) +export CFLAGS += -DPJMEDIA_HAS_GSM_CODEC=0 +else +export CODEC_OBJS += $(GSM_OBJS) +endif + +ifeq ($(AC_NO_SPEEX_CODEC),1) +export CFLAGS += -DPJMEDIA_HAS_SPEEX_CODEC=0 +else +export CODEC_OBJS += $(SPEEX_OBJS) +endif + +ifeq ($(AC_NO_ILBC_CODEC),1) +export CFLAGS += -DPJMEDIA_HAS_ILBC_CODEC=0 +else +export CODEC_OBJS += $(ILBC_OBJS) +endif + + +# +# PortAudio on Unix +# +ifeq ($(AC_PJMEDIA_SND),pa_unix) +# Host APIs and utils +export PJMEDIA_OBJS += $(PA_DIR)/pa_unix_hostapis.o $(PA_DIR)/pa_unix_util.o + +# Include ALSA? +ifeq ($(AC_PA_USE_ALSA),1) +export CFLAGS += -DPA_USE_ALSA=1 +export PJMEDIA_OBJS += $(PA_DIR)/pa_linux_alsa.o +endif + +export CFLAGS += -DPA_USE_OSS=1 \ + -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND +export PJMEDIA_OBJS += $(PA_DIR)/pa_unix_oss.o +endif + + +# +# PortAudio on MacOS X +# +ifeq ($(AC_PJMEDIA_SND),pa_darwinos) +export PJMEDIA_OBJS += $(PA_DIR)/pa_mac_hostapis.o $(PA_DIR)/pa_unix_util.o \ + $(PA_DIR)/pa_mac_core.o +export CFLAGS += -DPA_USE_COREAUDIO=1 \ + -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND +endif + +# +# PortAudio on Win32 (WMME) +# +ifeq ($(AC_PJMEDIA_SND),pa_win32) +export PJMEDIA_OBJS += $(PA_DIR)/pa_win_hostapis.o $(PA_DIR)/pa_win_util.o \ + $(PA_DIR)/pa_win_wmme.o +export CFLAGS += -DDPA_NO_ASIO -DPA_NO_DS \ + -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND +endif + +# +# Win32 DirectSound +# +ifeq ($(AC_PJMEDIA_SND),ds) +export SOUND_OBJS = dsound.o +export CFLAGS += -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_WIN32_DIRECT_SOUND +endif + +# +# Last resort, null sound device +# +ifeq ($(AC_PJMEDIA_SND),null) +export SOUND_OBJS = nullsound.o +export CFLAGS += -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_NULL_SOUND +endif + + diff --git a/pjmedia/src/pjmedia/portaudio/pa_unix_hostapis.c b/pjmedia/src/pjmedia/portaudio/pa_unix_hostapis.c index 9bddc2e0..d01e916e 100644 --- a/pjmedia/src/pjmedia/portaudio/pa_unix_hostapis.c +++ b/pjmedia/src/pjmedia/portaudio/pa_unix_hostapis.c @@ -41,14 +41,14 @@ PaError PaSGI_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex PaUtilHostApiInitializer *paHostApiInitializers[] = { -#ifdef PA_USE_OSS - PaOSS_Initialize, -#endif - #ifdef PA_USE_ALSA PaAlsa_Initialize, #endif +#ifdef PA_USE_OSS + PaOSS_Initialize, +#endif + #ifdef PA_USE_JACK PaJack_Initialize, #endif diff --git a/pjsip/build/Makefile b/pjsip/build/Makefile index 6bdec74d..81c2cb2e 100644 --- a/pjsip/build/Makefile +++ b/pjsip/build/Makefile @@ -34,7 +34,7 @@ export _LDFLAGS := $(subst /,$(HOST_PSEP),$(PJSUA_LIB_LIB)) \ $(subst /,$(HOST_PSEP),$(PJLIB_UTIL_LIB)) \ $(subst /,$(HOST_PSEP),$(PJLIB_LIB)) \ $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \ - $(LDFLAGS) -lm + $(LDFLAGS) ############################################################################### diff --git a/pjsip/build/os-auto.mak.in b/pjsip/build/os-auto.mak.in new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/pjsip/build/os-auto.mak.in diff --git a/pjsip/include/pjsip-simple/publish.h b/pjsip/include/pjsip-simple/publish.h index bebc4d97..b06589d2 100644 --- a/pjsip/include/pjsip-simple/publish.h +++ b/pjsip/include/pjsip-simple/publish.h @@ -25,6 +25,7 @@ */ #include <pjsip/sip_util.h> +#include <pjsip/sip_auth.h> PJ_BEGIN_DECL |