Skip to content

Commit

Permalink
configure: add support for level-zero.pc
Browse files Browse the repository at this point in the history
My upstream PR was merged a couple hours ago, let's support it,
even if we don't know when it'll be included in official packages
and/or whether le .pc might be renamed in the meantime.

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
  • Loading branch information
bgoglin committed Apr 1, 2021
1 parent 0ea743b commit 00b1d26
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions config/hwloc.m4
Expand Up @@ -1191,14 +1191,20 @@ return clGetDeviceIDs(0, 0, 0, NULL, NULL);
# LevelZero support
hwloc_levelzero_happy=no
if test "x$enable_io" != xno && test "x$enable_levelzero" != "xno"; then
hwloc_levelzero_happy=yes
AC_CHECK_HEADERS([ze_api.h], [
AC_CHECK_LIB([ze_loader], [zeInit], [
AC_CHECK_HEADERS([zes_api.h], [
AC_CHECK_LIB([ze_loader], [zesDevicePciGetProperties], [HWLOC_LEVELZERO_LIBS="-lze_loader"], [hwloc_levelzero_happy=no])
HWLOC_PKG_CHECK_MODULES([LEVELZERO], [level-zero], [zesDevicePciGetProperties], [zes_api.h],
[hwloc_levelzero_happy=yes
HWLOC_LEVELZERO_REQUIRES=level-zero
], [hwloc_levelzero_happy=no])
if test x$hwloc_levelzero_happy = xno; then
hwloc_levelzero_happy=yes
AC_CHECK_HEADERS([ze_api.h], [
AC_CHECK_LIB([ze_loader], [zeInit], [
AC_CHECK_HEADERS([zes_api.h], [
AC_CHECK_LIB([ze_loader], [zesDevicePciGetProperties], [HWLOC_LEVELZERO_LIBS="-lze_loader"], [hwloc_levelzero_happy=no])
], [hwloc_levelzero_happy=no])
], [hwloc_levelzero_happy=no])
], [hwloc_levelzero_happy=no])
], [hwloc_levelzero_happy=no])
fi
fi
AC_SUBST(HWLOC_LEVELZERO_LIBS)
# If we asked for LevelZero support but couldn't deliver, fail
Expand Down

0 comments on commit 00b1d26

Please sign in to comment.