UL_REQUIRES_SYSCALL_CHECK([waitpid], [UL_CHECK_SYSCALL([pidfd_open])], [pidfd_open])
AM_CONDITIONAL([BUILD_WAITPID], [test "x$build_waitpid" = xyes])
+UL_BUILD_INIT([test_enosys], [check])
+UL_REQUIRES_LINUX([test_enosys])
+AS_IF([test "x$build_test_enosys" = xyes], [
+ AC_MSG_CHECKING([for valid audit arch])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include "${srcdir}/include/audit-arch.h"]])],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ build_test_enosys=no
+ ])
+])
+AM_CONDITIONAL([BUILD_TEST_ENOSYS], [test "x$build_test_enosys" = xyes])
+
UL_BUILD_INIT([getopt], [yes])
AM_CONDITIONAL([BUILD_GETOPT], [test "x$build_getopt" = xyes])
meson_version: '>=0.57.0',
license : 'GPLv2+')
+fs = import('fs')
pkgconfig = import('pkgconfig')
libblkid_version = '1.1.0'
exes += exe
endif
-exe = executable(
- 'test_enosys',
- 'tests/helpers/test_enosys.c',
- include_directories : includes)
-exes += exe
+if cc.compiles(fs.read('include/audit-arch.h'), name : 'has AUDIT_ARCH_NATIVE')
+ exe = executable(
+ 'test_enosys',
+ 'tests/helpers/test_enosys.c',
+ include_directories : includes)
+ exes += exe
+endif
############################################################
if LINUX
check_PROGRAMS += test_mkfds
test_mkfds_SOURCES = tests/helpers/test_mkfds.c
+endif
+if BUILD_TEST_ENOSYS
check_PROGRAMS += test_enosys
test_enosys_SOURCES = tests/helpers/test_enosys.c
endif