#! /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.
#
fi
-if test "x${PBX_EXP2}" != "x1" -a "${USE_EXP2}" != "no"; then
+if test "x${PBX_ROUNDL}" != "x1" -a "${USE_ROUNDL}" != "no"; then
pbxlibdir=""
- if test "x${EXP2_DIR}" != "x"; then
- if test -d ${EXP2_DIR}/lib; then
- pbxlibdir="-L${EXP2_DIR}/lib"
+ if test "x${ROUNDL_DIR}" != "x"; then
+ if test -d ${ROUNDL_DIR}/lib; then
+ pbxlibdir="-L${ROUNDL_DIR}/lib"
else
- pbxlibdir="-L${EXP2_DIR}"
+ pbxlibdir="-L${ROUNDL_DIR}"
fi
fi
- pbxfuncname="exp2"
+ pbxfuncname="roundl"
if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
- AST_EXP2_FOUND=yes
+ 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 "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
- AST_EXP2_FOUND=yes
+ AST_ROUNDL_FOUND=yes
else
- AST_EXP2_FOUND=no
+ AST_ROUNDL_FOUND=no
fi
fi
- if test "${AST_EXP2_FOUND}" = "yes"; then
- EXP2_LIB="-lm "
- EXP2_HEADER_FOUND="1"
- if test "x${EXP2_DIR}" != "x"; then
- EXP2_LIB="${pbxlibdir} ${EXP2_LIB}"
- EXP2_INCLUDE="-I${EXP2_DIR}/include"
+ 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${EXP2_DIR}/include"
+ CPPFLAGS="${CPPFLAGS} -I${ROUNDL_DIR}/include"
if test "x" != "x" ; then
- as_ac_Header=`echo "ac_cv_header_${EXP2_DIR}/include/" | $as_tr_sh`
+ 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 ${EXP2_DIR}/include/" >&5
-echo $ECHO_N "checking for ${EXP2_DIR}/include/... $ECHO_C" >&6; }
+ { 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
echo "${ECHO_T}$ac_res" >&6; }
else
# Is the header compilable?
-{ echo "$as_me:$LINENO: checking ${EXP2_DIR}/include/ usability" >&5
-echo $ECHO_N "checking ${EXP2_DIR}/include/ usability... $ECHO_C" >&6; }
+{ 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 >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
-#include <${EXP2_DIR}/include/>
+#include <${ROUNDL_DIR}/include/>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
echo "${ECHO_T}$ac_header_compiler" >&6; }
# Is the header present?
-{ echo "$as_me:$LINENO: checking ${EXP2_DIR}/include/ presence" >&5
-echo $ECHO_N "checking ${EXP2_DIR}/include/ presence... $ECHO_C" >&6; }
+{ 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 <${EXP2_DIR}/include/>
+#include <${ROUNDL_DIR}/include/>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
# 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: ${EXP2_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: ${EXP2_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: ${EXP2_DIR}/include/: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: ${EXP2_DIR}/include/: proceeding with the compiler's result" >&2;}
+ { 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: ${EXP2_DIR}/include/: present but cannot be compiled" >&5
-echo "$as_me: WARNING: ${EXP2_DIR}/include/: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: ${EXP2_DIR}/include/: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: ${EXP2_DIR}/include/: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: ${EXP2_DIR}/include/: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: ${EXP2_DIR}/include/: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: ${EXP2_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: ${EXP2_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: ${EXP2_DIR}/include/: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: ${EXP2_DIR}/include/: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: ${EXP2_DIR}/include/: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: ${EXP2_DIR}/include/: in the future, the compiler will take precedence" >&2;}
+ { 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
+ if test -d ${EXP2_DIR}/lib; then
+ pbxlibdir="-L${EXP2_DIR}/lib"
+ else
+ pbxlibdir="-L${EXP2_DIR}"
+ fi
+ fi
+ pbxfuncname="exp2"
+ if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
+ AST_EXP2_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_EXP2_FOUND=yes
+else
+ AST_EXP2_FOUND=no
+fi
+
+ fi
+
+ if test "${AST_EXP2_FOUND}" = "yes"; then
+ EXP2_LIB="-lm "
+ EXP2_HEADER_FOUND="1"
+ if test "x${EXP2_DIR}" != "x"; then
+ EXP2_LIB="${pbxlibdir} ${EXP2_LIB}"
+ EXP2_INCLUDE="-I${EXP2_DIR}/include"
+ saved_cppflags="${CPPFLAGS}"
+ CPPFLAGS="${CPPFLAGS} -I${EXP2_DIR}/include"
+ if test "x" != "x" ; then
+ as_ac_Header=`echo "ac_cv_header_${EXP2_DIR}/include/" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for ${EXP2_DIR}/include/" >&5
+echo $ECHO_N "checking for ${EXP2_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 ${EXP2_DIR}/include/ usability" >&5
+echo $ECHO_N "checking ${EXP2_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 <${EXP2_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 ${EXP2_DIR}/include/ presence" >&5
+echo $ECHO_N "checking ${EXP2_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 <${EXP2_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: ${EXP2_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: ${EXP2_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ${EXP2_DIR}/include/: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: ${EXP2_DIR}/include/: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: ${EXP2_DIR}/include/: present but cannot be compiled" >&5
+echo "$as_me: WARNING: ${EXP2_DIR}/include/: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ${EXP2_DIR}/include/: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: ${EXP2_DIR}/include/: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ${EXP2_DIR}/include/: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: ${EXP2_DIR}/include/: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ${EXP2_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: ${EXP2_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ${EXP2_DIR}/include/: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: ${EXP2_DIR}/include/: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ${EXP2_DIR}/include/: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: ${EXP2_DIR}/include/: in the future, the compiler will take precedence" >&2;}
+
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for ${EXP2_DIR}/include/" >&5
+echo $ECHO_N "checking for ${EXP2_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
+ EXP2_HEADER_FOUND=1
+else
+ EXP2_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
+ EXP2_HEADER_FOUND=1
+else
+ EXP2_HEADER_FOUND=0
+fi
+
+
+ fi
+ fi
+ if test "x${EXP2_HEADER_FOUND}" = "x0" ; then
+ EXP2_LIB=""
+ EXP2_INCLUDE=""
+ else
+ if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
+ EXP2_LIB=""
+ fi
+ PBX_EXP2=1
+ # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_EXP2 1
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_EXP2_VERSION
+_ACEOF
+
+ fi
+ fi
+fi
+
+
+if test "x${PBX_LOG2}" != "x1" -a "${USE_LOG2}" != "no"; then
+ pbxlibdir=""
+ if test "x${LOG2_DIR}" != "x"; then
+ if test -d ${LOG2_DIR}/lib; then
+ pbxlibdir="-L${LOG2_DIR}/lib"
+ else
+ pbxlibdir="-L${LOG2_DIR}"
+ fi
+ fi
+ pbxfuncname="log2"
+ if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
+ AST_LOG2_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_LOG2_FOUND=yes
+else
+ AST_LOG2_FOUND=no
+fi
+
+ fi
+
+ if test "${AST_LOG2_FOUND}" = "yes"; then
+ LOG2_LIB="-lm "
+ LOG2_HEADER_FOUND="1"
+ if test "x${LOG2_DIR}" != "x"; then
+ LOG2_LIB="${pbxlibdir} ${LOG2_LIB}"
+ LOG2_INCLUDE="-I${LOG2_DIR}/include"
+ saved_cppflags="${CPPFLAGS}"
+ CPPFLAGS="${CPPFLAGS} -I${LOG2_DIR}/include"
+ if test "x" != "x" ; then
+ as_ac_Header=`echo "ac_cv_header_${LOG2_DIR}/include/" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for ${LOG2_DIR}/include/" >&5
+echo $ECHO_N "checking for ${LOG2_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 ${LOG2_DIR}/include/ usability" >&5
+echo $ECHO_N "checking ${LOG2_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 <${LOG2_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 ${LOG2_DIR}/include/ presence" >&5
+echo $ECHO_N "checking ${LOG2_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 <${LOG2_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: ${LOG2_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: ${LOG2_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ${LOG2_DIR}/include/: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: ${LOG2_DIR}/include/: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: ${LOG2_DIR}/include/: present but cannot be compiled" >&5
+echo "$as_me: WARNING: ${LOG2_DIR}/include/: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ${LOG2_DIR}/include/: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: ${LOG2_DIR}/include/: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ${LOG2_DIR}/include/: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: ${LOG2_DIR}/include/: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ${LOG2_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: ${LOG2_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ${LOG2_DIR}/include/: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: ${LOG2_DIR}/include/: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ${LOG2_DIR}/include/: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: ${LOG2_DIR}/include/: in the future, the compiler will take precedence" >&2;}
+
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for ${LOG2_DIR}/include/" >&5
+echo $ECHO_N "checking for ${LOG2_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
+ LOG2_HEADER_FOUND=1
+else
+ LOG2_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
+ LOG2_HEADER_FOUND=1
+else
+ LOG2_HEADER_FOUND=0
+fi
+
+
+ fi
+ fi
+ if test "x${LOG2_HEADER_FOUND}" = "x0" ; then
+ LOG2_LIB=""
+ LOG2_INCLUDE=""
+ else
+ if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
+ LOG2_LIB=""
+ fi
+ PBX_LOG2=1
+ # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_LOG2 1
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_LOG2_VERSION
+_ACEOF
+
+ fi
+ fi
+fi
+
+
+if test "x${PBX_EXP10}" != "x1" -a "${USE_EXP10}" != "no"; then
+ pbxlibdir=""
+ if test "x${EXP10_DIR}" != "x"; then
+ if test -d ${EXP10_DIR}/lib; then
+ pbxlibdir="-L${EXP10_DIR}/lib"
+ else
+ pbxlibdir="-L${EXP10_DIR}"
+ fi
+ fi
+ pbxfuncname="exp10"
+ if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
+ AST_EXP10_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_EXP10_FOUND=yes
+else
+ AST_EXP10_FOUND=no
+fi
+
+ fi
+
+ if test "${AST_EXP10_FOUND}" = "yes"; then
+ EXP10_LIB="-lm "
+ EXP10_HEADER_FOUND="1"
+ if test "x${EXP10_DIR}" != "x"; then
+ EXP10_LIB="${pbxlibdir} ${EXP10_LIB}"
+ EXP10_INCLUDE="-I${EXP10_DIR}/include"
+ saved_cppflags="${CPPFLAGS}"
+ CPPFLAGS="${CPPFLAGS} -I${EXP10_DIR}/include"
+ if test "x" != "x" ; then
+ as_ac_Header=`echo "ac_cv_header_${EXP10_DIR}/include/" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for ${EXP10_DIR}/include/" >&5
+echo $ECHO_N "checking for ${EXP10_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 ${EXP10_DIR}/include/ usability" >&5
+echo $ECHO_N "checking ${EXP10_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 <${EXP10_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 ${EXP10_DIR}/include/ presence" >&5
+echo $ECHO_N "checking ${EXP10_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 <${EXP10_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: ${EXP10_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: ${EXP10_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ${EXP10_DIR}/include/: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: ${EXP10_DIR}/include/: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: ${EXP10_DIR}/include/: present but cannot be compiled" >&5
+echo "$as_me: WARNING: ${EXP10_DIR}/include/: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ${EXP10_DIR}/include/: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: ${EXP10_DIR}/include/: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ${EXP10_DIR}/include/: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: ${EXP10_DIR}/include/: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ${EXP10_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: ${EXP10_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ${EXP10_DIR}/include/: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: ${EXP10_DIR}/include/: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ${EXP10_DIR}/include/: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: ${EXP10_DIR}/include/: in the future, the compiler will take precedence" >&2;}
;;
esac
-{ echo "$as_me:$LINENO: checking for ${EXP2_DIR}/include/" >&5
-echo $ECHO_N "checking for ${EXP2_DIR}/include/... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking for ${EXP10_DIR}/include/" >&5
+echo $ECHO_N "checking for ${EXP10_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
fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
- EXP2_HEADER_FOUND=1
+ EXP10_HEADER_FOUND=1
else
- EXP2_HEADER_FOUND=0
+ EXP10_HEADER_FOUND=0
fi
fi
if test $ac_cv_header_ = yes; then
- EXP2_HEADER_FOUND=1
+ EXP10_HEADER_FOUND=1
else
- EXP2_HEADER_FOUND=0
+ EXP10_HEADER_FOUND=0
fi
fi
fi
- if test "x${EXP2_HEADER_FOUND}" = "x0" ; then
- EXP2_LIB=""
- EXP2_INCLUDE=""
+ if test "x${EXP10_HEADER_FOUND}" = "x0" ; then
+ EXP10_LIB=""
+ EXP10_INCLUDE=""
else
if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
- EXP2_LIB=""
+ EXP10_LIB=""
fi
- PBX_EXP2=1
+ PBX_EXP10=1
# XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED
cat >>confdefs.h <<_ACEOF
-#define HAVE_EXP2 1
+#define HAVE_EXP10 1
_ACEOF
cat >>confdefs.h <<_ACEOF
-#define HAVE_EXP2_VERSION
+#define HAVE_EXP10_VERSION
_ACEOF
fi
fi
-if test "x${PBX_LOG2}" != "x1" -a "${USE_LOG2}" != "no"; then
+if test "x${PBX_LOG10}" != "x1" -a "${USE_LOG10}" != "no"; then
pbxlibdir=""
- if test "x${LOG2_DIR}" != "x"; then
- if test -d ${LOG2_DIR}/lib; then
- pbxlibdir="-L${LOG2_DIR}/lib"
+ if test "x${LOG10_DIR}" != "x"; then
+ if test -d ${LOG10_DIR}/lib; then
+ pbxlibdir="-L${LOG10_DIR}/lib"
else
- pbxlibdir="-L${LOG2_DIR}"
+ pbxlibdir="-L${LOG10_DIR}"
fi
fi
- pbxfuncname="log2"
+ pbxfuncname="log10"
if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
- AST_LOG2_FOUND=yes
+ AST_LOG10_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 "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
- AST_LOG2_FOUND=yes
+ AST_LOG10_FOUND=yes
else
- AST_LOG2_FOUND=no
+ AST_LOG10_FOUND=no
fi
fi
- if test "${AST_LOG2_FOUND}" = "yes"; then
- LOG2_LIB="-lm "
- LOG2_HEADER_FOUND="1"
- if test "x${LOG2_DIR}" != "x"; then
- LOG2_LIB="${pbxlibdir} ${LOG2_LIB}"
- LOG2_INCLUDE="-I${LOG2_DIR}/include"
+ if test "${AST_LOG10_FOUND}" = "yes"; then
+ LOG10_LIB="-lm "
+ LOG10_HEADER_FOUND="1"
+ if test "x${LOG10_DIR}" != "x"; then
+ LOG10_LIB="${pbxlibdir} ${LOG10_LIB}"
+ LOG10_INCLUDE="-I${LOG10_DIR}/include"
saved_cppflags="${CPPFLAGS}"
- CPPFLAGS="${CPPFLAGS} -I${LOG2_DIR}/include"
+ CPPFLAGS="${CPPFLAGS} -I${LOG10_DIR}/include"
if test "x" != "x" ; then
- as_ac_Header=`echo "ac_cv_header_${LOG2_DIR}/include/" | $as_tr_sh`
+ as_ac_Header=`echo "ac_cv_header_${LOG10_DIR}/include/" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { echo "$as_me:$LINENO: checking for ${LOG2_DIR}/include/" >&5
-echo $ECHO_N "checking for ${LOG2_DIR}/include/... $ECHO_C" >&6; }
+ { echo "$as_me:$LINENO: checking for ${LOG10_DIR}/include/" >&5
+echo $ECHO_N "checking for ${LOG10_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
echo "${ECHO_T}$ac_res" >&6; }
else
# Is the header compilable?
-{ echo "$as_me:$LINENO: checking ${LOG2_DIR}/include/ usability" >&5
-echo $ECHO_N "checking ${LOG2_DIR}/include/ usability... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking ${LOG10_DIR}/include/ usability" >&5
+echo $ECHO_N "checking ${LOG10_DIR}/include/ usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
-#include <${LOG2_DIR}/include/>
+#include <${LOG10_DIR}/include/>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
echo "${ECHO_T}$ac_header_compiler" >&6; }
# Is the header present?
-{ echo "$as_me:$LINENO: checking ${LOG2_DIR}/include/ presence" >&5
-echo $ECHO_N "checking ${LOG2_DIR}/include/ presence... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking ${LOG10_DIR}/include/ presence" >&5
+echo $ECHO_N "checking ${LOG10_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 <${LOG2_DIR}/include/>
+#include <${LOG10_DIR}/include/>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
# 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: ${LOG2_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: ${LOG2_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: ${LOG2_DIR}/include/: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: ${LOG2_DIR}/include/: proceeding with the compiler's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ${LOG10_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: ${LOG10_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ${LOG10_DIR}/include/: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: ${LOG10_DIR}/include/: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
- { echo "$as_me:$LINENO: WARNING: ${LOG2_DIR}/include/: present but cannot be compiled" >&5
-echo "$as_me: WARNING: ${LOG2_DIR}/include/: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: ${LOG2_DIR}/include/: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: ${LOG2_DIR}/include/: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: ${LOG2_DIR}/include/: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: ${LOG2_DIR}/include/: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: ${LOG2_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: ${LOG2_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: ${LOG2_DIR}/include/: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: ${LOG2_DIR}/include/: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: ${LOG2_DIR}/include/: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: ${LOG2_DIR}/include/: in the future, the compiler will take precedence" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ${LOG10_DIR}/include/: present but cannot be compiled" >&5
+echo "$as_me: WARNING: ${LOG10_DIR}/include/: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ${LOG10_DIR}/include/: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: ${LOG10_DIR}/include/: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ${LOG10_DIR}/include/: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: ${LOG10_DIR}/include/: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ${LOG10_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: ${LOG10_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ${LOG10_DIR}/include/: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: ${LOG10_DIR}/include/: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ${LOG10_DIR}/include/: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: ${LOG10_DIR}/include/: in the future, the compiler will take precedence" >&2;}
;;
esac
-{ echo "$as_me:$LINENO: checking for ${LOG2_DIR}/include/" >&5
-echo $ECHO_N "checking for ${LOG2_DIR}/include/... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking for ${LOG10_DIR}/include/" >&5
+echo $ECHO_N "checking for ${LOG10_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
fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
- LOG2_HEADER_FOUND=1
+ LOG10_HEADER_FOUND=1
else
- LOG2_HEADER_FOUND=0
+ LOG10_HEADER_FOUND=0
fi
fi
if test $ac_cv_header_ = yes; then
- LOG2_HEADER_FOUND=1
+ LOG10_HEADER_FOUND=1
else
- LOG2_HEADER_FOUND=0
+ LOG10_HEADER_FOUND=0
fi
fi
fi
- if test "x${LOG2_HEADER_FOUND}" = "x0" ; then
- LOG2_LIB=""
- LOG2_INCLUDE=""
+ if test "x${LOG10_HEADER_FOUND}" = "x0" ; then
+ LOG10_LIB=""
+ LOG10_INCLUDE=""
else
if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
- LOG2_LIB=""
+ LOG10_LIB=""
fi
- PBX_LOG2=1
+ PBX_LOG10=1
# XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED
cat >>confdefs.h <<_ACEOF
-#define HAVE_LOG2 1
+#define HAVE_LOG10 1
_ACEOF
cat >>confdefs.h <<_ACEOF
-#define HAVE_LOG2_VERSION
+#define HAVE_LOG10_VERSION
_ACEOF
fi
fi
-if test "x${PBX_EXP10}" != "x1" -a "${USE_EXP10}" != "no"; then
+if test "x${PBX_ROUND}" != "x1" -a "${USE_ROUND}" != "no"; then
pbxlibdir=""
- if test "x${EXP10_DIR}" != "x"; then
- if test -d ${EXP10_DIR}/lib; then
- pbxlibdir="-L${EXP10_DIR}/lib"
+ if test "x${ROUND_DIR}" != "x"; then
+ if test -d ${ROUND_DIR}/lib; then
+ pbxlibdir="-L${ROUND_DIR}/lib"
else
- pbxlibdir="-L${EXP10_DIR}"
+ pbxlibdir="-L${ROUND_DIR}"
fi
fi
- pbxfuncname="exp10"
+ pbxfuncname="round"
if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
- AST_EXP10_FOUND=yes
+ 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 "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
- AST_EXP10_FOUND=yes
+ AST_ROUND_FOUND=yes
else
- AST_EXP10_FOUND=no
+ AST_ROUND_FOUND=no
fi
fi
- if test "${AST_EXP10_FOUND}" = "yes"; then
- EXP10_LIB="-lm "
- EXP10_HEADER_FOUND="1"
- if test "x${EXP10_DIR}" != "x"; then
- EXP10_LIB="${pbxlibdir} ${EXP10_LIB}"
- EXP10_INCLUDE="-I${EXP10_DIR}/include"
+ 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${EXP10_DIR}/include"
+ CPPFLAGS="${CPPFLAGS} -I${ROUND_DIR}/include"
if test "x" != "x" ; then
- as_ac_Header=`echo "ac_cv_header_${EXP10_DIR}/include/" | $as_tr_sh`
+ 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 ${EXP10_DIR}/include/" >&5
-echo $ECHO_N "checking for ${EXP10_DIR}/include/... $ECHO_C" >&6; }
+ { 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
echo "${ECHO_T}$ac_res" >&6; }
else
# Is the header compilable?
-{ echo "$as_me:$LINENO: checking ${EXP10_DIR}/include/ usability" >&5
-echo $ECHO_N "checking ${EXP10_DIR}/include/ usability... $ECHO_C" >&6; }
+{ 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 >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
-#include <${EXP10_DIR}/include/>
+#include <${ROUND_DIR}/include/>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
echo "${ECHO_T}$ac_header_compiler" >&6; }
# Is the header present?
-{ echo "$as_me:$LINENO: checking ${EXP10_DIR}/include/ presence" >&5
-echo $ECHO_N "checking ${EXP10_DIR}/include/ presence... $ECHO_C" >&6; }
+{ 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 <${EXP10_DIR}/include/>
+#include <${ROUND_DIR}/include/>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
# 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: ${EXP10_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: ${EXP10_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: ${EXP10_DIR}/include/: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: ${EXP10_DIR}/include/: proceeding with the compiler's result" >&2;}
+ { 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: ${EXP10_DIR}/include/: present but cannot be compiled" >&5
-echo "$as_me: WARNING: ${EXP10_DIR}/include/: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: ${EXP10_DIR}/include/: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: ${EXP10_DIR}/include/: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: ${EXP10_DIR}/include/: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: ${EXP10_DIR}/include/: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: ${EXP10_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: ${EXP10_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: ${EXP10_DIR}/include/: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: ${EXP10_DIR}/include/: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: ${EXP10_DIR}/include/: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: ${EXP10_DIR}/include/: in the future, the compiler will take precedence" >&2;}
+ { 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 ${EXP10_DIR}/include/" >&5
-echo $ECHO_N "checking for ${EXP10_DIR}/include/... $ECHO_C" >&6; }
+{ 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
fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
- EXP10_HEADER_FOUND=1
+ ROUND_HEADER_FOUND=1
else
- EXP10_HEADER_FOUND=0
+ ROUND_HEADER_FOUND=0
fi
fi
if test $ac_cv_header_ = yes; then
- EXP10_HEADER_FOUND=1
+ ROUND_HEADER_FOUND=1
else
- EXP10_HEADER_FOUND=0
+ ROUND_HEADER_FOUND=0
fi
fi
fi
- if test "x${EXP10_HEADER_FOUND}" = "x0" ; then
- EXP10_LIB=""
- EXP10_INCLUDE=""
+ if test "x${ROUND_HEADER_FOUND}" = "x0" ; then
+ ROUND_LIB=""
+ ROUND_INCLUDE=""
else
if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
- EXP10_LIB=""
+ ROUND_LIB=""
fi
- PBX_EXP10=1
+ PBX_ROUND=1
# XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED
cat >>confdefs.h <<_ACEOF
-#define HAVE_EXP10 1
+#define HAVE_ROUND 1
_ACEOF
cat >>confdefs.h <<_ACEOF
-#define HAVE_EXP10_VERSION
+#define HAVE_ROUND_VERSION
_ACEOF
fi
fi
-if test "x${PBX_LOG10}" != "x1" -a "${USE_LOG10}" != "no"; then
+if test "x${PBX_TRUNC}" != "x1" -a "${USE_TRUNC}" != "no"; then
pbxlibdir=""
- if test "x${LOG10_DIR}" != "x"; then
- if test -d ${LOG10_DIR}/lib; then
- pbxlibdir="-L${LOG10_DIR}/lib"
+ if test "x${TRUNC_DIR}" != "x"; then
+ if test -d ${TRUNC_DIR}/lib; then
+ pbxlibdir="-L${TRUNC_DIR}/lib"
else
- pbxlibdir="-L${LOG10_DIR}"
+ pbxlibdir="-L${TRUNC_DIR}"
fi
fi
- pbxfuncname="log10"
+ pbxfuncname="trunc"
if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
- AST_LOG10_FOUND=yes
+ 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 "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
- AST_LOG10_FOUND=yes
+ AST_TRUNC_FOUND=yes
else
- AST_LOG10_FOUND=no
+ AST_TRUNC_FOUND=no
fi
fi
- if test "${AST_LOG10_FOUND}" = "yes"; then
- LOG10_LIB="-lm "
- LOG10_HEADER_FOUND="1"
- if test "x${LOG10_DIR}" != "x"; then
- LOG10_LIB="${pbxlibdir} ${LOG10_LIB}"
- LOG10_INCLUDE="-I${LOG10_DIR}/include"
+ 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${LOG10_DIR}/include"
+ CPPFLAGS="${CPPFLAGS} -I${TRUNC_DIR}/include"
if test "x" != "x" ; then
- as_ac_Header=`echo "ac_cv_header_${LOG10_DIR}/include/" | $as_tr_sh`
+ 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 ${LOG10_DIR}/include/" >&5
-echo $ECHO_N "checking for ${LOG10_DIR}/include/... $ECHO_C" >&6; }
+ { 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
echo "${ECHO_T}$ac_res" >&6; }
else
# Is the header compilable?
-{ echo "$as_me:$LINENO: checking ${LOG10_DIR}/include/ usability" >&5
-echo $ECHO_N "checking ${LOG10_DIR}/include/ usability... $ECHO_C" >&6; }
+{ 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 >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
-#include <${LOG10_DIR}/include/>
+#include <${TRUNC_DIR}/include/>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
echo "${ECHO_T}$ac_header_compiler" >&6; }
# Is the header present?
-{ echo "$as_me:$LINENO: checking ${LOG10_DIR}/include/ presence" >&5
-echo $ECHO_N "checking ${LOG10_DIR}/include/ presence... $ECHO_C" >&6; }
+{ 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 <${LOG10_DIR}/include/>
+#include <${TRUNC_DIR}/include/>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
# 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: ${LOG10_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: ${LOG10_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: ${LOG10_DIR}/include/: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: ${LOG10_DIR}/include/: proceeding with the compiler's result" >&2;}
+ { 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: ${LOG10_DIR}/include/: present but cannot be compiled" >&5
-echo "$as_me: WARNING: ${LOG10_DIR}/include/: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: ${LOG10_DIR}/include/: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: ${LOG10_DIR}/include/: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: ${LOG10_DIR}/include/: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: ${LOG10_DIR}/include/: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: ${LOG10_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: ${LOG10_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: ${LOG10_DIR}/include/: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: ${LOG10_DIR}/include/: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: ${LOG10_DIR}/include/: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: ${LOG10_DIR}/include/: in the future, the compiler will take precedence" >&2;}
+ { 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 ${LOG10_DIR}/include/" >&5
-echo $ECHO_N "checking for ${LOG10_DIR}/include/... $ECHO_C" >&6; }
+{ 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
fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
- LOG10_HEADER_FOUND=1
+ TRUNC_HEADER_FOUND=1
else
- LOG10_HEADER_FOUND=0
+ TRUNC_HEADER_FOUND=0
fi
fi
if test $ac_cv_header_ = yes; then
- LOG10_HEADER_FOUND=1
+ TRUNC_HEADER_FOUND=1
else
- LOG10_HEADER_FOUND=0
+ TRUNC_HEADER_FOUND=0
fi
fi
fi
- if test "x${LOG10_HEADER_FOUND}" = "x0" ; then
- LOG10_LIB=""
- LOG10_INCLUDE=""
+ if test "x${TRUNC_HEADER_FOUND}" = "x0" ; then
+ TRUNC_LIB=""
+ TRUNC_INCLUDE=""
else
if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
- LOG10_LIB=""
+ TRUNC_LIB=""
fi
- PBX_LOG10=1
+ PBX_TRUNC=1
# XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED
cat >>confdefs.h <<_ACEOF
-#define HAVE_LOG10 1
+#define HAVE_TRUNC 1
_ACEOF
cat >>confdefs.h <<_ACEOF
-#define HAVE_LOG10_VERSION
+#define HAVE_TRUNC_VERSION
_ACEOF
fi
#include <sys/types.h>
#include <stdio.h>
-#ifdef STANDALONE /* I guess somewhere, the feature is set in the asterisk includes */
+/* Instead of looking for an arbitrary keyword, just test for various C99 function presence */
+#if (defined(HAVE_ROUNDL) || defined(HAVE_TRUNCL) || defined(HAVE_LOG10L) || defined(HAVE_LOG2L))
#ifndef __USE_ISOC99
-#define __USE_ISOC99 1
+#define __USE_ISOC99
#endif
#endif
#define FUNC_SQRT sqrtl
#define FUNC_FLOOR floorl
#define FUNC_CEIL ceill
-#define FUNC_ROUND roundl
#define FUNC_RINT rintl
-#define FUNC_TRUNC truncl
#define FUNC_EXP expl
+#define FUNC_LOG logl
+#define FUNC_REMAINDER remainderl
+
+#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 */
+
+/*! \note
+ * Oddly enough, some platforms have some ISO C99 functions, but not others, so
+ * we define the missing functions in terms of their mathematical identities.
+ */
#ifdef HAVE_EXP2L
#define FUNC_EXP2 exp2l
#else
-#define FUNC_EXP2(x) expl((x) * logl(2))
+#define FUNC_EXP2(x) expl((x) * logl(2.0))
#endif
+
#ifdef HAVE_EXP10L
#define FUNC_EXP10 exp10l
#else
-#define FUNC_EXP10(x) expl((x) * logl(10))
+#define FUNC_EXP10(x) expl((x) * logl(10.0))
#endif
-#define FUNC_LOG logl
+
#ifdef HAVE_LOG2L
#define FUNC_LOG2 log2l
#else
-#define FUNC_LOG2(x) (logl(x) / logl(2))
+#define FUNC_LOG2(x) (logl(x) / logl(2.0))
#endif
+
#ifdef HAVE_LOG10L
#define FUNC_LOG10 log10l
#else
-#define FUNC_LOG10(x) (logl(x) / logl(10))
+#define FUNC_LOG10(x) (logl(x) / logl(10.0))
#endif
-#define FUNC_REMAINDER remainderl
-#else
+
+#else /* defined(__USE_ISOC99) */
+
#define FP___PRINTF "%.16g"
#define FP___FMOD fmod
#define FP___STRTOD strtod
#define FUNC_SQRT sqrt
#define FUNC_FLOOR floor
#define FUNC_CEIL ceil
-#define FUNC_ROUND round
#define FUNC_RINT rint
-#define FUNC_TRUNC trunc
#define FUNC_EXP exp
+#define FUNC_LOG log
+#define FUNC_REMAINDER remainder
+
+#ifdef HAVE_ROUND
+#define FUNC_ROUND round
+#else
+#undef FUNC_ROUND
+#endif
+
+#ifdef HAVE_TRUNC
+#define FUNC_TRUNC round
+#else
+#undef FUNC_TRUNC
+#endif
+
#ifdef HAVE_EXP2
#define FUNC_EXP2 exp2
#else
-#define FUNC_EXP2(x) exp((x) * log(2))
+#define FUNC_EXP2(x) exp((x) * log(2.0))
#endif
+
#ifdef HAVE_EXP10
#define FUNC_EXP10 exp10
#else
-#define FUNC_EXP10(x) exp((x) * log(10))
+#define FUNC_EXP10(x) exp((x) * log(10.0))
#endif
-#define FUNC_LOG log
+
#ifdef HAVE_LOG2
#define FUNC_LOG2 log2
#else
-#define FUNC_LOG2(x) (log(x) / log(2))
+#define FUNC_LOG2(x) (log(x) / log(2.0))
#endif
+
#ifdef HAVE_LOG10
#define FUNC_LOG10 log10
#else
-#define FUNC_LOG10(x) (log(x) / log(10))
-#endif
-#define FUNC_REMAINDER remainder
+#define FUNC_LOG10(x) (log(x) / log(10.0))
#endif
+#endif /* defined(__USE_ISOC99) */
+
+
#include <stdlib.h>
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 260 "../main/ast_expr2.y"
+#line 305 "../main/ast_expr2.y"
{
struct val *val;
struct expr_node *arglist;
}
/* Line 187 of yacc.c. */
-#line 409 "../main/ast_expr2.c"
+#line 454 "../main/ast_expr2.c"
YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
/* Copy the second part of user declarations. */
-#line 265 "../main/ast_expr2.y"
+#line 310 "../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 482 "../main/ast_expr2.c"
#ifdef short
# undef short
/* 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, 336, 336, 344, 351, 352, 361, 367, 368, 372,
+ 376, 380, 384, 388, 392, 396, 400, 404, 408, 412,
+ 416, 420, 424, 428, 432, 436, 440
};
#endif
switch (yytype)
{
case 4: /* "TOK_COLONCOLON" */
-#line 285 "../main/ast_expr2.y"
+#line 330 "../main/ast_expr2.y"
{ free_value((yyvaluep->val)); };
-#line 1390 "../main/ast_expr2.c"
+#line 1435 "../main/ast_expr2.c"
break;
case 5: /* "TOK_COND" */
-#line 285 "../main/ast_expr2.y"
+#line 330 "../main/ast_expr2.y"
{ free_value((yyvaluep->val)); };
-#line 1395 "../main/ast_expr2.c"
+#line 1440 "../main/ast_expr2.c"
break;
case 6: /* "TOK_OR" */
-#line 285 "../main/ast_expr2.y"
+#line 330 "../main/ast_expr2.y"
{ free_value((yyvaluep->val)); };
-#line 1400 "../main/ast_expr2.c"
+#line 1445 "../main/ast_expr2.c"
break;
case 7: /* "TOK_AND" */
-#line 285 "../main/ast_expr2.y"
+#line 330 "../main/ast_expr2.y"
{ free_value((yyvaluep->val)); };
-#line 1405 "../main/ast_expr2.c"
+#line 1450 "../main/ast_expr2.c"
break;
case 8: /* "TOK_NE" */
-#line 285 "../main/ast_expr2.y"
+#line 330 "../main/ast_expr2.y"
{ free_value((yyvaluep->val)); };
-#line 1410 "../main/ast_expr2.c"
+#line 1455 "../main/ast_expr2.c"
break;
case 9: /* "TOK_LE" */
-#line 285 "../main/ast_expr2.y"
+#line 330 "../main/ast_expr2.y"
{ free_value((yyvaluep->val)); };
-#line 1415 "../main/ast_expr2.c"
+#line 1460 "../main/ast_expr2.c"
break;
case 10: /* "TOK_GE" */
-#line 285 "../main/ast_expr2.y"
+#line 330 "../main/ast_expr2.y"
{ free_value((yyvaluep->val)); };
-#line 1420 "../main/ast_expr2.c"
+#line 1465 "../main/ast_expr2.c"
break;
case 11: /* "TOK_LT" */
-#line 285 "../main/ast_expr2.y"
+#line 330 "../main/ast_expr2.y"
{ free_value((yyvaluep->val)); };
-#line 1425 "../main/ast_expr2.c"
+#line 1470 "../main/ast_expr2.c"
break;
case 12: /* "TOK_GT" */
-#line 285 "../main/ast_expr2.y"
+#line 330 "../main/ast_expr2.y"
{ free_value((yyvaluep->val)); };
-#line 1430 "../main/ast_expr2.c"
+#line 1475 "../main/ast_expr2.c"
break;
case 13: /* "TOK_EQ" */
-#line 285 "../main/ast_expr2.y"
+#line 330 "../main/ast_expr2.y"
{ free_value((yyvaluep->val)); };
-#line 1435 "../main/ast_expr2.c"
+#line 1480 "../main/ast_expr2.c"
break;
case 14: /* "TOK_MINUS" */
-#line 285 "../main/ast_expr2.y"
+#line 330 "../main/ast_expr2.y"
{ free_value((yyvaluep->val)); };
-#line 1440 "../main/ast_expr2.c"
+#line 1485 "../main/ast_expr2.c"
break;
case 15: /* "TOK_PLUS" */
-#line 285 "../main/ast_expr2.y"
+#line 330 "../main/ast_expr2.y"
{ free_value((yyvaluep->val)); };
-#line 1445 "../main/ast_expr2.c"
+#line 1490 "../main/ast_expr2.c"
break;
case 16: /* "TOK_MOD" */
-#line 285 "../main/ast_expr2.y"
+#line 330 "../main/ast_expr2.y"
{ free_value((yyvaluep->val)); };
-#line 1450 "../main/ast_expr2.c"
+#line 1495 "../main/ast_expr2.c"
break;
case 17: /* "TOK_DIV" */
-#line 285 "../main/ast_expr2.y"
+#line 330 "../main/ast_expr2.y"
{ free_value((yyvaluep->val)); };
-#line 1455 "../main/ast_expr2.c"
+#line 1500 "../main/ast_expr2.c"
break;
case 18: /* "TOK_MULT" */
-#line 285 "../main/ast_expr2.y"
+#line 330 "../main/ast_expr2.y"
{ free_value((yyvaluep->val)); };
-#line 1460 "../main/ast_expr2.c"
+#line 1505 "../main/ast_expr2.c"
break;
case 19: /* "TOK_COMPL" */
-#line 285 "../main/ast_expr2.y"
+#line 330 "../main/ast_expr2.y"
{ free_value((yyvaluep->val)); };
-#line 1465 "../main/ast_expr2.c"
+#line 1510 "../main/ast_expr2.c"
break;
case 20: /* "TOK_EQTILDE" */
-#line 285 "../main/ast_expr2.y"
+#line 330 "../main/ast_expr2.y"
{ free_value((yyvaluep->val)); };
-#line 1470 "../main/ast_expr2.c"
+#line 1515 "../main/ast_expr2.c"
break;
case 21: /* "TOK_COLON" */
-#line 285 "../main/ast_expr2.y"
+#line 330 "../main/ast_expr2.y"
{ free_value((yyvaluep->val)); };
-#line 1475 "../main/ast_expr2.c"
+#line 1520 "../main/ast_expr2.c"
break;
case 22: /* "TOK_LP" */
-#line 285 "../main/ast_expr2.y"
+#line 330 "../main/ast_expr2.y"
{ free_value((yyvaluep->val)); };
-#line 1480 "../main/ast_expr2.c"
+#line 1525 "../main/ast_expr2.c"
break;
case 23: /* "TOK_RP" */
-#line 285 "../main/ast_expr2.y"
+#line 330 "../main/ast_expr2.y"
{ free_value((yyvaluep->val)); };
-#line 1485 "../main/ast_expr2.c"
+#line 1530 "../main/ast_expr2.c"
break;
case 24: /* "TOKEN" */
-#line 285 "../main/ast_expr2.y"
+#line 330 "../main/ast_expr2.y"
{ free_value((yyvaluep->val)); };
-#line 1490 "../main/ast_expr2.c"
+#line 1535 "../main/ast_expr2.c"
break;
case 28: /* "expr" */
-#line 285 "../main/ast_expr2.y"
+#line 330 "../main/ast_expr2.y"
{ free_value((yyvaluep->val)); };
-#line 1495 "../main/ast_expr2.c"
+#line 1540 "../main/ast_expr2.c"
break;
default:
switch (yyn)
{
case 2:
-#line 291 "../main/ast_expr2.y"
+#line 336 "../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 )
break;
case 3:
-#line 299 "../main/ast_expr2.y"
+#line 344 "../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("");
break;
case 4:
-#line 306 "../main/ast_expr2.y"
+#line 351 "../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 352 "../main/ast_expr2.y"
{struct expr_node *x = alloc_expr_node(AST_EXPR_NODE_VAL);
struct expr_node *t;
DESTROY((yyvsp[(2) - (3)].val));
break;
case 6:
-#line 316 "../main/ast_expr2.y"
+#line 361 "../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));
break;
case 7:
-#line 322 "../main/ast_expr2.y"
+#line 367 "../main/ast_expr2.y"
{(yyval.val) = (yyvsp[(1) - (1)].val);;}
break;
case 8:
-#line 323 "../main/ast_expr2.y"
+#line 368 "../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;
break;
case 9:
-#line 327 "../main/ast_expr2.y"
+#line 372 "../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;
break;
case 10:
-#line 331 "../main/ast_expr2.y"
+#line 376 "../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;
break;
case 11:
-#line 335 "../main/ast_expr2.y"
+#line 380 "../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;
break;
case 12:
-#line 339 "../main/ast_expr2.y"
+#line 384 "../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;
break;
case 13:
-#line 343 "../main/ast_expr2.y"
+#line 388 "../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;
break;
case 14:
-#line 347 "../main/ast_expr2.y"
+#line 392 "../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;
break;
case 15:
-#line 351 "../main/ast_expr2.y"
+#line 396 "../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;
break;
case 16:
-#line 355 "../main/ast_expr2.y"
+#line 400 "../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;
break;
case 17:
-#line 359 "../main/ast_expr2.y"
+#line 404 "../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;
break;
case 18:
-#line 363 "../main/ast_expr2.y"
+#line 408 "../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;
break;
case 19:
-#line 367 "../main/ast_expr2.y"
+#line 412 "../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;
break;
case 20:
-#line 371 "../main/ast_expr2.y"
+#line 416 "../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;
break;
case 21:
-#line 375 "../main/ast_expr2.y"
+#line 420 "../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;
break;
case 22:
-#line 379 "../main/ast_expr2.y"
+#line 424 "../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;
break;
case 23:
-#line 383 "../main/ast_expr2.y"
+#line 428 "../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;
break;
case 24:
-#line 387 "../main/ast_expr2.y"
+#line 432 "../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;
break;
case 25:
-#line 391 "../main/ast_expr2.y"
+#line 436 "../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;
break;
case 26:
-#line 395 "../main/ast_expr2.y"
+#line 440 "../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));
/* Line 1267 of yacc.c. */
-#line 2022 "../main/ast_expr2.c"
+#line 2067 "../main/ast_expr2.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
}
-#line 402 "../main/ast_expr2.y"
+#line 447 "../main/ast_expr2.y"
static struct expr_node *alloc_expr_node(enum node_type nt)
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);
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);
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);
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);