We currently rely on an FMS library test to direct autoconf to prepend -lFMS to the LIBS flag. However, this conflicts with our explicit setting of LIBS, which contains multiple libraries which also rely on FMS, and must therefore precede -lFMS (in a POSIX-compliant linker, at least).
Unless we create new macros for every library - and find a way to do so for test functions with arguments - there is no way to control the ordering of these -l arguments. Therefore, we remove the FMS library test in the ice-ocean and AM2-coupled build for the time being, and explicitly set FMS in LIBS.
(We were already doing this in order to accommodate the other libraries, but this raised issues in Nvidia, which objected to the double-linking of FMS. We now only set FMS linking in LIBS.)
We currently rely on an FMS library test to direct autoconf to prepend
-lFMS
to theLIBS
flag. However, this conflicts with our explicit setting ofLIBS
, which contains multiple libraries which also rely on FMS, and must therefore precede-lFMS
(in a POSIX-compliant linker, at least).Unless we create new macros for every library - and find a way to do so for test functions with arguments - there is no way to control the ordering of these
-l
arguments. Therefore, we remove the FMS library test in the ice-ocean and AM2-coupled build for the time being, and explicitly set FMS inLIBS
.(We were already doing this in order to accommodate the other libraries, but this raised issues in Nvidia, which objected to the double-linking of FMS. We now only set FMS linking in
LIBS
.)