autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I check if C++ and Fortran compiler works ?


From: Ralf Wildenhues
Subject: Re: How can I check if C++ and Fortran compiler works ?
Date: Mon, 22 Feb 2010 21:55:00 +0100
User-agent: Mutt/1.5.20 (2009-10-28)

* Dr. David Kirkby wrote on Mon, Feb 22, 2010 at 01:04:20PM CET:
> Ralf Wildenhues wrote:
> ># rw_PROG_CXX_WORKS
> ># Check whether the C++ compiler works.
> >AC_DEFUN([rw_PROG_CXX_WORKS],
> >[AC_REQUIRE([AC_PROG_CXX])dnl
> >AC_CACHE_CHECK([whether the C++ compiler works],
> >               [rw_cv_prog_cxx_works],
> >               [AC_LANG_PUSH([C++])
> >                AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
> >                               [rw_cv_prog_cxx_works=yes],
> >                               [rw_cv_prog_cxx_works=no])
> >                AC_LANG_POP([C++])])
> >])
> 
> Thank you. I'll add that macro and something to configure.ac to
> ensure the C++ compiler is at least semi sensible. I'm really not
> sure what was causing the error message "complex.h: present but
> cannot be compiled" but there is at least some suspicion the person
> who got this error did not have a working C++ compiler, so it seems
> sensible to check that.

Well, for a detailed answer one needs to see the config.log contents
for this error.

> Could you do likewise for Fortran?

You can do that yourself, for Fortran 77:
  s/C++/Fortran 77/g
  s/CXX/F77/g
  s/cxx/f77/g

and Fortran:
  s/C++/Fortran/g
  s/CXX/FC/g
  s/cxx/fc/g

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]