Make the configure script more cache-friendly
Currently, the configure
script does not generate a valid config.status
file when using a cache file (e.g. config.cache
).
In particular,
rm -f config.cache config.status
./configure -C && mv config.status config.status.bu
./configure -C && diff -u config.status.bu config.status
tells that FPP_INCOPT
, FPP_DEFOPT
and FPP
are not set correctly after the reconfiguration with a cache file:
--- config.status.bu 2022-11-03 12:38:06.187409222 +0100
+++ config.status 2022-11-03 12:38:17.831229443 +0100
@@ -1033,10 +1033,10 @@
S["PERL"]="/usr/bin/perl"
S["with_fortran_FALSE"]="#"
S["with_fortran_TRUE"]=""
-S["FPP_INCOPT"]="-I"
-S["FPP_DEFOPT"]="-D"
+S["FPP_INCOPT"]=""
+S["FPP_DEFOPT"]=""
S["FPPFLAGS"]=""
-S["FPP"]="mpifort -E -cpp"
+S["FPP"]=""
S["FC_FPP_FLAG"]="-cpp"
S["FCFLAGS_f90"]=" -cpp"
S["ac_ct_FC"]="mpifort"
Apparently, the authors of starlink_fpp.m4
didn't have this scenario in mind when implementing the macros. This MR fixes one of the macros and introduces a workaround for another one.