]> sourceware.org Git - lvm2.git/blobdiff - configure.in
Refer to details of snapshot of raid problem.
[lvm2.git] / configure.in
index 1e9fd17c8ee9e93efe8cc8e371a31184c27bc958..5e8c6f9826778130579705dc6cc6e905920e1611 100644 (file)
@@ -62,6 +62,8 @@ case "$host_os" in
                ;;
 esac
 
+VERITYSETUP=no
+
 ################################################################################
 dnl -- Checks for programs.
 AC_PROG_SED
@@ -411,6 +413,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)
@@ -740,7 +760,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
@@ -847,6 +872,10 @@ 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.])
+fi
+
 ################################################################################
 dnl -- Enable udev synchronisation
 AC_MSG_CHECKING(whether to enable synchronisation with udev processing)
@@ -1002,6 +1031,71 @@ if test x$DMEVENTD = xyes; then
        AC_DEFINE([DMEVENTD], 1, [Define to 1 to enable the device-mapper event daemon.])
 fi
 
+################################################################################
+dnl -- enable veritysetup
+AC_MSG_CHECKING(whether to install veritysetup)
+AC_ARG_WITH(veritysetup, AC_HELP_STRING([--with-veritysetup=TYPE], [build veritysetup using openssl/nss/gcrypt]),
+             VERITYSETUP=$withval)
+AC_MSG_RESULT($VERITYSETUP)
+
+if test x$VERITYSETUP != xno -a x$VERITYSETUP != x; then
+       if test x$PKGCONFIG_INIT != x1; then
+               pkg_config_init
+       fi
+
+       dnl Test OPENSSL
+       if test -z "$VERITYSETUP_CFLAGS" && test x$VERITYSETUP = xyes -o x$VERITYSETUP = xopenssl; then
+               PKG_CHECK_MODULES(OPENSSL, openssl, [
+                       AC_DEFINE([CRYPT_OPENSSL], 1, [Define to 1 if OpenSSL encryption is to be used.])
+                       VERITYSETUP_CFLAGS="$OPENSSL_CFLAGS"
+                       VERITYSETUP_LIBS="`echo "$OPENSSL_LIBS" | sed 's/-lssl\>//'`"
+               ], [
+                       AC_CHECK_LIB(crypto, EVP_get_digestbyname, [
+                               AC_CHECK_HEADER(openssl/evp.h, [
+                                       AC_DEFINE([CRYPT_OPENSSL], 1, [Define to 1 if OpenSSL encryption is to be used.])
+                                       VERITYSETUP_CFLAGS=
+                                       VERITYSETUP_LIBS="-lcrypto"
+                               ])
+                       ])
+               ])
+       fi
+
+       dnl Test NSS
+       if test -z "$VERITYSETUP_CFLAGS" && test x$VERITYSETUP = xyes -o x$VERITYSETUP = xnss; then
+               PKG_CHECK_MODULES(NSS, nss, [
+                       AC_DEFINE([CRYPT_NSS], 1, [Define to 1 if nss encryption is to be used.])
+                       VERITYSETUP_CFLAGS="$NSS_CFLAGS"
+                       VERITYSETUP_LIBS="`echo "$NSS_LIBS" | sed 's/-lsmime3\>//' | sed 's/-lssl3\>//'`"
+               ], true)
+       fi
+
+       dnl Test GCRYPT
+       if test -z "$VERITYSETUP_CFLAGS" && test x$VERITYSETUP = xyes -o x$VERITYSETUP = xgcrypt; then
+               AC_CHECK_LIB(gcrypt, gcry_md_map_name, [
+                       AC_CHECK_HEADER(gcrypt.h, [
+                               AC_DEFINE([CRYPT_GCRYPT], 1, [Define to 1 if gcrpyt encryption is to be used.])
+                               VERITYSETUP_CFLAGS=
+                               VERITYSETUP_LIBS="-lgcrypt"
+                       ])
+               ])
+       fi
+
+       if test -z "$VERITYSETUP_LIBS"; then
+               AC_MSG_ERROR(No cryptographic library for veritysetup found)
+       fi
+       AC_CHECK_LIB(popt, poptGetContext, true, [
+               AC_MSG_ERROR(popt library was not found)
+       ])
+       AC_CHECK_HEADER(popt.h, true, [
+               AC_MSG_ERROR(popt.h was not found)
+       ])
+       VERITYSETUP_LIBS="$VERITYSETUP_LIBS -lpopt"
+       AC_SUBST(VERITYSETUP_CFLAGS)
+       AC_SUBST(VERITYSETUP_LIBS)
+       VERITYSETUP=yes
+fi
+AC_SUBST(VERITYSETUP)
+
 ################################################################################
 dnl -- getline included in recent libc
 
@@ -1199,6 +1293,8 @@ 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
@@ -1466,6 +1562,7 @@ 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)
@@ -1496,7 +1593,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
@@ -1520,6 +1616,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
@@ -1544,6 +1643,7 @@ udev/Makefile
 unit-tests/datastruct/Makefile
 unit-tests/regex/Makefile
 unit-tests/mm/Makefile
+verity/Makefile
 ])
 AC_OUTPUT
 
This page took 0.027922 seconds and 5 git commands to generate.