1 dnl @synopsis AC_CXX_HAVE_COMPLEX
3 dnl If the compiler has complex<T>, define HAVE_COMPLEX.
5 dnl @version $Id: ac_cxx_have_complex.m4,v 1.1 2005/01/07 02:52:49 norwin Exp $
6 dnl @author Todd Veldhuizen and Luc Maisonobe <luc@spaceroots.org>
8 AC_DEFUN([AC_CXX_HAVE_COMPLEX],
9 [AC_CACHE_CHECK(whether the compiler has complex<T>,
10 ac_cv_cxx_have_complex,
11 [AC_REQUIRE([AC_CXX_NAMESPACES])
14 AC_TRY_COMPILE([#include <complex>
15 #ifdef HAVE_NAMESPACES
17 #endif],[complex<float> a; complex<double> b; return 0;],
18 ac_cv_cxx_have_complex=yes, ac_cv_cxx_have_complex=no)
21 if test "$ac_cv_cxx_have_complex" = yes; then
22 AC_DEFINE(HAVE_COMPLEX,,[define if the compiler has complex<T>])