]> sourceware.org Git - lvm2.git/blobdiff - configure.in
dmsetup: allow --noflush with status/wait for thin
[lvm2.git] / configure.in
index e06390a74170a2c1e2df5fc4aa7134825fdeed2c..8bf0c4e3cfdbaf8a40320cd9fc122652865b7ca9 100644 (file)
@@ -1,6 +1,6 @@
 ###############################################################################
 ## Copyright (C) 2000-2004 Sistina Software, Inc. All rights reserved.
-## Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
+## Copyright (C) 2004-2012 Red Hat, Inc. All rights reserved.
 ##
 ## This copyrighted material is made available to anyone wishing to use,
 ## modify, copy, or redistribute it subject to the terms and conditions
@@ -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)
@@ -549,6 +607,7 @@ if test x$BUILDCOROSYNC = xyes || \
    test x$BUILDOPENAIS = xyes; then
        PKG_CHECK_MODULES(COROSYNC, corosync, [HAVE_COROSYNC=yes], $bailout)
        CHECKCONFDB=yes
+       CHECKCMAP=yes
 fi
 
 dnl -- Look for corosync libraries if required.
@@ -567,7 +626,7 @@ fi
 dnl -- Below are checks for libraries common to more than one build.
 
 dnl -- Check confdb library.
-dnl -- mandatory for corosync build.
+dnl -- mandatory for corosync < 2.0 build.
 dnl -- optional for openais/cman build.
 
 if test x$CHECKCONFDB = xyes; then
@@ -586,11 +645,34 @@ if test x$CHECKCONFDB = xyes; then
                CONFDB_LIBS="-lconfdb"
                HAVE_CONFDB=yes
        fi
+fi
+
+dnl -- Check cmap library
+dnl -- mandatory for corosync >= 2.0 build.
+
+if test x$CHECKCMAP = xyes; then
+       PKG_CHECK_MODULES(CMAP, libcmap,
+                         [HAVE_CMAP=yes],
+                         [HAVE_CMAP=no])
+
+       AC_CHECK_HEADERS(corosync/cmap.h,
+               [HAVE_CMAP_H=yes],
+               [HAVE_CMAP_H=no])
+
+       if test x$HAVE_CMAP != xyes && \ 
+          test x$HAVE_CMAP_H = xyes; then
+               check_lib_no_libs cmap cmap_initialize
+               AC_MSG_RESULT([no pkg for cmap, using -lcmap])
+               CMAP_LIBS="-lcmap"
+               HAVE_CMAP=yes
+       fi
+fi
 
-       if test x$BUILDCOROSYNC = xyes && \
-          test x$HAVE_CONFDB != xyes &&
+if test x$BUILDCOROSYNC = xyes; then
+       if test x$HAVE_CMAP != xyes && \
+          test x$HAVE_CONFDB != xyes && \
           test x$CLVMD != xall; then
-               AC_MSG_ERROR([bailing out... confdb library is required])
+               AC_MSG_ERROR([bailing out... cmap (corosync >= 2.0) or confdb (corosync < 2.0) library is required])
        fi
 fi
 
@@ -629,11 +711,12 @@ if test x$CLVMD = xall; then
        if test x$HAVE_COROSYNC = xyes && \
           test x$HAVE_QUORUM = xyes && \
           test x$HAVE_CPG = xyes && \
-          test x$HAVE_DLM = xyes && \
-          test x$HAVE_CONFDB = xyes; then
+          test x$HAVE_DLM = xyes; then
+          if test x$HAVE_CONFDB = xyes || test x$HAVE_CMAP = xyes; then
                AC_MSG_RESULT([Enabling clvmd corosync cluster manager])
                CLVMD="$CLVMD,corosync"
                CLVMD_CMANAGERS="$CLVMD_CMANAGERS corosync"
+          fi
        fi
        if test x$HAVE_COROSYNC = xyes && \
           test x$HAVE_CPG = xyes && \
@@ -650,14 +733,23 @@ if test x$CLVMD = xall; then
        fi
 fi
 
+dnl -- Fixup CLVMD_CMANAGERS with new corosync
+dnl -- clvmd built with corosync >= 2.0 needs dlm (either init or systemd service)
+dnl -- to be started.
+if [[ `expr x"$CLVMD" : '.*corosync.*'` != 0 ]]; then
+   if test x$HAVE_CMAP = xyes; then
+       CLVMD_CMANAGERS="$CLVMD_CMANAGERS dlm"
+   fi
+fi
+
 ################################################################################
 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
@@ -678,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
@@ -692,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
@@ -759,11 +856,7 @@ AC_ARG_ENABLE(testing,
 AC_MSG_RESULT($TESTING)
 
 if test "$TESTING" = yes; then
-   AC_PATH_PROG(RUBY19, ruby1.9)
-   AC_PATH_PROG(VALGRIND, valgrind)
-   if test -z "$RUBY19" -o -z "$VALGRIND"; then
-       AC_MSG_ERROR([ruby1.9 and valgrind are required for testing])
-   fi
+       PKG_CHECK_MODULES(CUNIT, cunit >= 2.0)
 fi
 
 ################################################################################
@@ -796,13 +889,25 @@ fi
 dnl -- Build lvmetad
 AC_MSG_CHECKING(whether to build LVMetaD)
 AC_ARG_ENABLE(lvmetad,
-             AC_HELP_STRING([--disable-lvmetad],
-                            [disable the LVM Metadata Daemon]),
+             AC_HELP_STRING([--enable-lvmetad],
+                            [enable the LVM Metadata Daemon]),
              LVMETAD=$enableval)
 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)
@@ -829,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,
@@ -1138,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))
@@ -1197,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
@@ -1214,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,
@@ -1315,6 +1453,8 @@ AC_SUBST(CLVMD_CMANAGERS)
 AC_SUBST(CLVMD_PATH)
 AC_SUBST(CMAN_CFLAGS)
 AC_SUBST(CMAN_LIBS)
+AC_SUBST(CMAP_CFLAGS)
+AC_SUBST(CMAP_LIBS)
 AC_SUBST(CMDLIB)
 AC_SUBST(CONFDB_CFLAGS)
 AC_SUBST(CONFDB_LIBS)
@@ -1330,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)
@@ -1388,12 +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)
@@ -1401,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)
 
@@ -1413,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
@@ -1421,6 +1569,7 @@ daemons/dmeventd/plugins/lvm2/Makefile
 daemons/dmeventd/plugins/raid/Makefile
 daemons/dmeventd/plugins/mirror/Makefile
 daemons/dmeventd/plugins/snapshot/Makefile
+daemons/dmeventd/plugins/thin/Makefile
 daemons/lvmetad/Makefile
 doc/Makefile
 doc/example.conf
@@ -1436,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
@@ -1444,12 +1596,18 @@ 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
+test/unit/Makefile
 tools/Makefile
 udev/Makefile
 unit-tests/datastruct/Makefile
This page took 0.032791 seconds and 5 git commands to generate.