comparison configure.ac @ 15143:e412d18d4fa5

configure.ac: Allow caching of EXCEPTION_IN_MATH test. * configure.ac: Allow caching of EXCEPTION_IN_MATH test.
author Rik <rik@octave.org>
date Fri, 10 Aug 2012 12:39:31 -0700
parents f4684192158e
children 142e377e7e28
comparison
equal deleted inserted replaced
15142:f4684192158e 15143:e412d18d4fa5
2001 2001
2002 AC_CHECK_FUNCS(getpwnam, [], [AC_CHECK_LIB(sun, getpwnam)]) 2002 AC_CHECK_FUNCS(getpwnam, [], [AC_CHECK_LIB(sun, getpwnam)])
2003 2003
2004 AC_FUNC_CLOSEDIR_VOID 2004 AC_FUNC_CLOSEDIR_VOID
2005 2005
2006 ## Return type of matherr() 2006 ## Check return type of matherr()
2007 AC_MSG_CHECKING([for struct exception in math.h]) 2007 AC_CACHE_CHECK([for struct exception in math.h],
2008 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]], 2008 [octave_cv_func_matherr_type],
2009 [[struct exception *x; x->type; x->name;]])], 2009 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2010 [AC_MSG_RESULT(yes) 2010 #include <math.h>
2011 AC_DEFINE(EXCEPTION_IN_MATH, 1, 2011 ]], [[
2012 [Define to 1 if your math.h declares struct exception for matherr().])], 2012 struct exception *x;
2013 [AC_MSG_RESULT(no)]) 2013 x->type;
2014 2014 x->name;
2015 ]])],
2016 octave_cv_func_matherr_type=yes,
2017 octave_cv_func_matherr_type=no)
2018 ])
2019 if test $octave_cv_func_matherr_type = "yes"; then
2020 AC_DEFINE(EXCEPTION_IN_MATH, 1,
2021 [Define to 1 if math.h declares struct exception for matherr().])
2022 fi
2023
2015 ## Signal stuff. 2024 ## Signal stuff.
2016 2025
2017 AC_CHECK_DECLS([sys_siglist], [], [], 2026 AC_CHECK_DECLS([sys_siglist], [], [],
2018 [#include <signal.h> 2027 [#include <signal.h>
2019 /* NetBSD declares sys_siglist in unistd.h. */ 2028 /* NetBSD declares sys_siglist in unistd.h. */