Skip to content

Commit

Permalink
Per #2760, fix the configure.ac settings for --enable-all to actually…
Browse files Browse the repository at this point in the history
… make it work.
  • Loading branch information
JohnHalleyGotway committed Dec 14, 2023
1 parent 062ffeb commit 02a83b5
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/jobs/build_docker_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ time_command docker build -t ${DOCKERHUB_TAG} \
--build-arg SOURCE_BRANCH \
--build-arg MET_BASE_REPO \
--build-arg MET_BASE_TAG \
--build-arg MET_ENABLE_OPTS \
--build-arg MET_CONFIG_OPTS \
-f $DOCKERFILE_PATH ${GITHUB_WORKSPACE}
if [ $? != 0 ]; then
cat ${GITHUB_WORKSPACE}/docker_build.log
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/compiling.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Compiling
name: Compilation Options

# Test MET configuration options for all tags
# Test MET configuration/compilation options for all tags

on:

Expand All @@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
enable_opts:
config_opts:
- ''
- '--enable-all'
- '--enable-grib2'
Expand All @@ -46,7 +46,7 @@ jobs:
SOURCE_BRANCH: ${{ needs.job_control.outputs.branch_name }}
MET_BASE_REPO: ${{ needs.job_control.outputs.met_base_repo }}
MET_BASE_TAG: ${{ needs.job_control.outputs.met_base_tag }}
MET_ENABLE_OPTS: ${{ matrix.enable_opts }}
MET_CONFIG_OPTS: ${{ matrix.config_opts }}

- name: Copy all build log files into logs directory
if: always()
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ jobs:
SOURCE_BRANCH: ${{ needs.job_control.outputs.branch_name }}
MET_BASE_REPO: ${{ needs.job_control.outputs.met_base_repo }}
MET_BASE_TAG: ${{ needs.job_control.outputs.met_base_tag }}
MET_CONFIG_OPTS: '--enable-all'

- name: Copy all build log files into logs directory
if: always()
Expand Down
24 changes: 12 additions & 12 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -5885,7 +5885,7 @@ else $as_nop
fi


if test "x$ENABLE_LIDAR2NC" = "xyes"; then
if test "x$ENABLE_LIDAR2NC" = "xyes" || test "x$ENABLE_ALL" = "xyes"; then
ENABLE_LIDAR2NC_TRUE=
ENABLE_LIDAR2NC_FALSE='#'
else
Expand All @@ -5894,7 +5894,7 @@ else
fi


if test "x$ENABLE_ALL" = "xyes" || test "x$ENABLE_LIDAR2NC" = "xyes"; then
if test "x$ENABLE_LIDAR2NC" = "xyes" || test "x$ENABLE_ALL" = "xyes"; then

printf "%s\n" "#define ENABLE_LIDAR2NC /**/" >>confdefs.h

Expand Down Expand Up @@ -6658,7 +6658,7 @@ else $as_nop
fi


if test "x$ENABLE_MODIS" = "xyes"; then
if test "x$ENABLE_MODIS" = "xyes" || test "x$ENABLE_ALL" = "xyes"; then
ENABLE_MODIS_TRUE=
ENABLE_MODIS_FALSE='#'
else
Expand All @@ -6667,7 +6667,7 @@ else
fi


if test "x$ENABLE_ALL" = "xyes" || test "x$ENABLE_MODIS" = "xyes"; then
if test "x$ENABLE_MODIS" = "xyes" || test "x$ENABLE_ALL" = "xyes"; then

printf "%s\n" "#define ENABLE_MODIS /**/" >>confdefs.h

Expand All @@ -6693,7 +6693,7 @@ else $as_nop
fi


if test "x$ENABLE_MODE_GRAPHICS" = "xyes"; then
if test "x$ENABLE_MODE_GRAPHICS" = "xyes" || test "x$ENABLE_ALL" = "xyes"; then
ENABLE_MODE_GRAPHICS_TRUE=
ENABLE_MODE_GRAPHICS_FALSE='#'
else
Expand All @@ -6702,7 +6702,7 @@ else
fi


if test "x$ENABLE_ALL" = "xyes" || test "x$ENABLE_MODE_GRAPHICS" = "xyes"; then
if test "x$ENABLE_MODE_GRAPHICS" = "xyes" || test "x$ENABLE_ALL" = "xyes"; then

printf "%s\n" "#define ENABLE_MODE_GRAPHICS /**/" >>confdefs.h

Expand Down Expand Up @@ -6833,7 +6833,7 @@ else $as_nop
fi


if test "x$ENABLE_GRIB2" = "xyes"; then
if test "x$ENABLE_GRIB2" = "xyes" || test "x$ENABLE_ALL" = "xyes"; then
ENABLE_GRIB2_TRUE=
ENABLE_GRIB2_FALSE='#'
else
Expand All @@ -6850,7 +6850,7 @@ else
fi


if test "x$ENABLE_ALL" = "xyes" || test "x$ENABLE_GRIB2" = "xyes"; then
if test "x$ENABLE_GRIB2" = "xyes" || test "x$ENABLE_ALL" = "xyes"; then

printf "%s\n" "#define ENABLE_GRIB2 /**/" >>confdefs.h

Expand Down Expand Up @@ -6891,7 +6891,7 @@ else $as_nop
fi


if test "x$ENABLE_PYTHON" = "xyes"; then
if test "x$ENABLE_PYTHON" = "xyes" || test "x$ENABLE_ALL" = "xyes"; then
ENABLE_PYTHON_TRUE=
ENABLE_PYTHON_FALSE='#'
else
Expand All @@ -6900,7 +6900,7 @@ else
fi


if test "x$ENABLE_ALL" = "xyes" || test "x$ENABLE_PYTHON" = "xyes"; then
if test "x$ENABLE_PYTHON" = "xyes" || test "x$ENABLE_ALL" = "xyes"; then

printf "%s\n" "#define ENABLE_PYTHON /**/" >>confdefs.h

Expand Down Expand Up @@ -6933,7 +6933,7 @@ else $as_nop
fi


if test "x$ENABLE_UGRID" = "xyes"; then
if test "x$ENABLE_UGRID" = "xyes" || test "x$ENABLE_ALL" = "xyes"; then
ENABLE_UGRID_TRUE=
ENABLE_UGRID_FALSE='#'
else
Expand All @@ -6942,7 +6942,7 @@ else
fi


if test "x$ENABLE_ALL" = "xyes" || test "x$ENABLE_UGRID" = "xyes"; then
if test "x$ENABLE_UGRID" = "xyes" || test "x$ENABLE_ALL" = "xyes"; then

printf "%s\n" "#define ENABLE_UGRID /**/" >>confdefs.h

Expand Down
24 changes: 12 additions & 12 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -518,9 +518,9 @@ AC_ARG_ENABLE(lidar2nc,
[ENABLE_LIDAR2NC="no"]
)

AM_CONDITIONAL([ENABLE_LIDAR2NC], [test "x$ENABLE_LIDAR2NC" = "xyes"])
AM_CONDITIONAL([ENABLE_LIDAR2NC], [test "x$ENABLE_LIDAR2NC" = "xyes" || test "x$ENABLE_ALL" = "xyes"])

if test "x$ENABLE_ALL" = "xyes" || test "x$ENABLE_LIDAR2NC" = "xyes"; then
if test "x$ENABLE_LIDAR2NC" = "xyes" || test "x$ENABLE_ALL" = "xyes"; then
AC_DEFINE([ENABLE_LIDAR2NC], [], ["build lidar2nc"])
AC_MSG_NOTICE([lidar2nc will be compiled])
else
Expand Down Expand Up @@ -961,9 +961,9 @@ AC_ARG_ENABLE(modis,
[ENABLE_MODIS="no"]
)

AM_CONDITIONAL([ENABLE_MODIS], [test "x$ENABLE_MODIS" = "xyes"])
AM_CONDITIONAL([ENABLE_MODIS], [test "x$ENABLE_MODIS" = "xyes" || test "x$ENABLE_ALL" = "xyes"])

if test "x$ENABLE_ALL" = "xyes" || test "x$ENABLE_MODIS" = "xyes"; then
if test "x$ENABLE_MODIS" = "xyes" || test "x$ENABLE_ALL" = "xyes"; then
AC_DEFINE([ENABLE_MODIS], [], ["build modis"])
AC_MSG_NOTICE([modis will be compiled])
else
Expand All @@ -981,9 +981,9 @@ AC_ARG_ENABLE(mode_graphics,
[ENABLE_MODE_GRAPHICS="no"]
)

AM_CONDITIONAL([ENABLE_MODE_GRAPHICS], [test "x$ENABLE_MODE_GRAPHICS" = "xyes"])
AM_CONDITIONAL([ENABLE_MODE_GRAPHICS], [test "x$ENABLE_MODE_GRAPHICS" = "xyes" || test "x$ENABLE_ALL" = "xyes"])

if test "x$ENABLE_ALL" = "xyes" || test "x$ENABLE_MODE_GRAPHICS" = "xyes"; then
if test "x$ENABLE_MODE_GRAPHICS" = "xyes" || test "x$ENABLE_ALL" = "xyes"; then
AC_DEFINE([ENABLE_MODE_GRAPHICS], [], ["build mode_graphics"])
AC_MSG_NOTICE([mode_graphics will be compiled])
else
Expand Down Expand Up @@ -1061,10 +1061,10 @@ AC_ARG_ENABLE(grib2,
[ENABLE_GRIB2="no"]
)

AM_CONDITIONAL([ENABLE_GRIB2], [test "x$ENABLE_GRIB2" = "xyes"])
AM_CONDITIONAL([ENABLE_GRIB2], [test "x$ENABLE_GRIB2" = "xyes" || test "x$ENABLE_ALL" = "xyes"])
AM_CONDITIONAL([GRIB2CLIB_NAME_SET], [test ! -z "$GRIB2CLIB_NAME"])

if test "x$ENABLE_ALL" = "xyes" || test "x$ENABLE_GRIB2" = "xyes"; then
if test "x$ENABLE_GRIB2" = "xyes" || test "x$ENABLE_ALL" = "xyes"; then
AC_DEFINE([ENABLE_GRIB2], [], ["build GRIB2 support"])
AC_MSG_NOTICE([GRIB2 support will be compiled])
CPPFLAGS="${CPPFLAGS} -DWITH_GRIB2"
Expand Down Expand Up @@ -1096,9 +1096,9 @@ AC_ARG_ENABLE(python,
[ENABLE_PYTHON="no"]
)

AM_CONDITIONAL([ENABLE_PYTHON], [test "x$ENABLE_PYTHON" = "xyes"])
AM_CONDITIONAL([ENABLE_PYTHON], [test "x$ENABLE_PYTHON" = "xyes" || test "x$ENABLE_ALL" = "xyes"])

if test "x$ENABLE_ALL" = "xyes" || test "x$ENABLE_PYTHON" = "xyes"; then
if test "x$ENABLE_PYTHON" = "xyes" || test "x$ENABLE_ALL" = "xyes"; then
AC_DEFINE([ENABLE_PYTHON], [], ["build Python embedding support"])
AC_MSG_NOTICE([Python embedding support will be compiled])
CPPFLAGS="${CPPFLAGS} -DWITH_PYTHON"
Expand All @@ -1123,9 +1123,9 @@ AC_ARG_ENABLE(ugrid,
[ENABLE_UGRID="no"]
)

AM_CONDITIONAL([ENABLE_UGRID], [test "x$ENABLE_UGRID" = "xyes"])
AM_CONDITIONAL([ENABLE_UGRID], [test "x$ENABLE_UGRID" = "xyes" || test "x$ENABLE_ALL" = "xyes"])

if test "x$ENABLE_ALL" = "xyes" || test "x$ENABLE_UGRID" = "xyes"; then
if test "x$ENABLE_UGRID" = "xyes" || test "x$ENABLE_ALL" = "xyes"; then
AC_DEFINE([ENABLE_UGRID], [], ["build unstructured grid support"])
AC_MSG_NOTICE([unstructured grid support will be compiled])
CPPFLAGS="${CPPFLAGS} -I${MET_ATLASINC} -I${MET_ECKITINC} -DWITH_UGRID"
Expand Down
10 changes: 5 additions & 5 deletions internal/scripts/docker/build_met_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ if [ -z ${MET_GIT_NAME+x} ]; then
echo "Setting MET_GIT_NAME=${MET_GIT_NAME} based on the current branch."
fi

# Check whether MET_ENABLE_OPTS is defined
if [ -z ${MET_ENABLE_OPTS+x} ]; then
MET_ENABLE_OPTS='--enable-all'
echo "Setting MET_ENABLE_OPTS=${MET_ENABLE_OPTS} to compile all available options."
# Check whether MET_CONFIG_OPTS is defined
if [ -z ${MET_CONFIG_OPTS+x} ]; then
MET_CONFIG_OPTS='--enable-all'
echo "Setting MET_CONFIG_OPTS=${MET_CONFIG_OPTS} to compile all available options."
fi

# Create log directory
Expand All @@ -25,7 +25,7 @@ echo "Running bootstrap for MET ${MET_GIT_NAME} and writing log file ${LOG_FILE}
echo "Configuring MET ${MET_GIT_NAME} and appending to log file ${LOG_FILE}"
./configure \
BUFRLIB_NAME=${BUFRLIB_NAME} GRIB2CLIB_NAME=${GRIB2CLIB_NAME} \
${MET_ENABLE_OPTS} \
${MET_CONFIG_OPTS} \
CPPFLAGS="-I/usr/local/include -I/usr/local/include/freetype2 -I/usr/local/include/cairo" \
LIBS="-ltirpc" >> ${LOG_FILE} 2>&1
if [ $? != 0 ]; then
Expand Down

0 comments on commit 02a83b5

Please sign in to comment.