dnl @synopsis AC_CXX_HAVE_COMPLEX dnl dnl If the compiler has complex, define HAVE_COMPLEX. dnl dnl @category Cxx dnl @author Todd Veldhuizen dnl @author Luc Maisonobe dnl @version 2004-02-04 dnl @license AllPermissive AC_DEFUN([AC_CXX_HAVE_COMPLEX], [AC_CACHE_CHECK(whether the compiler has complex, ac_cv_cxx_have_complex, [AC_REQUIRE([AC_CXX_NAMESPACES]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include #ifdef HAVE_NAMESPACES using namespace std; #endif],[complex a; complex b; return 0;], ac_cv_cxx_have_complex=yes, ac_cv_cxx_have_complex=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_have_complex" = yes; then AC_DEFINE(HAVE_COMPLEX,,[define if the compiler has complex]) fi ])