diff --git a/.ci/bb/breeze-mpim/test.all.clang b/.ci/bb/breeze-mpim/test.all.clang
index 5047123ae0923edda3abb004ec63861d24dac3bd..4b283c00550dfa201cc1a957b9cf2bfd57aae1a5 100755
--- a/.ci/bb/breeze-mpim/test.all.clang
+++ b/.ci/bb/breeze-mpim/test.all.clang
@@ -15,12 +15,18 @@ find src app \
   -name '*.h' -o -name '*.hpp' -o -name '*.c' -o -name '*.cpp' | \
     xargs -n 1 -P 8 clang-format --Werror --dry-run --verbose
 
-test -f "${top_srcdir}/configure" || "${top_srcdir}/autogen.sh"
+enable_maintainer_mode='no'
+if test ! -f "${top_srcdir}/configure"; then
+  "${top_srcdir}/autogen.sh"
+  # If there is no configure script, there are, most probably, no Fortran
+  # interface files, which are generated in the maintainer mode only:
+  enable_maintainer_mode='yes'
+fi
 
 "${top_srcdir}/configure" \
---disable-maintainer-mode \
 --enable-cf-interface \
 --enable-iso-c-interface \
+--enable-maintainer-mode="${enable_maintainer_mode}" \
 --enable-mpi \
 --enable-option-checking=fatal \
 --with-eccodes="${ECCODES_ROOT}" \
diff --git a/.ci/bb/breeze-mpim/test.all.nag b/.ci/bb/breeze-mpim/test.all.nag
index 11f82ac8aeefd7e6ab368bb864c863f3e7d77a35..991a28083aa00e8238c621b42e909c356d361391 100755
--- a/.ci/bb/breeze-mpim/test.all.nag
+++ b/.ci/bb/breeze-mpim/test.all.nag
@@ -12,7 +12,7 @@ init_nag626223
 test -f "${top_srcdir}/configure" || "${top_srcdir}/autogen.sh"
 
 # Create a distribution file with minimalistic configuration:
-"${top_srcdir}/configure"
+"${top_srcdir}/configure" --enable-maintainer-mode
 make -j8 dist
 
 # Create a subdirectory for further testing and switch to it:
diff --git a/.ci/bb/breeze-mpim/test.all.nv b/.ci/bb/breeze-mpim/test.all.nv
index 786ff18324a3a4ba029ffe9b0d9a1039575b23a7..db2017288608b730d6f806004b3e053dd3854f0d 100755
--- a/.ci/bb/breeze-mpim/test.all.nv
+++ b/.ci/bb/breeze-mpim/test.all.nv
@@ -9,6 +9,13 @@ top_srcdir=$(cd "${script_dir}/../../.."; pwd)
 . "${script_dir}/utils.sh"
 init_nv2130
 
+enable_maintainer_mode='no'
+if test ! -f "${top_srcdir}/configure"; then
+  # If there is no configure script, there are, most probably, no Fortran
+  # interface files, which are generated in the maintainer mode only:
+  enable_maintainer_mode='yes'
+fi
+
 # We want to check with the Debian version of Libtool, which is patched to avoid
 # overlinking:
 ( export PATH="/usr/bin:${PATH-}"
@@ -18,9 +25,9 @@ init_nv2130
   "${top_srcdir}/autogen.sh" )
 
 "${top_srcdir}/configure" \
---disable-maintainer-mode \
 --enable-cf-interface \
 --enable-iso-c-interface \
+--enable-maintainer-mode="${enable_maintainer_mode}" \
 --enable-mpi \
 --enable-option-checking=fatal \
 --with-eccodes="${ECCODES_ROOT}" \
diff --git a/.ci/bb/daint-cscs/test.all.cray b/.ci/bb/daint-cscs/test.all.cray
index 85a961807cafca02e810076cffb4b6c446fd1f68..064b71c3b3def355ae3a94af907488fa1e6c8f86 100755
--- a/.ci/bb/daint-cscs/test.all.cray
+++ b/.ci/bb/daint-cscs/test.all.cray
@@ -18,7 +18,13 @@ if test "x${PE_NETCDF_MODULE_NAME}" = 'xcray-netcdf'; then
   esac
 fi
 
-test -f "${top_srcdir}/configure" || "${top_srcdir}/autogen.sh"
+enable_maintainer_mode='no'
+if test ! -f "${top_srcdir}/configure"; then
+  "${top_srcdir}/autogen.sh"
+  # If there is no configure script, there are, most probably, no Fortran
+  # interface files, which are generated in the maintainer mode only:
+  enable_maintainer_mode='yes'
+fi
 
 # The configure script does not check the 'lib64' subdirectory, therefore we
 # run it with '--with-eccodes' and the following flags. Note that fixing this
@@ -31,9 +37,9 @@ CPPFLAGS="-I${ECCODES_ROOT}/include"
 LDFLAGS="-L${ECCODES_ROOT}/lib64"
 
 "${top_srcdir}/configure" \
---disable-maintainer-mode \
 --enable-cf-interface \
 --enable-iso-c-interface \
+--enable-maintainer-mode="${enable_maintainer_mode}" \
 --enable-mpi \
 --enable-option-checking=fatal \
 --with-eccodes \
diff --git a/.ci/bb/daint-cscs/test.all.pgi b/.ci/bb/daint-cscs/test.all.pgi
index c6d02c8521a455ba7a41f151a28964cc9b57e8cc..817be923be11c1551832a0d0e83982dae9094468 100755
--- a/.ci/bb/daint-cscs/test.all.pgi
+++ b/.ci/bb/daint-cscs/test.all.pgi
@@ -18,7 +18,13 @@ if test "x${PE_NETCDF_MODULE_NAME}" = 'xcray-netcdf'; then
   esac
 fi
 
-test -f "${top_srcdir}/configure" || "${top_srcdir}/autogen.sh"
+enable_maintainer_mode='no'
+if test ! -f "${top_srcdir}/configure"; then
+  "${top_srcdir}/autogen.sh"
+  # If there is no configure script, there are, most probably, no Fortran
+  # interface files, which are generated in the maintainer mode only:
+  enable_maintainer_mode='yes'
+fi
 
 # The configure script does not check the 'lib64' subdirectory, therefore we
 # run it with '--with-eccodes' and the following flags. Note that fixing this
@@ -31,9 +37,9 @@ CPPFLAGS="-I${ECCODES_ROOT}/include"
 LDFLAGS="-L${ECCODES_ROOT}/lib64"
 
 "${top_srcdir}/configure" \
---disable-maintainer-mode \
 --enable-cf-interface \
 --enable-iso-c-interface \
+--enable-maintainer-mode="${enable_maintainer_mode}" \
 --enable-mpi \
 --enable-option-checking=fatal \
 --with-eccodes \
diff --git a/.ci/bb/levante-dkrz/test.all.gcc b/.ci/bb/levante-dkrz/test.all.gcc
index a114e52c7f04cbc7978957a774498ab6acbd6238..e19fdb350f4735280c3574cb5145f735efbff5ec 100755
--- a/.ci/bb/levante-dkrz/test.all.gcc
+++ b/.ci/bb/levante-dkrz/test.all.gcc
@@ -9,7 +9,13 @@ top_srcdir=$(cd "${script_dir}/../../.."; pwd)
 . "${script_dir}/utils.sh"
 init_gcc1120
 
-test -f "${top_srcdir}/configure" || "${top_srcdir}/autogen.sh"
+enable_maintainer_mode='no'
+if test ! -f "${top_srcdir}/configure"; then
+  "${top_srcdir}/autogen.sh"
+  # If there is no configure script, there are, most probably, no Fortran
+  # interface files, which are generated in the maintainer mode only:
+  enable_maintainer_mode='yes'
+fi
 
 # The configure script does not check the 'lib64' subdirectory, therefore we
 # run it with '--with-eccodes' and the following flags. Note that fixing this
@@ -26,8 +32,8 @@ LDFLAGS="-L${ECCODES_ROOT}/lib64"
 # 'check_all_tests_passed' that we run at the end makes sure that the options
 # have been enabled and the corresponding tests have not been skipped.
 "${top_srcdir}/configure" \
---disable-maintainer-mode \
 --enable-iso-c-interface \
+--enable-maintainer-mode="${enable_maintainer_mode}" \
 --enable-mpi \
 --enable-option-checking=fatal \
 --with-eccodes \
diff --git a/.ci/bb/levante-dkrz/test.all.intel-classic b/.ci/bb/levante-dkrz/test.all.intel-classic
index 21c9e889d07941490439fe53b631531375a9f5c8..1383b9ac238b0da51372439761288346f9d6e4db 100755
--- a/.ci/bb/levante-dkrz/test.all.intel-classic
+++ b/.ci/bb/levante-dkrz/test.all.intel-classic
@@ -9,7 +9,13 @@ top_srcdir=$(cd "${script_dir}/../../.."; pwd)
 . "${script_dir}/utils.sh"
 init_intelclassic202150
 
-test -f "${top_srcdir}/configure" || "${top_srcdir}/autogen.sh"
+enable_maintainer_mode='no'
+if test ! -f "${top_srcdir}/configure"; then
+  "${top_srcdir}/autogen.sh"
+  # If there is no configure script, there are, most probably, no Fortran
+  # interface files, which are generated in the maintainer mode only:
+  enable_maintainer_mode='yes'
+fi
 
 # Create a subdirectory for building and switch to it:
 mkdir build && cd build
@@ -25,9 +31,9 @@ CPPFLAGS="-I${ECCODES_ROOT}/include"
 LDFLAGS="-L${ECCODES_ROOT}/lib64"
 
 "${top_srcdir}/configure" \
---disable-maintainer-mode \
 --enable-cf-interface \
 --enable-iso-c-interface \
+--enable-maintainer-mode="${enable_maintainer_mode}" \
 --enable-mpi \
 --enable-option-checking=fatal \
 --with-eccodes \
@@ -46,6 +52,10 @@ make -j8 check | tee tests/test-suite.log
 
 check_all_tests_passed tests/test-suite.log
 
-make -j8 distclean
+if test "x${enable_maintainer_mode}" = 'xyes'; then
+  make -j8 maintainer-clean
+else
+  make -j8 distclean
+fi
 
 check_no_files_in_cwd
diff --git a/.ci/bb/levante-dkrz/test.icon.gcc b/.ci/bb/levante-dkrz/test.icon.gcc
index 0b1a23e46f403a41360796d06441f4f7bf5fc581..263e52c76f2b14bb74b870319bb9c9540c72f434 100755
--- a/.ci/bb/levante-dkrz/test.icon.gcc
+++ b/.ci/bb/levante-dkrz/test.icon.gcc
@@ -14,7 +14,13 @@ init_gcc1120
 CFLAGS='-g -gdwarf-4 -march=native -mpc64 -O2'
 FCFLAGS='-fmodule-private -fimplicit-none -fmax-identifier-length=63 -Wall -Wcharacter-truncation -Wconversion -Wunderflow -Wunused-parameter -Wno-surprising -fall-intrinsics -g -march=native -mpc64 -fbacktrace -fbounds-check -fstack-protector-all -finit-real=nan -finit-integer=-2147483648 -finit-character=127 -O2 -std=f2008'
 
-test -f "${top_srcdir}/configure" || "${top_srcdir}/autogen.sh"
+if test ! -f "${top_srcdir}/configure"; then
+  "${top_srcdir}/autogen.sh"
+  # If there is no configure script, there are, most probably, no Fortran
+  # interface files, which are generated in the maintainer mode only. Therefore,
+  # we have to generate them before testing:
+  "${top_srcdir}/configure" --enable-maintainer-mode && make -C src mo_cdi.f90 && make distclean
+fi
 
 "${top_srcdir}/configure" \
 --disable-cdi-app \
diff --git a/.ci/bb/levante-dkrz/utils.sh b/.ci/bb/levante-dkrz/utils.sh
index 0be138ae34319d65eff6ce3ac47e7566ac4006c3..22ef4e395b589cb6b3a8e9511313a2edd8e9cef0 100644
--- a/.ci/bb/levante-dkrz/utils.sh
+++ b/.ci/bb/levante-dkrz/utils.sh
@@ -94,7 +94,7 @@ switch_for_module ()
 #
 init_env ()
 {
-  :
+  switch_for_module ruby/3.0.2-gcc-11.2.0
 }
 
 #