From 15e92535d343dd4ae92150270f6d393f74595d4d Mon Sep 17 00:00:00 2001 From: Francois-Xavier Coudert Date: Fri, 19 Jan 2007 08:12:16 +0100 Subject: re PR libfortran/26893 ([4.1 only] kinds.h not generated, causing failure) PR libfortran/26893 * acinclude.m4 (LIBGFOR_WORKING_GFORTRAN): New check. * configure.ac: Add call to LIBGFOR_WORKING_GFORTRAN. * configure: Regenerate. * config.h.in: Regenerate because it was forgottent in the last commit. Co-Authored-By: Tobias Burnus From-SVN: r120949 --- libgfortran/acinclude.m4 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'libgfortran/acinclude.m4') diff --git a/libgfortran/acinclude.m4 b/libgfortran/acinclude.m4 index 73d67e18784..3c849faca19 100644 --- a/libgfortran/acinclude.m4 +++ b/libgfortran/acinclude.m4 @@ -1,6 +1,22 @@ m4_include(../config/acx.m4) m4_include(../config/no-executables.m4) +dnl Check that we have a working GNU Fortran compiler +AC_DEFUN([LIBGFOR_WORKING_GFORTRAN], [ +AC_MSG_CHECKING([whether the GNU Fortran compiler is working]) +AC_LANG_PUSH([Fortran]) +AC_COMPILE_IFELSE([[ + program foo + real, parameter :: bar = sin (12.34 / 2.5) + end program foo]], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AC_MSG_ERROR([GNU Fortran is not working; please report a bug in http://gcc.gnu.org/bugzilla, attaching $PWD/config.log]) + ]) +AC_LANG_POP([Fortran]) +]) + + dnl Check: dnl * If we have gettimeofday; dnl * If we have struct timezone for use in calling it; -- cgit v1.2.1