From 95ee539d6d33710cee9bbe051436b2147cebd295 Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Sun, 16 Jun 2013 21:50:57 +0200 Subject: [PATCH] Configure: Added explicit check for math library header 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 --- 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 3ff2c467..8d056a2e 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], -- 2.11.4.GIT