Mercurial > octave
diff aclocal.m4 @ 5854:68f8017ef077
[project @ 2006-06-12 15:54:27 by jwe]
author | jwe |
---|---|
date | Mon, 12 Jun 2006 15:54:27 +0000 |
parents | 034cdbd34c0a |
children | 8702f00329bf |
line wrap: on
line diff
--- a/aclocal.m4 Fri Jun 09 22:49:32 2006 +0000 +++ b/aclocal.m4 Mon Jun 12 15:54:27 2006 +0000 @@ -709,6 +709,27 @@ AC_DEFINE_UNQUOTED(CXX_ABI, $octave_cv_cxx_abi, [Define to the C++ ABI your compiler uses.]) ]) dnl +dnl Check to see if C++ reintrepret cast works for function pointers. +dnl +dnl OCTAVE_CXX_BROKEN_REINTERPRET_CAST +dnl +AC_DEFUN(OCTAVE_CXX_BROKEN_REINTERPRET_CAST, [ + AC_REQUIRE([AC_PROG_CXX]) + AC_LANG_PUSH(C++) + AC_CACHE_CHECK([for broken C++ reinterpret_cast], + octave_cv_cxx_broken_reinterpret_cast, [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <cmath>]], [[ + typedef double (*fptr) (double); + fptr psin = sin; + void *vptr = reinterpret_cast<void *> (psin); + psin = reinterpret_cast<fptr> (vptr);]])], + octave_cv_cxx_broken_reinterpret_cast=no, + octave_cv_cxx_broken_reinterpret_cast=yes)]) + if test $octave_cv_cxx_broken_reinterpret_cast = yes ; then + AC_DEFINE(CXX_BROKEN_REINTERPRET_CAST, 1, [Define if C++ reinterpret_cast fails for function pointers.]) +fi + AC_LANG_POP(C++)]) +dnl dnl Determine if mkdir accepts only one argument instead dnl of the usual 2. dnl AC_DEFUN(OCTAVE_MKDIR_TAKES_ONE_ARG,