mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-21 20:12:51 -08:00
configure.ac: detect feenableexcept with AC_CHECK_DECL
On Android feenableexcept is only declared as a macro, but not
present as a function.
This commit is contained in:
parent
d0cf3c86e4
commit
ca4eabea15
2 changed files with 54 additions and 6 deletions
55
src/configure
vendored
55
src/configure
vendored
|
|
@ -2198,6 +2198,52 @@ $as_echo "$ac_res" >&6; }
|
|||
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
|
||||
|
||||
} # ac_fn_c_find_uintX_t
|
||||
|
||||
# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
|
||||
# ---------------------------------------------
|
||||
# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
|
||||
# accordingly.
|
||||
ac_fn_c_check_decl ()
|
||||
{
|
||||
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
|
||||
as_decl_name=`echo $2|sed 's/ *(.*//'`
|
||||
as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
|
||||
$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
|
||||
if eval \${$3+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
$4
|
||||
int
|
||||
main ()
|
||||
{
|
||||
#ifndef $as_decl_name
|
||||
#ifdef __cplusplus
|
||||
(void) $as_decl_use;
|
||||
#else
|
||||
(void) $as_decl_name;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
eval "$3=yes"
|
||||
else
|
||||
eval "$3=no"
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
eval ac_res=\$$3
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
||||
$as_echo "$ac_res" >&6; }
|
||||
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
|
||||
|
||||
} # ac_fn_c_check_decl
|
||||
cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
|
@ -9319,14 +9365,15 @@ _ACEOF
|
|||
fi
|
||||
done
|
||||
|
||||
ac_fn_c_check_func "$LINENO" "feenableexcept" "ac_cv_func_feenableexcept"
|
||||
if test "x$ac_cv_func_feenableexcept" = xyes; then :
|
||||
ac_fn_c_check_decl "$LINENO" "feenableexcept" "ac_cv_have_decl_feenableexcept" "#include <fenv.h>
|
||||
"
|
||||
if test "x$ac_cv_have_decl_feenableexcept" = xyes; then :
|
||||
|
||||
$as_echo "#define HAVE_FEENABLEEXCEPT /**/" >>confdefs.h
|
||||
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: feenableexcept not provided: disabling floating point exceptions" >&5
|
||||
$as_echo "$as_me: WARNING: feenableexcept not provided: disabling floating point exceptions" >&2;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: feenableexcept not declared: disabling floating point exceptions" >&5
|
||||
$as_echo "$as_me: WARNING: feenableexcept not declared: disabling floating point exceptions" >&2;}
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -720,9 +720,10 @@ dnl !!! end autoscan
|
|||
AC_CHECK_FUNCS( [nanosleep alarm times select setenv putenv] \
|
||||
[lstat mkstemp sigprocmask isatty tzset] \
|
||||
[gettimeofday getrusage] )
|
||||
AC_CHECK_FUNC([feenableexcept],
|
||||
AC_CHECK_DECL([feenableexcept],
|
||||
[AC_DEFINE(HAVE_FEENABLEEXCEPT,[],[feenableexcept is available])],
|
||||
[AC_MSG_WARN(feenableexcept not provided: disabling floating point exceptions)])
|
||||
[AC_MSG_WARN(feenableexcept not declared: disabling floating point exceptions)],
|
||||
[#include <fenv.h>])
|
||||
|
||||
AC_CHECK_FUNCS( [expf logf sqrtf cosf sinf tanf sinhf coshf tanhf] \
|
||||
[floorf ceilf fabsf frexpf ldexpf log1p log1pf log1pl] \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue