Skip to content

Commit

Permalink
only set -L and -I arguments for atlas and eckit if the appropriate e…
Browse files Browse the repository at this point in the history
…nvironment variable is set -- this matches how it is handled for other external library dependencies
  • Loading branch information
georgemccabe authored and JohnHalleyGotway committed Dec 29, 2023
1 parent 2fdb969 commit 337f347
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
12 changes: 10 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -5376,6 +5376,11 @@ fi

# AC_SUBST command line variables.

if (test -n "$MET_ATLASLIB"); then
CPPFLAGS="${CPPFLAGS} -I${MET_ATLASINC}"
LDFLAGS="${LDFLAGS} -L${MET_ATLASLIB}"
fi

#
# Look for the Eckit library.
#
Expand Down Expand Up @@ -5403,6 +5408,10 @@ fi

# AC_SUBST command line variables.

if (test -n "$MET_ECKITLIB"); then
CPPFLAGS="${CPPFLAGS} -I${MET_ECKITINC}"
LDFLAGS="${LDFLAGS} -L${MET_ECKITLIB}"
fi
#
# Look for the NetCDF library.
#
Expand Down Expand Up @@ -6948,8 +6957,7 @@ printf "%s\n" "#define ENABLE_UGRID /**/" >>confdefs.h

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: unstructured grid support will be compiled" >&5
printf "%s\n" "$as_me: unstructured grid support will be compiled" >&6;}
CPPFLAGS="${CPPFLAGS} -I${MET_ATLASINC} -I${MET_ECKITINC} -DWITH_UGRID"
LDFLAGS="${LDFLAGS} -L${MET_ATLASLIB} -L${MET_ECKITLIB} -Wl,-rpath,${MET_ATLASLIB}:${MET_ECKITLIB}"
CPPFLAGS="${CPPFLAGS} -DWITH_UGRID"
UGRID_MET_LIBS="-lvx_data2d_ugrid"
UGRID_DEP_LIBS="-latlas -leckit -leckit_mpi -leckit_geometry"
else
Expand Down
12 changes: 10 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ fi

# AC_SUBST command line variables.

if (test -n "$MET_ATLASLIB"); then
CPPFLAGS="${CPPFLAGS} -I${MET_ATLASINC}"
LDFLAGS="${LDFLAGS} -L${MET_ATLASLIB}"
fi

#
# Look for the Eckit library.
#
Expand Down Expand Up @@ -101,6 +106,10 @@ fi

# AC_SUBST command line variables.

if (test -n "$MET_ECKITLIB"); then
CPPFLAGS="${CPPFLAGS} -I${MET_ECKITINC}"
LDFLAGS="${LDFLAGS} -L${MET_ECKITLIB}"
fi
#
# Look for the NetCDF library.
#
Expand Down Expand Up @@ -1128,8 +1137,7 @@ AM_CONDITIONAL([ENABLE_UGRID], [test "x$ENABLE_UGRID" = "xyes" || test "x$ENABLE
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"
LDFLAGS="${LDFLAGS} -L${MET_ATLASLIB} -L${MET_ECKITLIB} -Wl,-rpath,${MET_ATLASLIB}:${MET_ECKITLIB}"
CPPFLAGS="${CPPFLAGS} -DWITH_UGRID"
UGRID_MET_LIBS="-lvx_data2d_ugrid"
UGRID_DEP_LIBS="-latlas -leckit -leckit_mpi -leckit_geometry"
else
Expand Down

0 comments on commit 337f347

Please sign in to comment.