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

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

 



* 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


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux