Commit 78afc2c9 authored by Sergei Trofimovich's avatar Sergei Trofimovich Committed by Marge Bot

configure.ac: add --enable-numa switch

Before the change ./configure detected numa support automatically
withoun a nice way to disable autodetection.

The change adds `--enable-numa` / `--disable-numa` switch to
override the default. If `--enable-numa` is passed and `libnuma`
is not present then configure will fail.

Reported-by: Sergey Alirzaev
Bug: https://github.com/gentoo-haskell/gentoo-haskell/issues/955Signed-off-by: default avatarSergei Trofimovich <slyfox@gentoo.org>
parent 304067a0
Pipeline #9789 passed with stages
in 434 minutes and 50 seconds
......@@ -1265,11 +1265,22 @@ AC_DEFINE_UNQUOTED([USE_LIBDW], [$USE_LIBDW], [Set to 1 to use libdw])
dnl ** Have libnuma?
dnl --------------------------------------------------------------
HaveLibNuma=0
AC_CHECK_HEADERS([numa.h numaif.h])
AC_ARG_ENABLE(numa,
[AC_HELP_STRING([--enable-numa],
[Enable NUMA memory policy and thread affinity support in the
runtime system via numactl's libnuma [default=auto]])])
if test "$ac_cv_header_numa_h$ac_cv_header_numaif_h" = "yesyes" ; then
if test "$enable_numa" != "no" ; then
AC_CHECK_HEADERS([numa.h numaif.h])
if test "$ac_cv_header_numa_h$ac_cv_header_numaif_h" = "yesyes" ; then
AC_CHECK_LIB(numa, numa_available,HaveLibNuma=1)
fi
if test "$enable_numa:$HaveLibNuma" = "yes:0" ; then
AC_MSG_ERROR([Cannot find system libnuma (required by --enable-numa)])]
fi
fi
AC_DEFINE_UNQUOTED([HAVE_LIBNUMA], [$HaveLibNuma], [Define to 1 if you have libnuma])
if test $HaveLibNuma = "1" ; then
AC_SUBST([CabalHaveLibNuma],[True])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment