Seems unnecessarily convoluted. Why not just have PETSC_HAVE_COMPLEX defined if either PETSC_HAVE_CXX_COMPLEX or PETSC_HAVE_C99_COMPLEX is defined in petscconf.h Why restrict knowledge of complex to certain files with #define PETSC_DESIRE_COMPLEX at the top? Barry