# HG changeset patch # User Rik # Date 1344627571 25200 # Node ID e412d18d4fa5575faf2f3e1d902ab747deb119d1 # Parent f4684192158ec391b9bc9994e813bbebf7a2882d configure.ac: Allow caching of EXCEPTION_IN_MATH test. * configure.ac: Allow caching of EXCEPTION_IN_MATH test. diff -r f4684192158e -r e412d18d4fa5 configure.ac --- a/configure.ac Fri Aug 10 12:19:59 2012 -0700 +++ b/configure.ac Fri Aug 10 12:39:31 2012 -0700 @@ -2003,15 +2003,24 @@ AC_FUNC_CLOSEDIR_VOID -## Return type of matherr() -AC_MSG_CHECKING([for struct exception in math.h]) -AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[struct exception *x; x->type; x->name;]])], - [AC_MSG_RESULT(yes) - AC_DEFINE(EXCEPTION_IN_MATH, 1, - [Define to 1 if your math.h declares struct exception for matherr().])], - [AC_MSG_RESULT(no)]) - +## Check return type of matherr() +AC_CACHE_CHECK([for struct exception in math.h], + [octave_cv_func_matherr_type], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include + ]], [[ + struct exception *x; + x->type; + x->name; + ]])], + octave_cv_func_matherr_type=yes, + octave_cv_func_matherr_type=no) + ]) +if test $octave_cv_func_matherr_type = "yes"; then + AC_DEFINE(EXCEPTION_IN_MATH, 1, + [Define to 1 if math.h declares struct exception for matherr().]) +fi + ## Signal stuff. AC_CHECK_DECLS([sys_siglist], [], [],