]> sourceware.org Git - lvm2.git/blobdiff - configure.in
dmsetup: allow --noflush with status/wait for thin
[lvm2.git] / configure.in
index ca7019ae66f2fbeea4e6907c4486de802fb78b68..8bf0c4e3cfdbaf8a40320cd9fc122652865b7ca9 100644 (file)
@@ -229,6 +229,20 @@ esac
 AC_MSG_RESULT(on $ADD_NODE)
 AC_DEFINE_UNQUOTED([DEFAULT_DM_ADD_NODE], $add_on, [Define default node creation behavior with dmsetup create])
 
+AC_MSG_CHECKING(default name mangling)
+AC_ARG_WITH(default-name-mangling,
+           AC_HELP_STRING([--with-default-name-mangling=MANGLING],
+                          [default name mangling: auto/none/hex [[MANGLING=auto]]]),
+           MANGLING=$withval, MANGLING=auto)
+case "$MANGLING" in
+ auto) mangling=DM_STRING_MANGLING_AUTO;;
+ disabled) mangling=DM_STRING_MANGLING_NONE;;
+ hex) mangling=DM_STRING_MANGLING_HEX;;
+ *) AC_MSG_ERROR([--with-default-name-mangling parameter invalid]);;
+esac
+AC_MSG_RESULT($MANGLING)
+AC_DEFINE_UNQUOTED([DEFAULT_DM_NAME_MANGLING], $mangling, [Define default name mangling behaviour])
+
 ################################################################################
 dnl -- LVM1 tool fallback option
 AC_MSG_CHECKING(whether to enable lvm1 fallback)
@@ -397,6 +411,24 @@ case "$THIN" in
   *) AC_MSG_ERROR([--with-thin parameter invalid ($THIN)]) ;;
 esac
 
+case "$THIN" in
+  internal|shared)
+       AC_ARG_WITH(thin-check,
+               AC_HELP_STRING([--with-thin-check=PATH],
+                              [thin_check tool: [[autodetect]]]),
+                              THIN_CHECK_CMD=$withval, THIN_CHECK_CMD="autodetect")
+       # Empty means a config way to ignore thin checking
+       if test "$THIN_CHECK_CMD" = "autodetect"; then
+               AC_PATH_PROG(THIN_CHECK_CMD, thin_check)
+               test -z "$THIN_CHECK_CMD" && AC_MSG_ERROR(thin_check not found in path $PATH)
+       fi
+       ;;
+esac
+
+AC_DEFINE_UNQUOTED([THIN_CHECK_CMD], ["$THIN_CHECK_CMD"],
+                  [The path to 'thin_check', if available.])
+
+
 ################################################################################
 dnl -- Disable readline
 AC_MSG_CHECKING(whether to enable readline)
@@ -437,6 +469,32 @@ pkg_config_init() {
        PKGCONFIG_INIT=1
 }
 
+################################################################################
+dnl -- Set up pidfile and run directory
+AH_TEMPLATE(DEFAULT_PID_DIR)
+AC_ARG_WITH(default-pid-dir,
+           AC_HELP_STRING([--with-default-pid-dir=PID_DIR],
+                          [Default directory to keep PID files in. [[/var/run]]]),
+           DEFAULT_PID_DIR="$withval", DEFAULT_PID_DIR="/var/run")
+AC_DEFINE_UNQUOTED(DEFAULT_PID_DIR, ["$DEFAULT_PID_DIR"],
+                  [Default directory to keep PID files in.])
+
+AH_TEMPLATE(DEFAULT_DM_RUN_DIR, [Name of default DM run directory.])
+AC_ARG_WITH(default-dm-run-dir,
+           AC_HELP_STRING([--with-default-dm-run-dir=DM_RUN_DIR],
+                          [ Default DM run directory. [[/var/run]]]),
+           DEFAULT_DM_RUN_DIR="$withval", DEFAULT_DM_RUN_DIR="/var/run")
+AC_DEFINE_UNQUOTED(DEFAULT_DM_RUN_DIR, ["$DEFAULT_DM_RUN_DIR"],
+                  [Default DM run directory.])
+
+AH_TEMPLATE(DEFAULT_RUN_DIR, [Name of default LVM run directory.])
+AC_ARG_WITH(default-run-dir,
+           AC_HELP_STRING([--with-default-run-dir=RUN_DIR],
+                          [Default LVM run directory. [[/var/run/lvm]]]),
+           DEFAULT_RUN_DIR="$withval", DEFAULT_RUN_DIR="/var/run/lvm")
+AC_DEFINE_UNQUOTED(DEFAULT_RUN_DIR, ["$DEFAULT_RUN_DIR"],
+                  [Default LVM run directory.])
+
 ################################################################################
 dnl -- Build cluster LVM daemon
 AC_MSG_CHECKING(whether to build cluster LVM daemon)
@@ -689,9 +747,9 @@ dnl -- clvmd pidfile
 if test "x$CLVMD" != xnone; then
        AC_ARG_WITH(clvmd-pidfile,
                    AC_HELP_STRING([--with-clvmd-pidfile=PATH],
-                                  [clvmd pidfile [[/var/run/clvmd.pid]]]),
+                                  [clvmd pidfile [[PID_DIR/clvmd.pid]]]),
                    CLVMD_PIDFILE=$withval,
-                   CLVMD_PIDFILE="/var/run/clvmd.pid")
+                   CLVMD_PIDFILE="$DEFAULT_PID_DIR/clvmd.pid")
        AC_DEFINE_UNQUOTED(CLVMD_PIDFILE, ["$CLVMD_PIDFILE"],
                           [Path to clvmd pidfile.])
 fi
@@ -712,9 +770,9 @@ dnl -- cmirrord pidfile
 if test "x$BUILD_CMIRRORD" = xyes; then
        AC_ARG_WITH(cmirrord-pidfile,
                    AC_HELP_STRING([--with-cmirrord-pidfile=PATH],
-                                  [cmirrord pidfile [[/var/run/cmirrord.pid]]]),
+                                  [cmirrord pidfile [[PID_DIR/cmirrord.pid]]]),
                    CMIRRORD_PIDFILE=$withval,
-                   CMIRRORD_PIDFILE="/var/run/cmirrord.pid")
+                   CMIRRORD_PIDFILE="$DEFAULT_PID_DIR/cmirrord.pid")
        AC_DEFINE_UNQUOTED(CMIRRORD_PIDFILE, ["$CMIRRORD_PIDFILE"],
                           [Path to cmirrord pidfile.])
 fi
@@ -726,7 +784,12 @@ if [[ "x$BUILD_CMIRRORD" = xyes ]]; then
        if  test x$PKGCONFIG_INIT != x1; then
                pkg_config_init
        fi
-       PKG_CHECK_MODULES(SACKPT, libSaCkpt)
+
+       AC_DEFINE([CMIRROR_HAS_CHECKPOINT], 1, [Define to 1 to include libSaCkpt.])
+       PKG_CHECK_MODULES(SACKPT, libSaCkpt, [HAVE_SACKPT=yes],
+               [AC_MSG_RESULT([no libSaCkpt, compiling without it])
+               AC_DEFINE([CMIRROR_HAS_CHECKPOINT], 0, [Define to 0 to exclude libSaCkpt.])])
+
        if test x$HAVE_CPG != xyes; then
                PKG_CHECK_MODULES(CPG, libcpg)
        fi
@@ -833,6 +896,18 @@ AC_MSG_RESULT($LVMETAD)
 
 BUILD_LVMETAD=$LVMETAD
 
+if test x$BUILD_LVMETAD = xyes; then
+       AC_DEFINE([LVMETAD_SUPPORT], 1, [Define to 1 to include code that uses lvmetad.])
+
+       AC_ARG_WITH(lvmetad-pidfile,
+                   AC_HELP_STRING([--with-lvmetad-pidfile=PATH],
+                                  [lvmetad pidfile [[PID_DIR/lvmetad.pid]]]),
+                   LVMETAD_PIDFILE=$withval,
+                   LVMETAD_PIDFILE="$DEFAULT_PID_DIR/lvmetad.pid")
+       AC_DEFINE_UNQUOTED(LVMETAD_PIDFILE, ["$LVMETAD_PIDFILE"],
+                          [Path to lvmetad pidfile.])
+fi
+
 ################################################################################
 dnl -- Enable udev synchronisation
 AC_MSG_CHECKING(whether to enable synchronisation with udev processing)
@@ -859,6 +934,23 @@ AC_ARG_ENABLE(udev_rules,
              UDEV_RULES=$enableval, UDEV_RULES=$UDEV_SYNC)
 AC_MSG_RESULT($UDEV_RULES)
 
+AC_MSG_CHECKING(whether to enable executable path detection in udev rules)
+AC_ARG_ENABLE(udev_rule_exec_detection,
+             AC_HELP_STRING([--enable-udev-rule-exec-detection],
+                            [enable executable path detection in udev rules]),
+             UDEV_RULE_EXEC_DETECTION=$enableval, UDEV_RULE_EXEC_DETECTION=no)
+AC_MSG_RESULT($UDEV_RULE_EXEC_DETECTION)
+
+dnl -- Check support for built-in blkid against target udev version
+AC_MSG_CHECKING(whether udev supports built-in blkid)
+test x$PKGCONFIG_INIT != x1 && pkg_config_init
+if $($PKG_CONFIG --atleast-version=176 libudev); then
+       UDEV_HAS_BUILTIN_BLKID=yes
+else
+       UDEV_HAS_BUILTIN_BLKID=no
+fi
+AC_MSG_RESULT($UDEV_HAS_BUILTIN_BLKID)
+
 ################################################################################
 dnl -- Compatibility mode
 AC_ARG_ENABLE(compat,
@@ -1168,6 +1260,29 @@ AC_ARG_WITH(udevdir,
            udevdir=$withval, udevdir='${udev_prefix}/lib/udev/rules.d')
 
 ################################################################################
+dnl -- Get the systemd system unit dir value from pkg_config automatically if value not given explicitly.
+dnl -- This follows the recommendation for systemd integration best practices mentioned in daemon(7) manpage.
+AC_ARG_WITH(systemdsystemunitdir,
+           AC_HELP_STRING([--with-systemdsystemunitdir=DIR],
+                          [systemd service files in DIR]),
+           systemdsystemunitdir=$withval,
+           dnl -- init pkgconfig if required
+           test x$PKGCONFIG_INIT != x1 && pkg_config_init
+           pkg_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd))
+
+if test -n "$pkg_systemdsystemunitdir"; then
+           systemdsystemunitdir=$pkg_systemdsystemunitdir;
+fi
+
+if test -z "$systemdsystemunitdir"; then
+           systemdsystemunitdir='/lib/systemd/system';
+fi
+################################################################################
+AC_ARG_WITH(tmpfilesdir,
+           AC_HELP_STRING([--with-tmpfilesdir=DIR],
+                          [install configuration files for management of volatile files and directories in DIR [[PREFIX/lib/tmpfiles.d]]]),
+                          tmpfilesdir=$withval, tmpfilesdir='${prefix}/lib/tmpfiles.d')
+################################################################################
 dnl -- Ensure additional headers required
 if test x$READLINE = xyes; then
        AC_CHECK_HEADERS(readline/readline.h readline/history.h,,AC_MSG_ERROR(bailing out))
@@ -1227,9 +1342,9 @@ dnl -- dmeventd pidfile and executable path
 if test "$BUILD_DMEVENTD" = yes; then
        AC_ARG_WITH(dmeventd-pidfile,
                    AC_HELP_STRING([--with-dmeventd-pidfile=PATH],
-                                  [dmeventd pidfile [[/var/run/dmeventd.pid]]]),
+                                  [dmeventd pidfile [[PID_DIR/dmeventd.pid]]]),
                    DMEVENTD_PIDFILE=$withval,
-                   DMEVENTD_PIDFILE="/var/run/dmeventd.pid")
+                   DMEVENTD_PIDFILE="$DEFAULT_PID_DIR/dmeventd.pid")
        AC_DEFINE_UNQUOTED(DMEVENTD_PIDFILE, ["$DMEVENTD_PIDFILE"],
                           [Path to dmeventd pidfile.])
 fi
@@ -1244,13 +1359,6 @@ if test "$BUILD_DMEVENTD" = yes; then
                           [Path to dmeventd binary.])
 fi
 
-AH_TEMPLATE(DEFAULT_RUN_DIR, [Name of default run directory.])
-AC_ARG_WITH(default-run-dir,
-           [  --with-default-run-dir=DIR       Default run directory [[/var/run/lvm]] ],
-           [ DEFAULT_RUN_DIR="$withval" ],
-           [ DEFAULT_RUN_DIR="/var/run/lvm" ])
-AC_DEFINE_UNQUOTED(DEFAULT_RUN_DIR,["$DEFAULT_RUN_DIR"] )
-
 ################################################################################
 dnl -- various defaults
 AC_ARG_WITH(default-system-dir,
@@ -1362,6 +1470,7 @@ AC_SUBST(DEFAULT_BACKUP_SUBDIR)
 AC_SUBST(DEFAULT_CACHE_SUBDIR)
 AC_SUBST(DEFAULT_DATA_ALIGNMENT)
 AC_SUBST(DEFAULT_LOCK_DIR)
+AC_SUBST(DEFAULT_DM_RUN_DIR)
 AC_SUBST(DEFAULT_RUN_DIR)
 AC_SUBST(DEVMAPPER)
 AC_SUBST(DLM_CFLAGS)
@@ -1420,14 +1529,18 @@ AC_SUBST(STATICDIR)
 AC_SUBST(STATIC_LINK)
 AC_SUBST(TESTING)
 AC_SUBST(THIN)
+AC_SUBST(THIN_CHECK_CMD)
 AC_SUBST(UDEV_LIBS)
 AC_SUBST(UDEV_PC)
 AC_SUBST(UDEV_RULES)
 AC_SUBST(UDEV_SYNC)
+AC_SUBST(UDEV_RULE_EXEC_DETECTION)
+AC_SUBST(UDEV_HAS_BUILTIN_BLKID)
 AC_SUBST(CUNIT_LIBS)
 AC_SUBST(CUNIT_CFLAGS)
 AC_SUBST(WRITE_INSTALL)
 AC_SUBST(DMEVENTD_PIDFILE)
+AC_SUBST(LVMETAD_PIDFILE)
 AC_SUBST(interface)
 AC_SUBST(kerneldir)
 AC_SUBST(missingkernel)
@@ -1435,6 +1548,8 @@ AC_SUBST(kernelvsn)
 AC_SUBST(tmpdir)
 AC_SUBST(udev_prefix)
 AC_SUBST(udevdir)
+AC_SUBST(systemdsystemunitdir)
+AC_SUBST(tmpfilesdir)
 AC_SUBST(usrlibdir)
 AC_SUBST(usrsbindir)
 
@@ -1447,7 +1562,6 @@ make.tmpl
 daemons/Makefile
 daemons/clvmd/Makefile
 daemons/cmirrord/Makefile
-daemons/common/Makefile
 daemons/dmeventd/Makefile
 daemons/dmeventd/libdevmapper-event.pc
 daemons/dmeventd/plugins/Makefile
@@ -1471,6 +1585,9 @@ lib/misc/lvm-version.h
 lib/raid/Makefile
 lib/snapshot/Makefile
 lib/thin/Makefile
+libdaemon/Makefile
+libdaemon/client/Makefile
+libdaemon/server/Makefile
 libdm/Makefile
 libdm/libdevmapper.pc
 liblvm/Makefile
@@ -1479,9 +1596,14 @@ man/Makefile
 po/Makefile
 scripts/clvmd_init_red_hat
 scripts/cmirrord_init_red_hat
+scripts/lvm2_lvmetad_init_red_hat
+scripts/lvm2_lvmetad_systemd_red_hat.socket
+scripts/lvm2_lvmetad_systemd_red_hat.service
 scripts/lvm2_monitoring_init_red_hat
+scripts/dm_event_systemd_red_hat.socket
 scripts/dm_event_systemd_red_hat.service
 scripts/lvm2_monitoring_systemd_red_hat.service
+scripts/lvm2_tmpfiles_red_hat.conf
 scripts/Makefile
 test/Makefile
 test/api/Makefile
This page took 0.028363 seconds and 5 git commands to generate.