Skip to content

Commit

Permalink
Autoconf: Ice-ocean autodetect FMS API
Browse files Browse the repository at this point in the history
configure.ice_ocean.ac was modified to automatically detect the FMS API.
This replaces the --framework flag, which forced the user to manually
select the appropriate config_src/infra directory.  Now, the appropriate
directory is based on the FMS library detected during configuration.

This will prevent possible FMS1/2 API mixups during compilation.

The ice-ocean and AM2-coupler configure.ac files have also been moved
out of ac/ and into their respective directories.
  • Loading branch information
marshallward committed Jan 24, 2025
1 parent 200ce8e commit f6ba0a5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion coupled_AM2_LM3_SIS2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ LM3_BUILD ?= ../shared/LM3/build
# Autoconf configuration
MOM_CODEBASE ?= ../src/MOM6
MAKEFILE_IN ?= $(MOM_CODEBASE)/ac/Makefile.in
CONFIGURE_AC ?= ../ac/configure.coupled.ac
CONFIGURE_AC ?= configure.coupled.ac
M4DIR ?= $(MOM_CODEBASE)/ac/m4
MAKEDEP ?= $(MOM_CODEBASE)/ac/makedep

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion ice_ocean_SIS2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ LAND_BUILD ?= ../shared/land_null/build
# Autoconf configuration
MOM_CODEBASE ?= ../src/MOM6
MAKEFILE_IN ?= $(MOM_CODEBASE)/ac/Makefile.in
CONFIGURE_AC ?= ../ac/configure.ice_ocean.ac
CONFIGURE_AC ?= configure.ice_ocean.ac
M4DIR ?= $(MOM_CODEBASE)/ac/m4
MAKEDEP ?= $(MOM_CODEBASE)/ac/makedep

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,14 @@ AC_COMPILE_IFELSE(
)


# Determine the FMS IO implementation.
AX_FC_CHECK_MODULE([fms2_io_mod], [
MODEL_FRAMEWORK=${srcdir}/config_src/infra/FMS2
],[
MODEL_FRAMEWORK=${srcdir}/config_src/infra/FMS1
])


# Verify that Python is available
AC_PATH_PROGS([PYTHON], [python python3 python2], [
AC_MSG_ERROR([Could not find python.])
Expand Down

0 comments on commit f6ba0a5

Please # to comment.