Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Extreme streamlining of fortran package macro.
Browse files Browse the repository at this point in the history
  • Loading branch information
kiwifb committed Nov 20, 2018
1 parent 2449240 commit 3185e91
Showing 1 changed file with 11 additions and 21 deletions.
32 changes: 11 additions & 21 deletions build/pkgs/gfortran/spkg-configure.m4
Original file line number Diff line number Diff line change
@@ -1,30 +1,20 @@
SAGE_SPKG_CONFIGURE([gfortran], [
AC_REQUIRE([AC_PROG_FC])
AC_REQUIRE([SAGE_SPKG_CONFIGURE_GCC])
AC_REQUIRE([AC_PROG_FC])
# Check that the Fortran compiler accepts free-format source code (as
# opposed to the older fixed-format style from Fortran 77).
# This helps verify the compiler works too, so if some idiot sets FC to
# /usr/bin/ls, we will at least know it's not a working Fortran
# compiler.
AC_FC_FREEFORM([], [
AC_MSG_NOTICE([Your Fortran compiler does not accept free-format source code])
AC_MSG_NOTICE([which means the compiler is either seriously broken, or])
AC_MSG_NOTICE([is too old to build Sage.])
sage_spkg_install_gfortran=yes])
# Special case: If we are already installing gcc then don't install
# gfortran since it's included
if test "x$sage_spkg_install_gcc" = "xyes" -o x$SAGE_INSTALL_GCC = xexists; then
sage_spkg_install_gfortran=no
else
# Check that the Fortran compiler accepts free-format source code (as
# opposed to the older fixed-format style from Fortran 77).
# This helps verify the compiler works too, so if some idiot sets FC to
# /usr/bin/ls, we will at least know it's not a working Fortran
# compiler.
if test -z "$FC"; then
sage_spkg_install_gfortran=yes
AC_MSG_NOTICE([A Fortran compiler couldn't be found])
AC_MSG_NOTICE([gfortran will be built])
else
# see http://www.gnu.org/software/hello/manual/autoconf/Fortran-Compiler.html
AC_FC_FREEFORM([], [
AC_MSG_NOTICE([Your Fortran compiler does not accept free-format source code])
AC_MSG_NOTICE([which means the compiler is either seriously broken, or])
AC_MSG_NOTICE([is too old to build Sage.])
AC_MSG_NOTICE([gfortran will be built])
sage_spkg_install_gfortran=yes
])
fi
fi
])

0 comments on commit 3185e91

Please sign in to comment.