1dnl SPDX-License-Identifier: GPL-2.0-or-later 2dnl Copyright (c) Cisco Systems Inc., 2009 3dnl Copyright (c) 2017 Petr Vorel <pvorel@suse.cz> 4dnl Author: Ngie Cooper <yaneurabeya@gmail.com> 5 6AC_DEFUN([LTP_CHECK_SYSCALL_NUMA], [ 7 AC_CHECK_LIB(numa, numa_available, [have_libnuma=yes]) 8 AC_CHECK_HEADERS([numa.h numaif.h], [], [have_numa_headers=no]) 9 10 if test "x$have_numa_headers" != "xno"; then 11 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ 12#include <numa.h> 13 ], [ 14#if LIBNUMA_API_VERSION < 2 15# error Required numa headers >= 2 16#endif 17 ])], [have_numa_headers_v2=yes]) 18 fi 19 20 if test "x$have_libnuma" = "xyes" -a "x$have_numa_headers" != "xno" -a "x$have_numa_headers_v2" = "xyes"; then 21 AC_SUBST(NUMA_LIBS, "-lnuma") 22 AC_DEFINE(HAVE_NUMA_V2, 1, [Define to 1 if you have libnuma and it's headers version >= 2 installed.]) 23 fi 24]) 25