mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
meson: add functions check
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
parent
6639943b23
commit
d0fd4f55ed
33
configure.ac
33
configure.ac
@ -207,38 +207,6 @@ LIBVIRT_CHECK_YAJL
|
|||||||
|
|
||||||
AC_CHECK_SIZEOF([long])
|
AC_CHECK_SIZEOF([long])
|
||||||
|
|
||||||
dnl Availability of various common functions (non-fatal if missing),
|
|
||||||
dnl and various less common threadsafe functions
|
|
||||||
AC_CHECK_FUNCS_ONCE([\
|
|
||||||
elf_aux_info \
|
|
||||||
fallocate \
|
|
||||||
getauxval \
|
|
||||||
getegid \
|
|
||||||
geteuid \
|
|
||||||
getgid \
|
|
||||||
getifaddrs \
|
|
||||||
getmntent_r \
|
|
||||||
getpwuid_r \
|
|
||||||
getrlimit \
|
|
||||||
getuid \
|
|
||||||
getutxid \
|
|
||||||
if_indextoname \
|
|
||||||
mmap \
|
|
||||||
newlocale \
|
|
||||||
posix_fallocate \
|
|
||||||
posix_memalign \
|
|
||||||
pipe2 \
|
|
||||||
prlimit \
|
|
||||||
sched_getaffinity \
|
|
||||||
sched_setscheduler \
|
|
||||||
setgroups \
|
|
||||||
setns \
|
|
||||||
setrlimit \
|
|
||||||
symlink \
|
|
||||||
sysctlbyname \
|
|
||||||
unshare \
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl Availability of various common headers (non-fatal if missing).
|
dnl Availability of various common headers (non-fatal if missing).
|
||||||
AC_CHECK_HEADERS([\
|
AC_CHECK_HEADERS([\
|
||||||
asm/hwcap.h \
|
asm/hwcap.h \
|
||||||
@ -263,7 +231,6 @@ AC_CHECK_HEADERS([\
|
|||||||
AC_CHECK_HEADERS([net/if.h], [], [], [[#include <sys/socket.h>]])
|
AC_CHECK_HEADERS([net/if.h], [], [], [[#include <sys/socket.h>]])
|
||||||
dnl Check whether endian provides handy macros.
|
dnl Check whether endian provides handy macros.
|
||||||
AC_CHECK_DECLS([htole64], [], [], [[#include <endian.h>]])
|
AC_CHECK_DECLS([htole64], [], [], [[#include <endian.h>]])
|
||||||
AC_CHECK_FUNCS([stat stat64 __xstat __xstat64 lstat lstat64 __lxstat __lxstat64])
|
|
||||||
|
|
||||||
AC_CHECK_TYPE([struct ifreq],
|
AC_CHECK_TYPE([struct ifreq],
|
||||||
[AC_DEFINE([HAVE_STRUCT_IFREQ],[1],
|
[AC_DEFINE([HAVE_STRUCT_IFREQ],[1],
|
||||||
|
47
meson.build
47
meson.build
@ -630,6 +630,53 @@ libvirt_export_dynamic = cc.first_supported_link_argument([
|
|||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# check availability of various common functions (non-fatal if missing)
|
||||||
|
|
||||||
|
functions = [
|
||||||
|
'__lxstat',
|
||||||
|
'__lxstat64',
|
||||||
|
'__xstat',
|
||||||
|
'__xstat64',
|
||||||
|
'elf_aux_info',
|
||||||
|
'fallocate',
|
||||||
|
'getauxval',
|
||||||
|
'getegid',
|
||||||
|
'geteuid',
|
||||||
|
'getgid',
|
||||||
|
'getifaddrs',
|
||||||
|
'getmntent_r',
|
||||||
|
'getpwuid_r',
|
||||||
|
'getrlimit',
|
||||||
|
'getuid',
|
||||||
|
'getutxid',
|
||||||
|
'if_indextoname',
|
||||||
|
'lstat',
|
||||||
|
'lstat64',
|
||||||
|
'mmap',
|
||||||
|
'newlocale',
|
||||||
|
'pipe2',
|
||||||
|
'posix_fallocate',
|
||||||
|
'posix_memalign',
|
||||||
|
'prlimit',
|
||||||
|
'sched_getaffinity',
|
||||||
|
'sched_setscheduler',
|
||||||
|
'setgroups',
|
||||||
|
'setns',
|
||||||
|
'setrlimit',
|
||||||
|
'stat',
|
||||||
|
'stat64',
|
||||||
|
'symlink',
|
||||||
|
'sysctlbyname',
|
||||||
|
'unshare',
|
||||||
|
]
|
||||||
|
|
||||||
|
foreach function : functions
|
||||||
|
if cc.has_function(function)
|
||||||
|
conf.set('HAVE_@0@'.format(function.to_upper()), 1)
|
||||||
|
endif
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
|
||||||
# define top include directory
|
# define top include directory
|
||||||
|
|
||||||
top_inc_dir = include_directories('.')
|
top_inc_dir = include_directories('.')
|
||||||
|
Loading…
Reference in New Issue
Block a user