From: Christophe CURIS <[email protected]> Compilation will not work if the header is missing, so make sure it is present and compilable first. This can highligh sooner if a user forgot to install the corresponding dev package.
Signed-off-by: Christophe CURIS <[email protected]> --- m4/wm_libmath.m4 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/m4/wm_libmath.m4 b/m4/wm_libmath.m4 index 3ff2c46..8d056a2 100644 --- a/m4/wm_libmath.m4 +++ b/m4/wm_libmath.m4 @@ -22,7 +22,9 @@ # Checks the needed library link flags needed to have math lib # Sets variable LIBM with the appropriates flags AC_DEFUN_ONCE([WM_CHECK_LIBM], -[AC_CHECK_FUNC(atan, +[AC_CHECK_HEADER([math.h], [], + [AC_MSG_ERROR([header for math library not found])]) +AC_CHECK_FUNC(atan, [LIBM=], [AC_CHECK_LIB(m, [atan], [LIBM=-lm], -- 1.7.10.4 -- To unsubscribe, send mail to [email protected].
