Skip to content

Commit

Permalink
Merge branch 'PR/autotools' of github.com:karelzak/util-linux-work
Browse files Browse the repository at this point in the history
* '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
  • Loading branch information
karelzak committed Apr 15, 2024
2 parents 3bdb9f0 + ba05b9f commit 49d3792
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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
Expand All @@ -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],
Expand Down Expand Up @@ -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], [
Expand Down Expand Up @@ -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],
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 49d3792

Please sign in to comment.