UL_BUILD_INIT([enosys], [check])
UL_REQUIRES_LINUX([enosys])
+AS_IF([test "x$build_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_enosys=no
+ ])
+])
AM_CONDITIONAL([BUILD_ENOSYS], [test "x$build_enosys" = xyes])
UL_BUILD_INIT([getopt], [yes])
meson_version: '>=0.57.0',
license : 'GPLv2+')
+fs = import('fs')
pkgconfig = import('pkgconfig')
libblkid_version = '1.1.0'
command : ['bash', '@INPUT@', cc.cmd_array()],
)
-exe = executable(
- 'enosys',
- 'misc-utils/enosys.c', syscalls_h,
- include_directories : includes,
- link_with : [lib_common],
- install_dir : usrbin_exec_dir,
- install : true)
-if not is_disabler(exe)
- exes += exe
- manadocs += ['misc-utils/enosys.1.adoc']
- bashcompletions += ['enosys']
+if cc.compiles(fs.read('include/audit-arch.h'), name : 'has AUDIT_ARCH_NATIVE')
+ exe = executable(
+ 'enosys',
+ 'misc-utils/enosys.c', syscalls_h,
+ include_directories : includes,
+ link_with : [lib_common],
+ install_dir : usrbin_exec_dir,
+ install : true)
+ if not is_disabler(exe)
+ exes += exe
+ manadocs += ['misc-utils/enosys.1.adoc']
+ bashcompletions += ['enosys']
+ endif
endif
############################################################