]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - configure.ac
mount: add verity example to man page
[thirdparty/util-linux.git] / configure.ac
index 98a5a6c96b5a354c62fe5025d1d50ccfdf4fd1e4..34923e349d3708766160cbcce2b7e70eaa7b4c7c 100644 (file)
@@ -101,6 +101,14 @@ AS_CASE([$libdir],
 )
 AC_SUBST([usrlib_execdir])
 
+# static configuration maintaned by packages (e.g. /usr/lib)
+AC_ARG_VAR([SYSCONFSTATICDIR],
+          [Path to static system configuration, default ${prefix}/lib])
+AS_IF([test "x$SYSCONFSTATICDIR" = x],
+      [sysconfstaticdir='${prefix}/lib'],
+      [sysconfstaticdir=$SYSCONFSTATICDIR])
+AC_SUBST([sysconfstaticdir])
+
 
 AM_PROG_CC_C_O
 AC_PROG_MKDIR_P
@@ -733,7 +741,7 @@ AS_CASE([$scanf_cv_alloc_modifier],
    have_scanf_alloc_modifier=no]
 )
 
-
+have_pty=no
 AC_ARG_WITH([util], AS_HELP_STRING([--without-util], [compile without libutil]),
   [], [with_util=auto]
 )
@@ -747,6 +755,7 @@ AS_IF([test "x$with_util" = xno], [
 AS_IF([test "x$have_pty_h" = xyes -a "x$have_sys_signalfd_h" = xyes -a "x$have_util" = xyes], [
    AM_CONDITIONAL([HAVE_PTY], [true])
    AC_DEFINE([HAVE_PTY], [1], [have PTY support])
+   have_pty=yes
 ], [
    AM_CONDITIONAL([HAVE_PTY], [false])
 ])
@@ -1285,7 +1294,11 @@ UL_BUILD_INIT([findfs], [check])
 UL_REQUIRES_BUILD([findfs], [libblkid])
 AM_CONDITIONAL([BUILD_FINDFS], [test "x$build_findfs" = xyes])
 
-UL_BUILD_INIT([wipefs], [check])
+AC_ARG_ENABLE([wipefs],
+  AS_HELP_STRING([--disable-wipefs], [do not build wipefs]),
+  [], [UL_DEFAULT_ENABLE([wipefs], [check])]
+)
+UL_BUILD_INIT([wipefs])
 UL_REQUIRES_BUILD([wipefs], [libblkid])
 UL_REQUIRES_BUILD([wipefs], [libsmartcols])
 AM_CONDITIONAL([BUILD_WIPEFS], [test "x$build_wipefs" = xyes])
@@ -1821,13 +1834,14 @@ UL_REQUIRES_LINUX([setarch])
 AM_CONDITIONAL([BUILD_SETARCH], [test "x$build_setarch" = xyes])
 
 UL_BUILD_INIT([script], [check])
-UL_REQUIRES_HAVE([script], [sys_signalfd_h], [sys/signalfd.h header])
+UL_REQUIRES_HAVE([script], [pty])
 AM_CONDITIONAL([BUILD_SCRIPT], [test "x$build_script" = xyes])
 
 UL_BUILD_INIT([scriptreplay], [yes])
 AM_CONDITIONAL([BUILD_SCRIPTREPLAY], [test "x$build_scriptreplay" = xyes])
 
 UL_BUILD_INIT([scriptlive], [yes])
+UL_REQUIRES_HAVE([scriptlive], [pty])
 AM_CONDITIONAL([BUILD_SCRIPTLIVE], [test "x$build_scriptlive" = xyes])
 
 UL_BUILD_INIT([col], [yes])
@@ -2412,6 +2426,30 @@ AS_IF([test "x$enable_colors_default" = xyes], [
 ])
 
 
+AC_ARG_WITH([cryptsetup],
+  AS_HELP_STRING([--with-cryptsetup], [compile with cryptsetup support]),
+  [], [with_cryptsetup=no]
+)
+
+AS_IF([test "x$with_cryptsetup" = xno], [
+  AM_CONDITIONAL([HAVE_CRYPTSETUP], [false])
+], [
+  PKG_CHECK_MODULES([CRYPTSETUP], [libcryptsetup],
+       [AC_DEFINE([HAVE_CRYPTSETUP], [1], [Define if cryptsetup is available])
+        UL_PKG_STATIC([CRYPTSETUP_LIBS_STATIC], [libcryptsetup])
+        AM_CONDITIONAL([HAVE_CRYPTSETUP], [true])
+        have_cryptsetup=yes],
+       [have_cryptsetup=no
+   AM_CONDITIONAL([HAVE_CRYPTSETUP], [false])])
+
+  AS_CASE([$with_cryptsetup:$have_cryptsetup],
+    [yes:no], [AC_MSG_WARN([cryptsetup selected but libcryptsetup not found])]
+  )
+])
+AC_SUBST([CRYPTSETUP_LIBS])
+AC_SUBST([CRYPTSETUP_LIBS_STATIC])
+
+
 AC_ARG_VAR([SUID_CFLAGS],
           [CFLAGS used for binaries which are usually with the suid bit])
 AC_ARG_VAR([SUID_LDFLAGS],