for example), Scilab build fails on an error on exp10.
This commit changes the detection of exp10:
* check if exp10 is available in the libm
* if it is the case, configure defines the symbol HAVE_EXP10
* otherwise, we define it ourself in core_math.h
/* Provide a macro to do exp10 */
like we did before in the configure.ac
# Provided by math.h
LDFLAGS="$LDFLAGS $LIBM"
-AC_CHECK_FUNCS([pow] [sqrt] [finite] [floor])
-
-AC_CHECK_FUNC([exp10],,[
- AC_DEFINE([log_10_],[2.3025850929940456840179914546844],[Provide a macro to do exp10])
- AC_DEFINE([exp10(x)],[exp( (log_10_) * (x) )],[Provide a macro to do exp10])
- ])
+AC_CHECK_FUNCS([pow] [sqrt] [finite] [floor] [exp10])
### If isinf exists or not (used to not be the case under Solaris)
### See bug #4164
#define M_PI 3.14159265358979323846
#endif
+#ifndef HAVE_EXP10
+#define log_10_ 2.3025850929940456840179914546844
+/* Provide a macro to do exp10 */
+#define exp10(x) exp( (log_10_) * (x) )
+#endif
#endif /* __BASE_MATH_H__ */
/* Define to 1 if you have the `endpwent' function. */
#undef HAVE_ENDPWENT
+/* Define to 1 if you have the `exp10' function. */
+#undef HAVE_EXP10
+
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
-/* Provide a macro to do exp10 */
-#undef exp10
-
/* Don't use getwd but getcwd */
#undef getwd
/* Provide a macro to do isinf */
#undef isinf
-/* Provide a macro to do exp10 */
-#undef log_10_
-
#ifdef DIR_SEPARATOR