Skip to content

Commit

Permalink
Add configure support for mfem
Browse files Browse the repository at this point in the history
  • Loading branch information
lindsayad committed Jan 9, 2025
1 parent 6cbcb6f commit c413cc1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions conf_vars.mk.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ libPNG_INCLUDE := @LIBPNG_INCLUDES@
PREFIX := @prefix@
ENABLE_LIBTORCH := @libtorch_support@
LIBTORCH_DIR := @libtorch_library@
ENABLE_MFEM := @mfem_support@
MFEM_DIR := @mfem_library@
22 changes: 22 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,28 @@ AS_IF([test "$libtorch_support" = yes],
AC_MSG_RESULT([Libtorch library path: $libtorch_library])
])

AC_ARG_WITH(mfem,
AS_HELP_STRING([--with-mfem@<:@=ARG@:>@],[Specify if mfem support should be enabled @<:@ARG=yes or mfem directory@:>@]),
[mfem_support=yes mfem_library="$withval"],
[mfem_support=no])

AC_MSG_RESULT([configuring with mfem support: $mfem_support])

AS_IF([test "$mfem_support" = yes],
[
AC_DEFINE(MFEM_ENABLED, 1, [Whether to use mfem-related code or not])
AC_SUBST([mfem_support],[true])
AS_IF([test "$mfem_library" = yes],
[
AS_IF([test "${MFEM_DIR+set}" = set],
[mfem_library="${MFEM_DIR}"],
[mfem_library="$ac_pwd/framework/contrib/mfem"])
])
AC_DEFINE_UNQUOTED(MFEM_DIR, [$mfem_library], [The directory where mfem is installed])
AC_SUBST([mfem_library])
AC_MSG_RESULT([MFEM library path: $mfem_library])
])

AC_PATH_TOOL(PKG_CONFIG,pkg-config)
if test x$PKG_CONFIG != x; then
AC_SUBST(LIBPNG)
Expand Down

0 comments on commit c413cc1

Please sign in to comment.