autoconf
[Top][All Lists]
Advanced

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

AC_FC_MODULE_FLAG


From: Jim Edwards
Subject: AC_FC_MODULE_FLAG
Date: Wed, 6 Jul 2011 12:00:13 -0600

When using the lahey fortran compiler the flag -M is used as the path to
modules, but its also the path to where new modules should be written.
So if you are referencing modules in a read-only directory using the -M flag
will cause your program to fail.   I think that the solution is to
test for -I first (that's also the most common result, so it would make
sense to test first I think)

--- fortran.m4    (revision 327)
+++ fortran.m4    (working copy)
@@ -618,7 +618,7 @@
   [cd ..
    ac_fc_module_flag_FCFLAGS_save=$FCFLAGS
    # Flag ordering is significant for gfortran and Sun.
-   for ac_flag in -M -I '-I ' '-M ' -p '-mod ' '-module ' '-Am -I'; do
+   for ac_flag in -I '-mod ' -I '-I ' '-M ' -p '-module ' '-Am -I'; do
      # Add the flag twice to prevent matching an output flag.
      FCFLAGS="$ac_fc_module_flag_FCFLAGS_save ${ac_flag}conftest.dir
${ac_flag}conftest.dir"
      AC_COMPILE_IFELSE([[


reply via email to

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