mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-20 11:35:19 +00:00
numad: Check numactl-devel if compiled with numad support
Since now we pre-set memory policy using libnuma to fully drive numad, it needs to check numactl-devel if "with_numad" is "yes". configure with groups "--with-numad=yes --with-numactl=yes", "--with-numad=no --with-numactl=yes", "--with-numad=yes --with-numactl=yes" works fine after the change. (cherry picked from commit b0f3244554b7b67183615a353897a2e19e0c6d68)
This commit is contained in:
parent
1d3218ab5e
commit
b5b4faea50
46
configure.ac
46
configure.ac
@ -1479,13 +1479,6 @@ if test "$with_qemu" = "yes" && test "$with_numactl" != "no"; then
|
|||||||
CFLAGS="$old_cflags"
|
CFLAGS="$old_cflags"
|
||||||
LIBS="$old_libs"
|
LIBS="$old_libs"
|
||||||
fi
|
fi
|
||||||
if test "$with_numactl" = "yes"; then
|
|
||||||
NUMACTL_LIBS="-lnuma"
|
|
||||||
AC_DEFINE_UNQUOTED([HAVE_NUMACTL], 1, [whether numactl is available for topology info])
|
|
||||||
fi
|
|
||||||
AM_CONDITIONAL([HAVE_NUMACTL], [test "$with_numactl" != "no"])
|
|
||||||
AC_SUBST([NUMACTL_CFLAGS])
|
|
||||||
AC_SUBST([NUMACTL_LIBS])
|
|
||||||
|
|
||||||
dnl numad
|
dnl numad
|
||||||
AC_ARG_WITH([numad],
|
AC_ARG_WITH([numad],
|
||||||
@ -1494,22 +1487,45 @@ AC_ARG_WITH([numad],
|
|||||||
[with_numad=check])
|
[with_numad=check])
|
||||||
|
|
||||||
if test "$with_numad" != "no" ; then
|
if test "$with_numad" != "no" ; then
|
||||||
|
old_cflags="$CFLAGS"
|
||||||
|
old_libs="$LIBS"
|
||||||
|
fail=0
|
||||||
|
|
||||||
AC_PATH_PROG([NUMAD], [numad], [], [/bin:/usr/bin])
|
AC_PATH_PROG([NUMAD], [numad], [], [/bin:/usr/bin])
|
||||||
if test -z "$NUMAD" ; then
|
|
||||||
if test "$with_numad" = "check"; then
|
if test "$with_numad" = "check"; then
|
||||||
|
AC_CHECK_HEADER([numa.h], [], [fail=1])
|
||||||
|
AC_CHECK_LIB([numa], [numa_available], [], [fail=1])
|
||||||
|
if test -z "$NUMAD" || test $fail = 1; then
|
||||||
with_numad="no"
|
with_numad="no"
|
||||||
else
|
else
|
||||||
AC_MSG_ERROR([You must install the 'numad' to manage CPU placement dynamically])
|
with_nuamd="yes"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
with_numad="yes"
|
test -z "$NUMAD" &&
|
||||||
fi
|
AC_MSG_ERROR([You must install numad package to manage CPU and memory placement dynamically])
|
||||||
if test "$with_numad" = "yes"; then
|
|
||||||
AC_DEFINE_UNQUOTED([HAVE_NUMAD], 1, [whether numad is available])
|
AC_CHECK_HEADER([numa.h], [], [fail=1])
|
||||||
AC_DEFINE_UNQUOTED([NUMAD],["$NUMAD"], [Location or name of the numad program])
|
AC_CHECK_LIB([numa], [numa_available], [], [fail=1])
|
||||||
|
test $fail = 1 &&
|
||||||
|
AC_MSG_ERROR([You must install the numactl development package in order to compile and run libvirt])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
CFLAGS="$old_cflags"
|
||||||
|
LIBS="$old_libs"
|
||||||
|
fi
|
||||||
|
if test "$with_numad" = "yes"; then
|
||||||
|
AC_DEFINE_UNQUOTED([HAVE_NUMAD], 1, [whether numad is available])
|
||||||
|
AC_DEFINE_UNQUOTED([NUMAD],["$NUMAD"], [Location or name of the numad program])
|
||||||
|
fi
|
||||||
|
if test "$with_numactl" = "yes" || test "$with_numad" = "yes"; then
|
||||||
|
NUMACTL_LIBS="-lnuma"
|
||||||
|
AC_DEFINE_UNQUOTED([HAVE_NUMACTL], 1, [whether numactl-devel is available])
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL([HAVE_NUMAD], [test "$with_numad" != "no"])
|
AM_CONDITIONAL([HAVE_NUMAD], [test "$with_numad" != "no"])
|
||||||
|
AM_CONDITIONAL([HAVE_NUMACTL], [test "$with_numad" != "no" || test "$with_numactl" != "no"])
|
||||||
|
AC_SUBST([NUMACTL_CFLAGS])
|
||||||
|
AC_SUBST([NUMACTL_LIBS])
|
||||||
|
|
||||||
dnl pcap lib
|
dnl pcap lib
|
||||||
LIBPCAP_CONFIG="pcap-config"
|
LIBPCAP_CONFIG="pcap-config"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user