aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2024-04-15 09:04:38 +0200
committerKarel Zak <kzak@redhat.com>2024-04-15 09:04:38 +0200
commit49d37925d7c71fe5be3bc8cd7b20fffcb376f249 (patch)
tree5152a9c2bbd3f961e7745ab7db9ed9c6c398fd7c
parent3bdb9f047e10071fe63d59784aacfa1dbb22c2d1 (diff)
parentba05b9ffa7544c2fa5f88147acc85f704d4785de (diff)
downloadutil-linux-49d37925d7c71fe5be3bc8cd7b20fffcb376f249.tar.gz
Merge branch 'PR/autotools' of github.com:karelzak/util-linux-work
* 'PR/autotools' of github.com:karelzak/util-linux-work: autotools: add --disable-enosys, check for linux/audit.h autotools: check for sys/vfs.h and linux/bpf.h
-rw-r--r--configure.ac14
1 files changed, 13 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 2fff2de09d..c302732e73 100644
--- a/configure.ac
+++ b/configure.ac
@@ -328,6 +328,8 @@ AC_CHECK_HEADERS([ \
inttypes.h \
lastlog.h \
libutil.h \
+ linux/audit.h \
+ linux/bpf.h \
linux/blkzoned.h \
linux/btrfs.h \
linux/capability.h \
@@ -496,6 +498,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
dnl Convert some ac_cv_header_* variables to have_*
dnl
+have_linux_audit_h=$ac_cv_header_linux_audit_h
have_linux_blkzoned_h=$ac_cv_header_linux_blkzoned_h
have_linux_btrfs_h=$ac_cv_header_linux_btrfs_h
have_linux_capability_h=$ac_cv_header_linux_capability_h
@@ -515,6 +518,8 @@ have_shadow_h=$ac_cv_header_shadow_h
have_sys_signalfd_h=$ac_cv_header_sys_signalfd_h
have_utmpx_h=$ac_cv_header_utmpx_h
have_mntent_h=$ac_cv_header_mntent_h
+have_sys_vfs_h=$ac_cv_header_sys_vfs_h
+have_linux_bpf_h=$ac_cv_header_linux_bpf_h
AS_CASE([$linux_os:$have_linux_version_h],
[yes:no],
@@ -1286,6 +1291,7 @@ UL_BUILD_INIT([libmount])
UL_REQUIRES_BUILD([libmount], [libblkid])
UL_REQUIRES_HAVE([libmount], [dirfd,ddfd], [dirfd or ddfd function])
UL_REQUIRES_HAVE([libmount], [mntent_h], [mntent.h header file])
+UL_REQUIRES_HAVE([libmount], [sys_vfs_h], [sys/vfs.h header file])
AM_CONDITIONAL([BUILD_LIBMOUNT], [test "x$build_libmount" = xyes])
AM_CONDITIONAL([BUILD_LIBMOUNT_TESTS], [test "x$build_libmount" = xyes && test "x$enable_static" = xyes])
AS_IF([test "x$build_libmount" = xyes], [
@@ -1848,6 +1854,7 @@ AC_ARG_ENABLE([lsfd],
UL_BUILD_INIT([lsfd])
UL_REQUIRES_LINUX([lsfd])
UL_REQUIRES_BUILD([lsfd], [libsmartcols])
+UL_REQUIRES_HAVE([lsfd], [linux_bpf_h], [linux/bpf.h header file])
AM_CONDITIONAL([BUILD_LSFD], [test "x$build_lsfd" = xyes])
AC_ARG_ENABLE([lslogins],
@@ -1947,8 +1954,13 @@ UL_REQUIRES_LINUX([waitpid])
UL_REQUIRES_SYSCALL_CHECK([waitpid], [UL_CHECK_SYSCALL([pidfd_open])], [pidfd_open])
AM_CONDITIONAL([BUILD_WAITPID], [test "x$build_waitpid" = xyes])
-UL_BUILD_INIT([enosys], [check])
+AC_ARG_ENABLE([enosys],
+ AS_HELP_STRING([--disable-enosys], [do not build enosys]),
+ [], [UL_DEFAULT_ENABLE([enosys], [check])]
+)
+UL_BUILD_INIT([enosys])
UL_REQUIRES_LINUX([enosys])
+UL_REQUIRES_HAVE([enosys], [linux_audit_h], [linux/audit.h header file])
AS_IF([test "x$build_enosys" = xyes], [
AC_MSG_CHECKING([for valid audit arch])
AC_COMPILE_IFELSE(