This repository has been archived by the owner on Jan 30, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed a bit how SAGE_SPKG_CONFIGURE works:
Now, instead of being a macro that directly subsitutes the individual spkg checks, it's actually a higher-order macro that defines macros named SAGE_SPKG_CONFIGURE_<PKGNAME>. All of these macros are included in m4/sage_spkg_configures.ac so that they all get expanded, but the advantage of this is that individual packages' SAGE_SPKG_CONFIGURE can use AC_REQUIRE to ensure that other packages are configured as a prerequisite. This in gfortran to ensure that gcc is always configured first. Then we can disable gfortran if gcc is going to be installed.
- Loading branch information
Showing
3 changed files
with
36 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,33 @@ | ||
SAGE_SPKG_CONFIGURE([gfortran], [ | ||
AC_REQUIRE([AC_PROG_FC]) | ||
AC_REQUIRE([AC_PROG_FC]) | ||
AC_REQUIRE([SAGE_SPKG_CONFIGURE_GCC]) | ||
# 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 | ||
SAGE_MUST_INSTALL_GCC([a Fortran compiler is missing]) | ||
fi | ||
# 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"; 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 | ||
SAGE_MUST_INSTALL_GCC([a Fortran compiler is missing]) | ||
fi | ||
# 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.]) | ||
sage_spkg_install_gfortran=yes | ||
]) | ||
# 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.]) | ||
sage_spkg_install_gfortran=yes | ||
]) | ||
# Check compiler versions | ||
if test x$GFC != xyes; then | ||
sage_spkg_install_gfortran=yes | ||
# Check compiler versions | ||
if test x$GFC != xyes; then | ||
sage_spkg_install_gfortran=yes | ||
fi | ||
fi | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters