]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - configure.ac
audit-arch.h: add defines for m68k, sh
[thirdparty/util-linux.git] / configure.ac
index 913e50449f1fe521e447fbcdb140a479c08af4b0..2fff2de09d54ef0deb59f51899f05d09fe3f0395 100644 (file)
@@ -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="17-May-2023"
+LIBBLKID_DATE="24-Jan-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])
 
 
@@ -280,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])
@@ -325,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 \
@@ -343,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 \
@@ -498,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
@@ -588,6 +601,9 @@ AC_CHECK_FUNCS([ \
        getttynam \
        inotify_init \
        jrand48 \
+       landlock_create_ruleset \
+       landlock_add_rule \
+       landlock_restrict_self \
        lchown \
        lgetxattr \
        llistxattr \
@@ -607,6 +623,7 @@ AC_CHECK_FUNCS([ \
        prctl \
        qsort_r \
        reallocarray \
+       renameat2 \
        rpmatch \
        scandirat \
        sched_setattr \
@@ -646,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])
@@ -656,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])
@@ -787,7 +804,7 @@ AC_CHECK_DECL([IOC_OPAL_GET_STATUS],
              [#include <linux/sed-opal.h>])
 
 dnl Static compilation
-m4_define([UL_STATIC_PROGRAMS], [blkid, fdisk, losetup, mount, nsenter, sfdisk, umount, unshare])
+m4_define([UL_STATIC_PROGRAMS], [blkid, fdisk, losetup, mount, nsenter, partx, sfdisk, umount, unshare])
 
 AC_ARG_ENABLE([static-programs],
   [AS_HELP_STRING([--enable-static-programs=LIST],
@@ -1204,6 +1221,39 @@ AS_IF([test "x$build_libuuid" = xyes], [
   AC_DEFINE(HAVE_LIBUUID, 1, [Define to 1 if you have the -luuid.])
 ])
 
+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
@@ -1798,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],
@@ -1913,6 +1962,7 @@ 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])
@@ -2105,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])
@@ -2353,6 +2412,16 @@ AS_IF([test "x$enable_login_stat_mail" = xyes], [
   AC_DEFINE([LOGIN_STAT_MAIL], [1], [Should login stat() the mailbox?])
 ])
 
+AC_ARG_ENABLE([login-lastlog],
+  AS_HELP_STRING([--enable-login-lastlog], [program login writes lastlog entries]),
+  [], [enable_login_lastlogin=no]
+)
+
+AS_IF([test "x$enable_login_lastlogin" != xno], [
+  AC_DEFINE([USE_LOGIN_LASTLOG],
+           [1],
+           [Define if program login writes lastlog entries])
+])
 
 AC_ARG_ENABLE([nologin],
   AS_HELP_STRING([--disable-nologin], [do not build nologin]),
@@ -2578,6 +2647,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]),
@@ -2921,8 +3002,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}