summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:33:32 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:33:32 +0000
commit8bb05ac73a5b448b339ce0bc8d396c82c459b47f (patch)
tree1fdda006866bca20d41cb206767ea5241e36852f /configure.ac
parentAdding debian version 2.39.3-11. (diff)
downloadutil-linux-8bb05ac73a5b448b339ce0bc8d396c82c459b47f.tar.xz
util-linux-8bb05ac73a5b448b339ce0bc8d396c82c459b47f.zip
Merging upstream version 2.40.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac134
1 files changed, 125 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index 36c24b4..c338749 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,7 +29,7 @@ PACKAGE_VERSION_RELEASE=$(echo $PACKAGE_VERSION | awk -F. '{
dnl libblkid version
LIBBLKID_VERSION="$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_RELEASE"
-LIBBLKID_DATE="04-Dec-2023"
+LIBBLKID_DATE="27-Mar-2024"
LIBBLKID_LT_MAJOR=1
LIBBLKID_LT_MINOR=1
LIBBLKID_LT_MICRO=0
@@ -42,6 +42,13 @@ LIBUUID_LT_MINOR=3
LIBUUID_LT_MICRO=0
LIBUUID_VERSION_INFO=`expr $LIBUUID_LT_MAJOR + $LIBUUID_LT_MINOR`:$LIBUUID_LT_MICRO:$LIBUUID_LT_MINOR
+dnl liblastlog2 version
+LIBLASTLOG2_VERSION="$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_RELEASE"
+LIBLASTLOG2_LT_MAJOR=2
+LIBLASTLOG2_LT_MINOR=0
+LIBLASTLOG2_LT_MICRO=0
+LIBLASTLOG2_VERSION_INFO=`expr $LIBLASTLOG2_LT_MAJOR + $LIBLASTLOG2_LT_MINOR`:$LIBLASTLOG2_LT_MICRO:$LIBLASTLOG2_LT_MINOR
+
dnl libmount version
LIBMOUNT_VERSION="$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_RELEASE"
LIBMOUNT_LT_MAJOR=1
@@ -85,6 +92,8 @@ AS_CASE([$prefix],
]
)
+AC_SUBST([localstatedir])
+
# default for old versions without $runstatedir
AS_IF([test x"$runstatedir" = x], [runstatedir='${localstatedir}/run'])
@@ -94,7 +103,6 @@ AS_CASE([$localstatedir:$runstatedir],
[NONE:'${localstatedir}/run' | /var:'${localstatedir}/run' | NONE:'/run' ],
[runstatedir=/run; AC_MSG_NOTICE([ --runstatedir defaults to /run])]
)
-
AC_SUBST([runstatedir])
@@ -124,6 +132,11 @@ AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_MKDIR_P
AC_PROG_YACC
+
+# Don't use autotools integrated LEX/YACC support for libsmartcols
+AC_PATH_PROG([FLEX], [flex])
+AC_PATH_PROG([BISON], [bison])
+
AC_CANONICAL_HOST
AC_C_CONST
AC_C_VOLATILE
@@ -156,6 +169,8 @@ UL_WARN_ADD([-Wunused-but-set-variable])
UL_WARN_ADD([-Wunused-parameter])
UL_WARN_ADD([-Wunused-result])
UL_WARN_ADD([-Wunused-variable])
+UL_WARN_ADD([-Wvla])
+UL_WARN_ADD([-Walloca])
AC_ARG_ENABLE([werror],
AS_HELP_STRING([--enable-werror], [make all compiler warnings into errors]),
@@ -176,9 +191,6 @@ AC_SUBST([BSD_WARN_CFLAGS])
UL_WARN_ADD([-Wno-cast-function-type], [PYTHON_WARN_CFLAGS])
AC_SUBST([PYTHON_WARN_CFLAGS])
-UL_WARN_ADD([-Wno-unused-parameter], [NO_UNUSED_WARN_CFLAGS])
-AC_SUBST([NO_UNUSED_WARN_CFLAGS])
-
AC_ARG_ENABLE([asan],
AS_HELP_STRING([--enable-asan], [compile with Address Sanitizer]),
@@ -215,6 +227,17 @@ AC_PROG_CXX
AM_CONDITIONAL([FUZZING_ENGINE], [test "x$enable_fuzzing_engine" = xyes])
AM_CONDITIONAL([OSS_FUZZ], [test "x$LIB_FUZZING_ENGINE" != x])
+AC_ARG_ENABLE([coverage],
+ AS_HELP_STRING([--enable-coverage], [compile with gcov]),
+ [], [enable_coverage=no]
+)
+AS_IF([test "x$enable_coverage" = xyes], [
+ UL_WARN_ADD([--coverage])
+ COVERAGE_LDFLAGS="--coverage"
+])
+AC_SUBST([COVERAGE_LDFLAGS])
+AM_CONDITIONAL([WITH_COVERAGE], [test "x$enable_coverage" = xyes])
+
dnl libtool-2
LT_INIT
@@ -265,6 +288,8 @@ UL_SET_ARCH([HPPA], [hppa*|parisc*])
AC_SYS_LARGEFILE
AC_HEADER_ASSERT
AC_STRUCT_TIMEZONE
+UL_YEAR2038_INIT
+AC_SYS_YEAR2038_RECOMMENDED
dnl Don't forget to maintain alternatively allowed versions in autogen.sh!
AM_GNU_GETTEXT_VERSION([0.18.3])
@@ -310,6 +335,7 @@ AC_CHECK_HEADERS([ \
linux/falloc.h \
linux/fd.h \
linux/fiemap.h \
+ linux/landlock.h \
linux/kcmp.h \
linux/net_namespace.h \
linux/nsfs.h \
@@ -328,6 +354,7 @@ AC_CHECK_HEADERS([ \
paths.h \
pty.h \
security/pam_appl.h \
+ security/pam_modules.h \
shadow.h \
stdint.h \
stdio_ext.h \
@@ -483,6 +510,7 @@ have_pty_h=$ac_cv_header_pty_h
have_security_openpam_h=$ac_cv_header_security_openpam_h
have_security_pam_appl_h=$ac_cv_header_security_pam_appl_h
have_security_pam_misc_h=$ac_cv_header_security_pam_misc_h
+have_security_pam_modules_h=$ac_cv_header_security_pam_modules_h
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
@@ -547,6 +575,7 @@ AC_CHECK_DECL([SO_PASSCRED],
#include <sys/socket.h>])
AC_CHECK_FUNCS([ \
+ cachestat \
clearenv \
close_range \
eaccess \
@@ -572,6 +601,9 @@ AC_CHECK_FUNCS([ \
getttynam \
inotify_init \
jrand48 \
+ landlock_create_ruleset \
+ landlock_add_rule \
+ landlock_restrict_self \
lchown \
lgetxattr \
llistxattr \
@@ -590,6 +622,8 @@ AC_CHECK_FUNCS([ \
posix_fadvise \
prctl \
qsort_r \
+ reallocarray \
+ renameat2 \
rpmatch \
scandirat \
sched_setattr \
@@ -629,6 +663,7 @@ AC_CHECK_FUNCS([reboot], [have_reboot=yes],[have_reboot=no])
AC_CHECK_FUNCS([updwtmpx updwtmpx], [have_gnu_utmpx=yes], [have_gnu_utmpx=no])
AM_CONDITIONAL([HAVE_OPENAT], [test "x$have_openat" = xyes])
+AM_CONDITIONAL([HAVE_LINUX_LANDLOCK_H], [test "x$ac_cv_header_linux_landlock_h" = xyes])
have_setns_syscall="yes"
UL_CHECK_SYSCALL([setns])
@@ -639,7 +674,6 @@ AS_IF([test "x$ul_cv_syscall_setns" = xno], [
UL_CHECK_SYSCALL([pidfd_open])
UL_CHECK_SYSCALL([pidfd_send_signal])
UL_CHECK_SYSCALL([close_range])
-
UL_CHECK_SYSCALL([fsconfig])
UL_CHECK_SYSCALL([fsmount])
UL_CHECK_SYSCALL([fsopen])
@@ -739,6 +773,9 @@ AS_IF([test x"$have_dirfd" = xno], [
AM_CONDITIONAL([HAVE_DIRFD], [test "x$have_dirfd" = xyes || test "x$have_ddfd" = xyes])
+MQ_LIBS=
+AC_CHECK_LIB([rt], [mq_open], [MQ_LIBS="-lrt"])
+AC_SUBST([MQ_LIBS])
AC_MSG_CHECKING([whether program_invocation_short_name is defined])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@@ -1185,6 +1222,39 @@ AS_IF([test "x$build_libuuid" = xyes], [
])
dnl
+dnl liblastlog2
+dnl
+AC_ARG_ENABLE([liblastlog2],
+ AS_HELP_STRING([--disable-liblastlog2], [do not build liblastlog2 and lastlog2 utilities]),
+ [], [UL_DEFAULT_ENABLE([liblastlog2], [yes])]
+)
+UL_BUILD_INIT([liblastlog2])
+
+have_sqlite3=no
+AS_IF([test "x$build_liblastlog2" = xyes], [
+ PKG_CHECK_MODULES([SQLITE3], [sqlite3], [have_sqlite3=yes], [have_sqlite3=no])
+])
+UL_REQUIRES_HAVE([liblastlog2], [sqlite3], [sqlite3 library])
+AC_SUBST([SQLITE3_LIBS])
+
+AC_SUBST([LIBLASTLOG2_VERSION])
+AC_SUBST([LIBLASTLOG2_VERSION_INFO])
+AC_DEFINE_UNQUOTED([LIBLASTLOG2_VERSION], ["$LIBLASTLOG2_VERSION"], [liblastlog2 version string])
+AM_CONDITIONAL([BUILD_LIBLASTLOG2], [test "x$build_liblastlog2" = xyes])
+AM_CONDITIONAL([BUILD_LIBLASTLOG2_TESTS], [test "x$build_liblastlog2" = xyes && test "x$enable_static" = xyes])
+
+
+AC_ARG_ENABLE([pam_lastlog2],
+ AS_HELP_STRING([--disable-pam-lastlog2], [do not build PAM lastlog2 module]),
+ [], [UL_DEFAULT_ENABLE([pam_lastlog2], [check])]
+)
+UL_BUILD_INIT([pam_lastlog2])
+UL_REQUIRES_BUILD([pam_lastlog2], [liblastlog2])
+UL_REQUIRES_HAVE([pam_lastlog2], [security_pam_modules_h], [pam_modules.h header file])
+AM_CONDITIONAL([BUILD_PAM_LASTLOG2], [test "x$build_pam_lastlog2" = xyes])
+
+
+dnl
dnl libblkid
dnl
AC_ARG_ENABLE([libblkid],
@@ -1778,7 +1848,6 @@ AC_ARG_ENABLE([lsfd],
UL_BUILD_INIT([lsfd])
UL_REQUIRES_LINUX([lsfd])
UL_REQUIRES_BUILD([lsfd], [libsmartcols])
-UL_REQUIRES_HAVE([lsfd], [linux_kcmp_h], [linux/kcmp.h header file])
AM_CONDITIONAL([BUILD_LSFD], [test "x$build_lsfd" = xyes])
AC_ARG_ENABLE([lslogins],
@@ -1878,6 +1947,24 @@ 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])
+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([lsclocks], [check])
+UL_REQUIRES_LINUX([lsclocks])
+UL_REQUIRES_BUILD([lsclocks], [libsmartcols])
+AM_CONDITIONAL([BUILD_LSCLOCKS], [test "x$build_lsclocks" = xyes])
+
UL_BUILD_INIT([getopt], [yes])
AM_CONDITIONAL([BUILD_GETOPT], [test "x$build_getopt" = xyes])
@@ -2045,6 +2132,9 @@ UL_REQUIRES_BUILD([rfkill], [libsmartcols])
AM_CONDITIONAL([BUILD_RFKILL], [test "x$build_rfkill" = xyes])
+UL_BUILD_INIT([setpgid], [yes])
+AM_CONDITIONAL([BUILD_SETPGID], [test "x$build_setpgid" = xyes])
+
UL_BUILD_INIT([setsid], [yes])
AM_CONDITIONAL([BUILD_SETSID], [test "x$build_setsid" = xyes])
@@ -2065,6 +2155,15 @@ dnl earlier than 2.x.
UL_REQUIRES_HAVE([ctrlaltdel], [reboot], [reboot function])
AM_CONDITIONAL([BUILD_CTRLALTDEL], [test "x$build_ctrlaltdel" = xyes])
+AC_ARG_ENABLE([exch],
+ AS_HELP_STRING([--disable-exch], [do not build exch]),
+ [], [UL_DEFAULT_ENABLE([exch], [check])]
+)
+UL_BUILD_INIT([exch])
+UL_REQUIRES_LINUX([exch])
+UL_REQUIRES_SYSCALL_CHECK([exch], [UL_CHECK_SYSCALL([renameat2])])
+AM_CONDITIONAL([BUILD_EXCH], [test "x$build_exch" = xyes])
+
UL_BUILD_INIT([fincore], [check])
UL_REQUIRES_LINUX([fincore])
UL_REQUIRES_BUILD([fincore], [libsmartcols])
@@ -2123,7 +2222,8 @@ UL_REQUIRES_HAVE([scriptlive], [pty], [openpty function (libutil)])
AM_CONDITIONAL([BUILD_SCRIPTLIVE], [test "x$build_scriptlive" = xyes])
-UL_BUILD_INIT([col], [yes])
+UL_BUILD_INIT([col], [check])
+UL_REQUIRES_COMPILE([col], [#include <limits.h>], [__GLIBC__], [building for glibc])
AM_CONDITIONAL([BUILD_COL], [test "x$build_col" = xyes])
UL_BUILD_INIT([colcrt], [yes])
@@ -2518,6 +2618,7 @@ AS_IF([test "x$with_systemd" != xno], [
[*:yes],
AC_DEFINE([HAVE_LIBSYSTEMD], [1], [Define if libsystemd is available])
AC_DEFINE([USE_SYSTEMD], [1], [Define if systemd support is wanted ])
+ AC_CHECK_DECLS([sd_session_get_username], [], [], [#include <systemd/sd-login.h>])
)
])
AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$have_systemd" = xyes])
@@ -2536,6 +2637,18 @@ AS_IF([test "x$with_systemdsystemunitdir" != "xno"], [
AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
])
+AC_ARG_WITH([tmpfilesdir],
+ AS_HELP_STRING([--with-tmpfilesdir=DIR], [directory for tmpfiles. See tmpfiles.d(5) for details]),
+ [], [
+ AS_IF([test "x$have_systemd" = xyes], [
+ PKG_CHECK_VAR([with_tmpfilesdir], [systemd], [tmpfilesdir],
+ [],
+ [with_tmpfilesdir=no])
+ ])
+])
+AS_IF([test "x$with_tmpfilesdir" != "xno"], [
+ AC_SUBST([tmpfilesdir], [$with_tmpfilesdir])
+])
AC_ARG_WITH([smack],
AS_HELP_STRING([--with-smack], [build with SMACK support]),
@@ -2879,8 +2992,10 @@ AC_MSG_RESULT([
Bash completions: ${with_bashcompletiondir}
Systemd support: ${have_systemd}
Systemd unitdir: ${with_systemdsystemunitdir}
+ tmpfilesdir: ${with_tmpfilesdir}
libeconf support: ${have_econf}
Btrfs support: ${have_btrfs}
+ lastlog2 support: ${build_liblastlog2}
Wide-char support: ${build_widechar}
libcryptsetup support: ${have_cryptsetup}
@@ -2892,7 +3007,8 @@ AC_MSG_RESULT([
ldflags: ${LDFLAGS}
suid ldflags: ${SUID_LDFLAGS}
ASAN enabled: ${enable_asan}
- Fuzzing enabled: ${enable_fuzzing_engine}
+ Fuzzing enabled: ${enable_fuzzing_engine}
+ Coverage enabled ${enable_coverage}
cflags: ${CFLAGS}