Index: configure =================================================================== --- configure (revision 83380) +++ configure (working copy) @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Revision: 81873 . +# From configure.ac Revision: 82386 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61. # @@ -12160,13 +12160,11 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include /* for off_t */ - #include +#include int main () { -int (*fp) (FILE *, off_t, int) = fseeko; - return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); +return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0); ; return 0; } @@ -12206,13 +12204,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _LARGEFILE_SOURCE 1 -#include /* for off_t */ - #include +#include int main () { -int (*fp) (FILE *, off_t, int) = fseeko; - return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); +return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0); ; return 0; } @@ -19785,6 +19781,786 @@ fi +if test "x${PBX_ROUNDL}" != "x1" -a "${USE_ROUNDL}" != "no"; then + pbxlibdir="" + if test "x${ROUNDL_DIR}" != "x"; then + if test -d ${ROUNDL_DIR}/lib; then + pbxlibdir="-L${ROUNDL_DIR}/lib" + else + pbxlibdir="-L${ROUNDL_DIR}" + fi + fi + pbxfuncname="roundl" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_ROUNDL_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_m_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lm" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -lm... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm ${pbxlibdir} $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 GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ${pbxfuncname} (); +int +main () +{ +return ${pbxfuncname} (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_Lib=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Lib=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then + AST_ROUNDL_FOUND=yes +else + AST_ROUNDL_FOUND=no +fi + + fi + + if test "${AST_ROUNDL_FOUND}" = "yes"; then + ROUNDL_LIB="-lm " + ROUNDL_HEADER_FOUND="1" + if test "x${ROUNDL_DIR}" != "x"; then + ROUNDL_LIB="${pbxlibdir} ${ROUNDL_LIB}" + ROUNDL_INCLUDE="-I${ROUNDL_DIR}/include" + saved_cppflags="${CPPFLAGS}" + CPPFLAGS="${CPPFLAGS} -I${ROUNDL_DIR}/include" + if test "x" != "x" ; then + as_ac_Header=`echo "ac_cv_header_${ROUNDL_DIR}/include/" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for ${ROUNDL_DIR}/include/" >&5 +echo $ECHO_N "checking for ${ROUNDL_DIR}/include/... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking ${ROUNDL_DIR}/include/ usability" >&5 +echo $ECHO_N "checking ${ROUNDL_DIR}/include/ 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 <${ROUNDL_DIR}/include/> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; 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 core 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 ${ROUNDL_DIR}/include/ presence" >&5 +echo $ECHO_N "checking ${ROUNDL_DIR}/include/ 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 <${ROUNDL_DIR}/include/> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.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: ${ROUNDL_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ${ROUNDL_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ROUNDL_DIR}/include/: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ${ROUNDL_DIR}/include/: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: ${ROUNDL_DIR}/include/: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ${ROUNDL_DIR}/include/: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ROUNDL_DIR}/include/: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ${ROUNDL_DIR}/include/: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ROUNDL_DIR}/include/: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ${ROUNDL_DIR}/include/: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ROUNDL_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ${ROUNDL_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ROUNDL_DIR}/include/: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ${ROUNDL_DIR}/include/: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ROUNDL_DIR}/include/: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ${ROUNDL_DIR}/include/: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for ${ROUNDL_DIR}/include/" >&5 +echo $ECHO_N "checking for ${ROUNDL_DIR}/include/... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + ROUNDL_HEADER_FOUND=1 +else + ROUNDL_HEADER_FOUND=0 +fi + + + fi + CPPFLAGS="${saved_cppflags}" + else + if test "x" != "x" ; then + if test "${ac_cv_header_+set}" = set; then + { echo "$as_me:$LINENO: checking for " >&5 +echo $ECHO_N "checking for ... $ECHO_C" >&6; } +if test "${ac_cv_header_+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 +echo "${ECHO_T}$ac_cv_header_" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking usability" >&5 +echo $ECHO_N "checking 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 <> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; 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 core 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 presence" >&5 +echo $ECHO_N "checking 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 <> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.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: : accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: : proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: : proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: : present but cannot be compiled" >&5 +echo "$as_me: WARNING: : present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: : check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: : check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: : see the Autoconf documentation" >&5 +echo "$as_me: WARNING: : see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: : section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: : section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: : proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: : proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: : in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: : in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for " >&5 +echo $ECHO_N "checking for ... $ECHO_C" >&6; } +if test "${ac_cv_header_+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 +echo "${ECHO_T}$ac_cv_header_" >&6; } + +fi +if test $ac_cv_header_ = yes; then + ROUNDL_HEADER_FOUND=1 +else + ROUNDL_HEADER_FOUND=0 +fi + + + fi + fi + if test "x${ROUNDL_HEADER_FOUND}" = "x0" ; then + ROUNDL_LIB="" + ROUNDL_INCLUDE="" + else + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + ROUNDL_LIB="" + fi + PBX_ROUNDL=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED + +cat >>confdefs.h <<_ACEOF +#define HAVE_ROUNDL 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define HAVE_ROUNDL_VERSION +_ACEOF + + fi + fi +fi + + +if test "x${PBX_TRUNCL}" != "x1" -a "${USE_TRUNCL}" != "no"; then + pbxlibdir="" + if test "x${TRUNCL_DIR}" != "x"; then + if test -d ${TRUNCL_DIR}/lib; then + pbxlibdir="-L${TRUNCL_DIR}/lib" + else + pbxlibdir="-L${TRUNCL_DIR}" + fi + fi + pbxfuncname="truncl" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_TRUNCL_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_m_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lm" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -lm... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm ${pbxlibdir} $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 GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ${pbxfuncname} (); +int +main () +{ +return ${pbxfuncname} (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_Lib=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Lib=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then + AST_TRUNCL_FOUND=yes +else + AST_TRUNCL_FOUND=no +fi + + fi + + if test "${AST_TRUNCL_FOUND}" = "yes"; then + TRUNCL_LIB="-lm " + TRUNCL_HEADER_FOUND="1" + if test "x${TRUNCL_DIR}" != "x"; then + TRUNCL_LIB="${pbxlibdir} ${TRUNCL_LIB}" + TRUNCL_INCLUDE="-I${TRUNCL_DIR}/include" + saved_cppflags="${CPPFLAGS}" + CPPFLAGS="${CPPFLAGS} -I${TRUNCL_DIR}/include" + if test "x" != "x" ; then + as_ac_Header=`echo "ac_cv_header_${TRUNCL_DIR}/include/" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for ${TRUNCL_DIR}/include/" >&5 +echo $ECHO_N "checking for ${TRUNCL_DIR}/include/... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking ${TRUNCL_DIR}/include/ usability" >&5 +echo $ECHO_N "checking ${TRUNCL_DIR}/include/ 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 <${TRUNCL_DIR}/include/> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; 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 core 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 ${TRUNCL_DIR}/include/ presence" >&5 +echo $ECHO_N "checking ${TRUNCL_DIR}/include/ 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 <${TRUNCL_DIR}/include/> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.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: ${TRUNCL_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ${TRUNCL_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TRUNCL_DIR}/include/: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ${TRUNCL_DIR}/include/: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: ${TRUNCL_DIR}/include/: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ${TRUNCL_DIR}/include/: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TRUNCL_DIR}/include/: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ${TRUNCL_DIR}/include/: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TRUNCL_DIR}/include/: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ${TRUNCL_DIR}/include/: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TRUNCL_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ${TRUNCL_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TRUNCL_DIR}/include/: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ${TRUNCL_DIR}/include/: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TRUNCL_DIR}/include/: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ${TRUNCL_DIR}/include/: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for ${TRUNCL_DIR}/include/" >&5 +echo $ECHO_N "checking for ${TRUNCL_DIR}/include/... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + TRUNCL_HEADER_FOUND=1 +else + TRUNCL_HEADER_FOUND=0 +fi + + + fi + CPPFLAGS="${saved_cppflags}" + else + if test "x" != "x" ; then + if test "${ac_cv_header_+set}" = set; then + { echo "$as_me:$LINENO: checking for " >&5 +echo $ECHO_N "checking for ... $ECHO_C" >&6; } +if test "${ac_cv_header_+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 +echo "${ECHO_T}$ac_cv_header_" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking usability" >&5 +echo $ECHO_N "checking 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 <> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; 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 core 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 presence" >&5 +echo $ECHO_N "checking 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 <> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.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: : accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: : proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: : proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: : present but cannot be compiled" >&5 +echo "$as_me: WARNING: : present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: : check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: : check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: : see the Autoconf documentation" >&5 +echo "$as_me: WARNING: : see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: : section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: : section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: : proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: : proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: : in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: : in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for " >&5 +echo $ECHO_N "checking for ... $ECHO_C" >&6; } +if test "${ac_cv_header_+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 +echo "${ECHO_T}$ac_cv_header_" >&6; } + +fi +if test $ac_cv_header_ = yes; then + TRUNCL_HEADER_FOUND=1 +else + TRUNCL_HEADER_FOUND=0 +fi + + + fi + fi + if test "x${TRUNCL_HEADER_FOUND}" = "x0" ; then + TRUNCL_LIB="" + TRUNCL_INCLUDE="" + else + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + TRUNCL_LIB="" + fi + PBX_TRUNCL=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED + +cat >>confdefs.h <<_ACEOF +#define HAVE_TRUNCL 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define HAVE_TRUNCL_VERSION +_ACEOF + + fi + fi +fi + + if test "x${PBX_EXP2}" != "x1" -a "${USE_EXP2}" != "no"; then pbxlibdir="" if test "x${EXP2_DIR}" != "x"; then @@ -21345,6 +22121,786 @@ fi +if test "x${PBX_ROUND}" != "x1" -a "${USE_ROUND}" != "no"; then + pbxlibdir="" + if test "x${ROUND_DIR}" != "x"; then + if test -d ${ROUND_DIR}/lib; then + pbxlibdir="-L${ROUND_DIR}/lib" + else + pbxlibdir="-L${ROUND_DIR}" + fi + fi + pbxfuncname="round" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_ROUND_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_m_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lm" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -lm... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm ${pbxlibdir} $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 GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ${pbxfuncname} (); +int +main () +{ +return ${pbxfuncname} (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_Lib=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Lib=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then + AST_ROUND_FOUND=yes +else + AST_ROUND_FOUND=no +fi + + fi + + if test "${AST_ROUND_FOUND}" = "yes"; then + ROUND_LIB="-lm " + ROUND_HEADER_FOUND="1" + if test "x${ROUND_DIR}" != "x"; then + ROUND_LIB="${pbxlibdir} ${ROUND_LIB}" + ROUND_INCLUDE="-I${ROUND_DIR}/include" + saved_cppflags="${CPPFLAGS}" + CPPFLAGS="${CPPFLAGS} -I${ROUND_DIR}/include" + if test "x" != "x" ; then + as_ac_Header=`echo "ac_cv_header_${ROUND_DIR}/include/" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for ${ROUND_DIR}/include/" >&5 +echo $ECHO_N "checking for ${ROUND_DIR}/include/... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking ${ROUND_DIR}/include/ usability" >&5 +echo $ECHO_N "checking ${ROUND_DIR}/include/ 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 <${ROUND_DIR}/include/> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; 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 core 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 ${ROUND_DIR}/include/ presence" >&5 +echo $ECHO_N "checking ${ROUND_DIR}/include/ 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 <${ROUND_DIR}/include/> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.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: ${ROUND_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ${ROUND_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ROUND_DIR}/include/: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ${ROUND_DIR}/include/: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: ${ROUND_DIR}/include/: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ${ROUND_DIR}/include/: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ROUND_DIR}/include/: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ${ROUND_DIR}/include/: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ROUND_DIR}/include/: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ${ROUND_DIR}/include/: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ROUND_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ${ROUND_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ROUND_DIR}/include/: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ${ROUND_DIR}/include/: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ROUND_DIR}/include/: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ${ROUND_DIR}/include/: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for ${ROUND_DIR}/include/" >&5 +echo $ECHO_N "checking for ${ROUND_DIR}/include/... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + ROUND_HEADER_FOUND=1 +else + ROUND_HEADER_FOUND=0 +fi + + + fi + CPPFLAGS="${saved_cppflags}" + else + if test "x" != "x" ; then + if test "${ac_cv_header_+set}" = set; then + { echo "$as_me:$LINENO: checking for " >&5 +echo $ECHO_N "checking for ... $ECHO_C" >&6; } +if test "${ac_cv_header_+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 +echo "${ECHO_T}$ac_cv_header_" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking usability" >&5 +echo $ECHO_N "checking 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 <> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; 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 core 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 presence" >&5 +echo $ECHO_N "checking 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 <> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.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: : accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: : proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: : proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: : present but cannot be compiled" >&5 +echo "$as_me: WARNING: : present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: : check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: : check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: : see the Autoconf documentation" >&5 +echo "$as_me: WARNING: : see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: : section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: : section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: : proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: : proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: : in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: : in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for " >&5 +echo $ECHO_N "checking for ... $ECHO_C" >&6; } +if test "${ac_cv_header_+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 +echo "${ECHO_T}$ac_cv_header_" >&6; } + +fi +if test $ac_cv_header_ = yes; then + ROUND_HEADER_FOUND=1 +else + ROUND_HEADER_FOUND=0 +fi + + + fi + fi + if test "x${ROUND_HEADER_FOUND}" = "x0" ; then + ROUND_LIB="" + ROUND_INCLUDE="" + else + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + ROUND_LIB="" + fi + PBX_ROUND=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED + +cat >>confdefs.h <<_ACEOF +#define HAVE_ROUND 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define HAVE_ROUND_VERSION +_ACEOF + + fi + fi +fi + + +if test "x${PBX_TRUNC}" != "x1" -a "${USE_TRUNC}" != "no"; then + pbxlibdir="" + if test "x${TRUNC_DIR}" != "x"; then + if test -d ${TRUNC_DIR}/lib; then + pbxlibdir="-L${TRUNC_DIR}/lib" + else + pbxlibdir="-L${TRUNC_DIR}" + fi + fi + pbxfuncname="trunc" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_TRUNC_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_m_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lm" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -lm... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm ${pbxlibdir} $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 GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ${pbxfuncname} (); +int +main () +{ +return ${pbxfuncname} (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_Lib=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Lib=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then + AST_TRUNC_FOUND=yes +else + AST_TRUNC_FOUND=no +fi + + fi + + if test "${AST_TRUNC_FOUND}" = "yes"; then + TRUNC_LIB="-lm " + TRUNC_HEADER_FOUND="1" + if test "x${TRUNC_DIR}" != "x"; then + TRUNC_LIB="${pbxlibdir} ${TRUNC_LIB}" + TRUNC_INCLUDE="-I${TRUNC_DIR}/include" + saved_cppflags="${CPPFLAGS}" + CPPFLAGS="${CPPFLAGS} -I${TRUNC_DIR}/include" + if test "x" != "x" ; then + as_ac_Header=`echo "ac_cv_header_${TRUNC_DIR}/include/" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for ${TRUNC_DIR}/include/" >&5 +echo $ECHO_N "checking for ${TRUNC_DIR}/include/... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking ${TRUNC_DIR}/include/ usability" >&5 +echo $ECHO_N "checking ${TRUNC_DIR}/include/ 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 <${TRUNC_DIR}/include/> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; 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 core 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 ${TRUNC_DIR}/include/ presence" >&5 +echo $ECHO_N "checking ${TRUNC_DIR}/include/ 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 <${TRUNC_DIR}/include/> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.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: ${TRUNC_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ${TRUNC_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TRUNC_DIR}/include/: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ${TRUNC_DIR}/include/: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: ${TRUNC_DIR}/include/: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ${TRUNC_DIR}/include/: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TRUNC_DIR}/include/: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ${TRUNC_DIR}/include/: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TRUNC_DIR}/include/: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ${TRUNC_DIR}/include/: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TRUNC_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ${TRUNC_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TRUNC_DIR}/include/: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ${TRUNC_DIR}/include/: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TRUNC_DIR}/include/: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ${TRUNC_DIR}/include/: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for ${TRUNC_DIR}/include/" >&5 +echo $ECHO_N "checking for ${TRUNC_DIR}/include/... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + TRUNC_HEADER_FOUND=1 +else + TRUNC_HEADER_FOUND=0 +fi + + + fi + CPPFLAGS="${saved_cppflags}" + else + if test "x" != "x" ; then + if test "${ac_cv_header_+set}" = set; then + { echo "$as_me:$LINENO: checking for " >&5 +echo $ECHO_N "checking for ... $ECHO_C" >&6; } +if test "${ac_cv_header_+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 +echo "${ECHO_T}$ac_cv_header_" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking usability" >&5 +echo $ECHO_N "checking 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 <> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; 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 core 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 presence" >&5 +echo $ECHO_N "checking 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 <> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.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: : accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: : proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: : proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: : present but cannot be compiled" >&5 +echo "$as_me: WARNING: : present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: : check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: : check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: : see the Autoconf documentation" >&5 +echo "$as_me: WARNING: : see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: : section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: : section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: : proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: : proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: : in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: : in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for " >&5 +echo $ECHO_N "checking for ... $ECHO_C" >&6; } +if test "${ac_cv_header_+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 +echo "${ECHO_T}$ac_cv_header_" >&6; } + +fi +if test $ac_cv_header_ = yes; then + TRUNC_HEADER_FOUND=1 +else + TRUNC_HEADER_FOUND=0 +fi + + + fi + fi + if test "x${TRUNC_HEADER_FOUND}" = "x0" ; then + TRUNC_LIB="" + TRUNC_INCLUDE="" + else + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + TRUNC_LIB="" + fi + PBX_TRUNC=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED + +cat >>confdefs.h <<_ACEOF +#define HAVE_TRUNC 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define HAVE_TRUNC_VERSION +_ACEOF + + fi + fi +fi + + GSM_INTERNAL="yes" GSM_SYSTEM="yes" Index: configure.ac =================================================================== --- configure.ac (revision 83380) +++ configure.ac (working copy) @@ -447,10 +447,14 @@ AST_EXT_LIB_CHECK([LOG2L], [m], [log2l]) AST_EXT_LIB_CHECK([EXP10L], [m], [exp10l]) AST_EXT_LIB_CHECK([LOG10L], [m], [log10l]) +AST_EXT_LIB_CHECK([ROUNDL], [m], [roundl]) +AST_EXT_LIB_CHECK([TRUNCL], [m], [truncl]) AST_EXT_LIB_CHECK([EXP2], [m], [exp2]) AST_EXT_LIB_CHECK([LOG2], [m], [log2]) AST_EXT_LIB_CHECK([EXP10], [m], [exp10]) AST_EXT_LIB_CHECK([LOG10], [m], [log10]) +AST_EXT_LIB_CHECK([ROUND], [m], [round]) +AST_EXT_LIB_CHECK([TRUNC], [m], [trunc]) GSM_INTERNAL="yes" AC_SUBST(GSM_INTERNAL) Index: include/asterisk/autoconfig.h.in =================================================================== --- include/asterisk/autoconfig.h.in (revision 83380) +++ include/asterisk/autoconfig.h.in (working copy) @@ -454,6 +454,18 @@ /* Define to 1 if you have the `rint' function. */ #undef HAVE_RINT +/* Define this to indicate the ${ROUND_DESCRIP} library */ +#undef HAVE_ROUND + +/* Define this to indicate the ${ROUNDL_DESCRIP} library */ +#undef HAVE_ROUNDL + +/* Define to indicate the ${ROUNDL_DESCRIP} library version */ +#undef HAVE_ROUNDL_VERSION + +/* Define to indicate the ${ROUND_DESCRIP} library version */ +#undef HAVE_ROUND_VERSION + /* Define if your system has the RTLD_NOLOAD headers. */ #undef HAVE_RTLD_NOLOAD @@ -654,6 +666,18 @@ /* Define to indicate the ${TONEZONE_DESCRIP} library version */ #undef HAVE_TONEZONE_VERSION +/* Define this to indicate the ${TRUNC_DESCRIP} library */ +#undef HAVE_TRUNC + +/* Define this to indicate the ${TRUNCL_DESCRIP} library */ +#undef HAVE_TRUNCL + +/* Define to indicate the ${TRUNCL_DESCRIP} library version */ +#undef HAVE_TRUNCL_VERSION + +/* Define to indicate the ${TRUNC_DESCRIP} library version */ +#undef HAVE_TRUNC_VERSION + /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H Index: main/ast_expr2.c =================================================================== --- main/ast_expr2.c (revision 83380) +++ main/ast_expr2.c (working copy) @@ -166,9 +166,25 @@ #define FUNC_SQRT sqrtl #define FUNC_FLOOR floorl #define FUNC_CEIL ceill +#ifdef HAVE_ROUNDL #define FUNC_ROUND roundl +#else /* HAVE_ROUNDL */ +#ifdef HAVE_ROUND +#define FUNC_ROUND round +#else /* HAVE_ROUND */ +#undef FUNC_ROUND +#endif /* HAVE_ROUND */ +#endif /* HAVE_ROUNDL */ +#ifdef HAVE_TRUNCL +#define FUNC_TRUNC truncl +#else /* HAVE_TRUNCL */ +#ifdef HAVE_TRUNC +#define FUNC_TRUNC trunc +#else /* HAVE_TRUNC */ +#undef FUNC_TRUNC +#endif /* HAVE_TRUNC */ +#endif /* HAVE_TRUNCL */ #define FUNC_RINT rintl -#define FUNC_TRUNC truncl #define FUNC_EXP expl #ifdef HAVE_EXP2L #define FUNC_EXP2 exp2l @@ -208,9 +224,17 @@ #define FUNC_SQRT sqrt #define FUNC_FLOOR floor #define FUNC_CEIL ceil +#ifdef HAVE_ROUND #define FUNC_ROUND round +#else /* HAVE_ROUND */ +#undef FUNC_ROUND +#endif /* HAVE_ROUND */ +#ifdef HAVE_TRUNC +#define FUNC_TRUNC round +#else /* HAVE_TRUNC */ +#undef FUNC_TRUNC +#endif /* HAVE_TRUNC */ #define FUNC_RINT rint -#define FUNC_TRUNC trunc #define FUNC_EXP exp #ifdef HAVE_EXP2 #define FUNC_EXP2 exp2 @@ -399,13 +423,13 @@ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 260 "../main/ast_expr2.y" +#line 284 "../main/ast_expr2.y" { struct val *val; struct expr_node *arglist; } /* Line 187 of yacc.c. */ -#line 409 "../main/ast_expr2.c" +#line 433 "../main/ast_expr2.c" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -427,13 +451,13 @@ /* Copy the second part of user declarations. */ -#line 265 "../main/ast_expr2.y" +#line 289 "../main/ast_expr2.y" extern int ast_yylex __P((YYSTYPE *, YYLTYPE *, yyscan_t)); /* Line 216 of yacc.c. */ -#line 437 "../main/ast_expr2.c" +#line 461 "../main/ast_expr2.c" #ifdef short # undef short @@ -729,9 +753,9 @@ /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 291, 291, 299, 306, 307, 316, 322, 323, 327, - 331, 335, 339, 343, 347, 351, 355, 359, 363, 367, - 371, 375, 379, 383, 387, 391, 395 + 0, 315, 315, 323, 330, 331, 340, 346, 347, 351, + 355, 359, 363, 367, 371, 375, 379, 383, 387, 391, + 395, 399, 403, 407, 411, 415, 419 }; #endif @@ -1384,114 +1408,114 @@ switch (yytype) { case 4: /* "TOK_COLONCOLON" */ -#line 285 "../main/ast_expr2.y" +#line 309 "../main/ast_expr2.y" { free_value((yyvaluep->val)); }; -#line 1390 "../main/ast_expr2.c" +#line 1414 "../main/ast_expr2.c" break; case 5: /* "TOK_COND" */ -#line 285 "../main/ast_expr2.y" +#line 309 "../main/ast_expr2.y" { free_value((yyvaluep->val)); }; -#line 1395 "../main/ast_expr2.c" +#line 1419 "../main/ast_expr2.c" break; case 6: /* "TOK_OR" */ -#line 285 "../main/ast_expr2.y" +#line 309 "../main/ast_expr2.y" { free_value((yyvaluep->val)); }; -#line 1400 "../main/ast_expr2.c" +#line 1424 "../main/ast_expr2.c" break; case 7: /* "TOK_AND" */ -#line 285 "../main/ast_expr2.y" +#line 309 "../main/ast_expr2.y" { free_value((yyvaluep->val)); }; -#line 1405 "../main/ast_expr2.c" +#line 1429 "../main/ast_expr2.c" break; case 8: /* "TOK_NE" */ -#line 285 "../main/ast_expr2.y" +#line 309 "../main/ast_expr2.y" { free_value((yyvaluep->val)); }; -#line 1410 "../main/ast_expr2.c" +#line 1434 "../main/ast_expr2.c" break; case 9: /* "TOK_LE" */ -#line 285 "../main/ast_expr2.y" +#line 309 "../main/ast_expr2.y" { free_value((yyvaluep->val)); }; -#line 1415 "../main/ast_expr2.c" +#line 1439 "../main/ast_expr2.c" break; case 10: /* "TOK_GE" */ -#line 285 "../main/ast_expr2.y" +#line 309 "../main/ast_expr2.y" { free_value((yyvaluep->val)); }; -#line 1420 "../main/ast_expr2.c" +#line 1444 "../main/ast_expr2.c" break; case 11: /* "TOK_LT" */ -#line 285 "../main/ast_expr2.y" +#line 309 "../main/ast_expr2.y" { free_value((yyvaluep->val)); }; -#line 1425 "../main/ast_expr2.c" +#line 1449 "../main/ast_expr2.c" break; case 12: /* "TOK_GT" */ -#line 285 "../main/ast_expr2.y" +#line 309 "../main/ast_expr2.y" { free_value((yyvaluep->val)); }; -#line 1430 "../main/ast_expr2.c" +#line 1454 "../main/ast_expr2.c" break; case 13: /* "TOK_EQ" */ -#line 285 "../main/ast_expr2.y" +#line 309 "../main/ast_expr2.y" { free_value((yyvaluep->val)); }; -#line 1435 "../main/ast_expr2.c" +#line 1459 "../main/ast_expr2.c" break; case 14: /* "TOK_MINUS" */ -#line 285 "../main/ast_expr2.y" +#line 309 "../main/ast_expr2.y" { free_value((yyvaluep->val)); }; -#line 1440 "../main/ast_expr2.c" +#line 1464 "../main/ast_expr2.c" break; case 15: /* "TOK_PLUS" */ -#line 285 "../main/ast_expr2.y" +#line 309 "../main/ast_expr2.y" { free_value((yyvaluep->val)); }; -#line 1445 "../main/ast_expr2.c" +#line 1469 "../main/ast_expr2.c" break; case 16: /* "TOK_MOD" */ -#line 285 "../main/ast_expr2.y" +#line 309 "../main/ast_expr2.y" { free_value((yyvaluep->val)); }; -#line 1450 "../main/ast_expr2.c" +#line 1474 "../main/ast_expr2.c" break; case 17: /* "TOK_DIV" */ -#line 285 "../main/ast_expr2.y" +#line 309 "../main/ast_expr2.y" { free_value((yyvaluep->val)); }; -#line 1455 "../main/ast_expr2.c" +#line 1479 "../main/ast_expr2.c" break; case 18: /* "TOK_MULT" */ -#line 285 "../main/ast_expr2.y" +#line 309 "../main/ast_expr2.y" { free_value((yyvaluep->val)); }; -#line 1460 "../main/ast_expr2.c" +#line 1484 "../main/ast_expr2.c" break; case 19: /* "TOK_COMPL" */ -#line 285 "../main/ast_expr2.y" +#line 309 "../main/ast_expr2.y" { free_value((yyvaluep->val)); }; -#line 1465 "../main/ast_expr2.c" +#line 1489 "../main/ast_expr2.c" break; case 20: /* "TOK_EQTILDE" */ -#line 285 "../main/ast_expr2.y" +#line 309 "../main/ast_expr2.y" { free_value((yyvaluep->val)); }; -#line 1470 "../main/ast_expr2.c" +#line 1494 "../main/ast_expr2.c" break; case 21: /* "TOK_COLON" */ -#line 285 "../main/ast_expr2.y" +#line 309 "../main/ast_expr2.y" { free_value((yyvaluep->val)); }; -#line 1475 "../main/ast_expr2.c" +#line 1499 "../main/ast_expr2.c" break; case 22: /* "TOK_LP" */ -#line 285 "../main/ast_expr2.y" +#line 309 "../main/ast_expr2.y" { free_value((yyvaluep->val)); }; -#line 1480 "../main/ast_expr2.c" +#line 1504 "../main/ast_expr2.c" break; case 23: /* "TOK_RP" */ -#line 285 "../main/ast_expr2.y" +#line 309 "../main/ast_expr2.y" { free_value((yyvaluep->val)); }; -#line 1485 "../main/ast_expr2.c" +#line 1509 "../main/ast_expr2.c" break; case 24: /* "TOKEN" */ -#line 285 "../main/ast_expr2.y" +#line 309 "../main/ast_expr2.y" { free_value((yyvaluep->val)); }; -#line 1490 "../main/ast_expr2.c" +#line 1514 "../main/ast_expr2.c" break; case 28: /* "expr" */ -#line 285 "../main/ast_expr2.y" +#line 309 "../main/ast_expr2.y" { free_value((yyvaluep->val)); }; -#line 1495 "../main/ast_expr2.c" +#line 1519 "../main/ast_expr2.c" break; default: @@ -1814,7 +1838,7 @@ switch (yyn) { case 2: -#line 291 "../main/ast_expr2.y" +#line 315 "../main/ast_expr2.y" { ((struct parse_io *)parseio)->val = (struct val *)calloc(sizeof(struct val),1); ((struct parse_io *)parseio)->val->type = (yyvsp[(1) - (1)].val)->type; if( (yyvsp[(1) - (1)].val)->type == AST_EXPR_number ) @@ -1826,7 +1850,7 @@ break; case 3: -#line 299 "../main/ast_expr2.y" +#line 323 "../main/ast_expr2.y" {/* nothing */ ((struct parse_io *)parseio)->val = (struct val *)calloc(sizeof(struct val),1); ((struct parse_io *)parseio)->val->type = AST_EXPR_string; ((struct parse_io *)parseio)->val->u.s = strdup(""); @@ -1834,12 +1858,12 @@ break; case 4: -#line 306 "../main/ast_expr2.y" +#line 330 "../main/ast_expr2.y" { (yyval.arglist) = alloc_expr_node(AST_EXPR_NODE_VAL); (yyval.arglist)->val = (yyvsp[(1) - (1)].val);;} break; case 5: -#line 307 "../main/ast_expr2.y" +#line 331 "../main/ast_expr2.y" {struct expr_node *x = alloc_expr_node(AST_EXPR_NODE_VAL); struct expr_node *t; DESTROY((yyvsp[(2) - (3)].val)); @@ -1849,7 +1873,7 @@ break; case 6: -#line 316 "../main/ast_expr2.y" +#line 340 "../main/ast_expr2.y" { (yyval.val) = op_func((yyvsp[(1) - (4)].val),(yyvsp[(3) - (4)].arglist), ((struct parse_io *)parseio)->chan); DESTROY((yyvsp[(2) - (4)].val)); DESTROY((yyvsp[(4) - (4)].val)); @@ -1859,12 +1883,12 @@ break; case 7: -#line 322 "../main/ast_expr2.y" +#line 346 "../main/ast_expr2.y" {(yyval.val) = (yyvsp[(1) - (1)].val);;} break; case 8: -#line 323 "../main/ast_expr2.y" +#line 347 "../main/ast_expr2.y" { (yyval.val) = (yyvsp[(2) - (3)].val); (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; (yyloc).first_line=0; (yyloc).last_line=0; @@ -1872,7 +1896,7 @@ break; case 9: -#line 327 "../main/ast_expr2.y" +#line 351 "../main/ast_expr2.y" { (yyval.val) = op_or ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); DESTROY((yyvsp[(2) - (3)].val)); (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; @@ -1880,7 +1904,7 @@ break; case 10: -#line 331 "../main/ast_expr2.y" +#line 355 "../main/ast_expr2.y" { (yyval.val) = op_and ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); DESTROY((yyvsp[(2) - (3)].val)); (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; @@ -1888,7 +1912,7 @@ break; case 11: -#line 335 "../main/ast_expr2.y" +#line 359 "../main/ast_expr2.y" { (yyval.val) = op_eq ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); DESTROY((yyvsp[(2) - (3)].val)); (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; @@ -1896,7 +1920,7 @@ break; case 12: -#line 339 "../main/ast_expr2.y" +#line 363 "../main/ast_expr2.y" { (yyval.val) = op_gt ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); DESTROY((yyvsp[(2) - (3)].val)); (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; @@ -1904,7 +1928,7 @@ break; case 13: -#line 343 "../main/ast_expr2.y" +#line 367 "../main/ast_expr2.y" { (yyval.val) = op_lt ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); DESTROY((yyvsp[(2) - (3)].val)); (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; @@ -1912,7 +1936,7 @@ break; case 14: -#line 347 "../main/ast_expr2.y" +#line 371 "../main/ast_expr2.y" { (yyval.val) = op_ge ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); DESTROY((yyvsp[(2) - (3)].val)); (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; @@ -1920,7 +1944,7 @@ break; case 15: -#line 351 "../main/ast_expr2.y" +#line 375 "../main/ast_expr2.y" { (yyval.val) = op_le ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); DESTROY((yyvsp[(2) - (3)].val)); (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; @@ -1928,7 +1952,7 @@ break; case 16: -#line 355 "../main/ast_expr2.y" +#line 379 "../main/ast_expr2.y" { (yyval.val) = op_ne ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); DESTROY((yyvsp[(2) - (3)].val)); (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; @@ -1936,7 +1960,7 @@ break; case 17: -#line 359 "../main/ast_expr2.y" +#line 383 "../main/ast_expr2.y" { (yyval.val) = op_plus ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); DESTROY((yyvsp[(2) - (3)].val)); (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; @@ -1944,7 +1968,7 @@ break; case 18: -#line 363 "../main/ast_expr2.y" +#line 387 "../main/ast_expr2.y" { (yyval.val) = op_minus ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); DESTROY((yyvsp[(2) - (3)].val)); (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; @@ -1952,7 +1976,7 @@ break; case 19: -#line 367 "../main/ast_expr2.y" +#line 391 "../main/ast_expr2.y" { (yyval.val) = op_negate ((yyvsp[(2) - (2)].val)); DESTROY((yyvsp[(1) - (2)].val)); (yyloc).first_column = (yylsp[(1) - (2)]).first_column; (yyloc).last_column = (yylsp[(2) - (2)]).last_column; @@ -1960,7 +1984,7 @@ break; case 20: -#line 371 "../main/ast_expr2.y" +#line 395 "../main/ast_expr2.y" { (yyval.val) = op_compl ((yyvsp[(2) - (2)].val)); DESTROY((yyvsp[(1) - (2)].val)); (yyloc).first_column = (yylsp[(1) - (2)]).first_column; (yyloc).last_column = (yylsp[(2) - (2)]).last_column; @@ -1968,7 +1992,7 @@ break; case 21: -#line 375 "../main/ast_expr2.y" +#line 399 "../main/ast_expr2.y" { (yyval.val) = op_times ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); DESTROY((yyvsp[(2) - (3)].val)); (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; @@ -1976,7 +2000,7 @@ break; case 22: -#line 379 "../main/ast_expr2.y" +#line 403 "../main/ast_expr2.y" { (yyval.val) = op_div ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); DESTROY((yyvsp[(2) - (3)].val)); (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; @@ -1984,7 +2008,7 @@ break; case 23: -#line 383 "../main/ast_expr2.y" +#line 407 "../main/ast_expr2.y" { (yyval.val) = op_rem ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); DESTROY((yyvsp[(2) - (3)].val)); (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; @@ -1992,7 +2016,7 @@ break; case 24: -#line 387 "../main/ast_expr2.y" +#line 411 "../main/ast_expr2.y" { (yyval.val) = op_colon ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); DESTROY((yyvsp[(2) - (3)].val)); (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; @@ -2000,7 +2024,7 @@ break; case 25: -#line 391 "../main/ast_expr2.y" +#line 415 "../main/ast_expr2.y" { (yyval.val) = op_eqtilde ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); DESTROY((yyvsp[(2) - (3)].val)); (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; @@ -2008,7 +2032,7 @@ break; case 26: -#line 395 "../main/ast_expr2.y" +#line 419 "../main/ast_expr2.y" { (yyval.val) = op_cond ((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val)); DESTROY((yyvsp[(2) - (5)].val)); DESTROY((yyvsp[(4) - (5)].val)); @@ -2018,7 +2042,7 @@ /* Line 1267 of yacc.c. */ -#line 2022 "../main/ast_expr2.c" +#line 2046 "../main/ast_expr2.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -2238,7 +2262,7 @@ } -#line 402 "../main/ast_expr2.y" +#line 426 "../main/ast_expr2.y" static struct expr_node *alloc_expr_node(enum node_type nt) @@ -2641,6 +2665,7 @@ ast_log(LOG_WARNING,"Wrong args to %s() function\n",funcname->u.s); return make_number(0.0); } +#ifdef FUNC_ROUND } else if (strcmp(funcname->u.s,"ROUND") == 0) { if (arglist && !arglist->right && arglist->val){ to_number(arglist->val); @@ -2650,6 +2675,7 @@ ast_log(LOG_WARNING,"Wrong args to %s() function\n",funcname->u.s); return make_number(0.0); } +#endif /* defined(FUNC_ROUND) */ } else if (strcmp(funcname->u.s,"RINT") == 0) { if (arglist && !arglist->right && arglist->val){ to_number(arglist->val); @@ -2659,6 +2685,7 @@ ast_log(LOG_WARNING,"Wrong args to %s() function\n",funcname->u.s); return make_number(0.0); } +#ifdef FUNC_TRUNC } else if (strcmp(funcname->u.s,"TRUNC") == 0) { if (arglist && !arglist->right && arglist->val){ to_number(arglist->val); @@ -2668,6 +2695,7 @@ ast_log(LOG_WARNING,"Wrong args to %s() function\n",funcname->u.s); return make_number(0.0); } +#endif /* defined(FUNC_TRUNC) */ } else if (strcmp(funcname->u.s,"EXP") == 0) { if (arglist && !arglist->right && arglist->val){ to_number(arglist->val); Index: main/ast_expr2.h =================================================================== --- main/ast_expr2.h (revision 83380) +++ main/ast_expr2.h (working copy) @@ -92,7 +92,7 @@ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 260 "../main/ast_expr2.y" +#line 284 "../main/ast_expr2.y" { struct val *val; struct expr_node *arglist; Index: main/ast_expr2.y =================================================================== --- main/ast_expr2.y (revision 83380) +++ main/ast_expr2.y (working copy) @@ -37,9 +37,25 @@ #define FUNC_SQRT sqrtl #define FUNC_FLOOR floorl #define FUNC_CEIL ceill +#ifdef HAVE_ROUNDL #define FUNC_ROUND roundl +#else /* HAVE_ROUNDL */ +#ifdef HAVE_ROUND +#define FUNC_ROUND round +#else /* HAVE_ROUND */ +#undef FUNC_ROUND +#endif /* HAVE_ROUND */ +#endif /* HAVE_ROUNDL */ +#ifdef HAVE_TRUNCL +#define FUNC_TRUNC truncl +#else /* HAVE_TRUNCL */ +#ifdef HAVE_TRUNC +#define FUNC_TRUNC trunc +#else /* HAVE_TRUNC */ +#undef FUNC_TRUNC +#endif /* HAVE_TRUNC */ +#endif /* HAVE_TRUNCL */ #define FUNC_RINT rintl -#define FUNC_TRUNC truncl #define FUNC_EXP expl #ifdef HAVE_EXP2L #define FUNC_EXP2 exp2l @@ -79,9 +95,17 @@ #define FUNC_SQRT sqrt #define FUNC_FLOOR floor #define FUNC_CEIL ceil +#ifdef HAVE_ROUND #define FUNC_ROUND round +#else /* HAVE_ROUND */ +#undef FUNC_ROUND +#endif /* HAVE_ROUND */ +#ifdef HAVE_TRUNC +#define FUNC_TRUNC round +#else /* HAVE_TRUNC */ +#undef FUNC_TRUNC +#endif /* HAVE_TRUNC */ #define FUNC_RINT rint -#define FUNC_TRUNC trunc #define FUNC_EXP exp #ifdef HAVE_EXP2 #define FUNC_EXP2 exp2 @@ -801,6 +825,7 @@ ast_log(LOG_WARNING,"Wrong args to %s() function\n",funcname->u.s); return make_number(0.0); } +#ifdef FUNC_ROUND } else if (strcmp(funcname->u.s,"ROUND") == 0) { if (arglist && !arglist->right && arglist->val){ to_number(arglist->val); @@ -810,6 +835,7 @@ ast_log(LOG_WARNING,"Wrong args to %s() function\n",funcname->u.s); return make_number(0.0); } +#endif /* defined(FUNC_ROUND) */ } else if (strcmp(funcname->u.s,"RINT") == 0) { if (arglist && !arglist->right && arglist->val){ to_number(arglist->val); @@ -819,6 +845,7 @@ ast_log(LOG_WARNING,"Wrong args to %s() function\n",funcname->u.s); return make_number(0.0); } +#ifdef FUNC_TRUNC } else if (strcmp(funcname->u.s,"TRUNC") == 0) { if (arglist && !arglist->right && arglist->val){ to_number(arglist->val); @@ -828,6 +855,7 @@ ast_log(LOG_WARNING,"Wrong args to %s() function\n",funcname->u.s); return make_number(0.0); } +#endif /* defined(FUNC_TRUNC) */ } else if (strcmp(funcname->u.s,"EXP") == 0) { if (arglist && !arglist->right && arglist->val){ to_number(arglist->val);