Skip to content

Commit

Permalink
xpmem: Add XPMEM config parameter
Browse files Browse the repository at this point in the history
Add --enable-xpmem to the config files

Signed-off-by: Amir Shehata <[email protected]>
  • Loading branch information
amirshehataornl committed Aug 9, 2023
1 parent 40fa05f commit 75d0cb8
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 17 deletions.
27 changes: 27 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,33 @@ AM_CONDITIONAL([EMBEDDED], [test x"$enable_embedded" = x"yes"])

AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$ac_cv_version_script" = "yes")

xpmem_happy=0
AC_ARG_ENABLE([xpmem],
[AS_HELP_STRING([--enable-xpmem@<:@=yes|no|PATH@:>@],
[Enable xpmem (gni and shm providers) @<:@default=yes@:>@
(yes: enable xpmem; no: disable xpmem;
PATH: enable xpmem and use xpmem installed under PATH)])],
)

FI_CHECK_PACKAGE([xpmem],
[xpmem.h],
[xpmem],
[xpmem_make],
[],
[$enable_xpmem],
[$enable_xpmem/lib64],
[xpmem_happy=1])

AS_IF([test x"$enable_xpmem" != x"no" && test -n "$enable_xpmem" && test "$xpmem_happy" = "0" ],
[AC_MSG_ERROR([XPMEM support requested but XPMEM runtime not available.])])

AC_DEFINE_UNQUOTED([HAVE_XPMEM], [$xpmem_happy],
[XPMEM support availability])

LIBS="$LIBS $xpmem_LIBS"
CPPFLAGS="$CPPFLAGS $xpmem_CPPFLAGS"
LDFLAGS="$LDFLAGS $xpmem_LDFLAGS"

dnl Disable symbol versioning when -ipo is in CFLAGS or ipo is disabled by icc.
dnl The gcc equivalent ipo (-fwhole-program) seems to work fine.
AS_CASE([$CFLAGS],
Expand Down
17 changes: 0 additions & 17 deletions prov/gni/configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,9 @@ AC_DEFUN([FI_GNI_CONFIGURE],[
gnitest_CPPFLAGS=
gnitest_LDFLAGS=
gnitest_LIBS=
xpmem_happy=0
kdreg_happy=0
AC_ARG_ENABLE([xpmem],
[AS_HELP_STRING([--enable-xpmem],
[Enable xpmem (gni provider) @<:@default=yes@:>@])],
)
AC_ARG_ENABLE([ugni-static],
[AS_HELP_STRING([--enable-ugni-static],
[Enable static linking with uGNI. Recommended for KNL.])],
Expand Down Expand Up @@ -110,17 +104,6 @@ AC_DEFUN([FI_GNI_CONFIGURE],[
gni_LDFLAGS="$CRAY_UDREG_LIBS $gni_LDFLAGS"
],
[udreg_lib_happy=0])
AS_IF([test x"$enable_xpmem" != x"no"],
[FI_PKG_CHECK_MODULES([CRAY_XPMEM], [cray-xpmem],
[AC_DEFINE_UNQUOTED([HAVE_XPMEM], [1], [Define to 1 if xpmem available])
gni_CPPFLAGS="$CRAY_XPMEM_CFLAGS $gni_CPPFLAGS"
gni_LDFLAGS="$CRAY_XPMEM_LIBS $gni_LDFLAGS"
],
[xpmem_happy=0])
],
[AC_DEFINE_UNQUOTED([HAVE_XPMEM], [0], [Define to 1 if xpmem available])
])
CPPFLAGS_SAVE=$CPPFLAGS
CPPFLAGS="$gni_CPPFLAGS $CPPFLAGS"
Expand Down

0 comments on commit 75d0cb8

Please sign in to comment.