;;
esac
+VERITYSETUP=no
+
################################################################################
dnl -- Checks for programs.
AC_PROG_SED
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)
*) 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)
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
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)
UDEV_RULES=$enableval, UDEV_RULES=$UDEV_SYNC)
AC_MSG_RESULT($UDEV_RULES)
+if test x$UDEV_RULES = xyes; then
+ AC_MSG_CHECKING(whether udev supports builtin blkid)
+ udev_version=$(udevadm info --version 2>/dev/null)
+ if test -n "$udev_version" && test "$udev_version" -ge 176; then
+ UDEV_HAS_BUILTIN_BLKID=yes
+ else
+ UDEV_HAS_BUILTIN_BLKID=no
+ fi
+ AC_MSG_RESULT($UDEV_HAS_BUILTIN_BLKID)
+fi
+
################################################################################
dnl -- Compatibility mode
AC_ARG_ENABLE(compat,
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
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='/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 [[SYSCONFDIR/tmpfiles.d]]]),
+ tmpfilesdir=$withval, tmpfilesdir='${sysconfdir}/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))
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_HAS_BUILTIN_BLKID)
AC_SUBST(CUNIT_LIBS)
AC_SUBST(CUNIT_CFLAGS)
AC_SUBST(WRITE_INSTALL)
AC_SUBST(udev_prefix)
AC_SUBST(udevdir)
AC_SUBST(systemdsystemunitdir)
+AC_SUBST(tmpfilesdir)
AC_SUBST(usrlibdir)
AC_SUBST(usrsbindir)
daemons/Makefile
daemons/clvmd/Makefile
daemons/cmirrord/Makefile
-daemons/common/Makefile
daemons/dmeventd/Makefile
daemons/dmeventd/libdevmapper-event.pc
daemons/dmeventd/plugins/Makefile
lib/raid/Makefile
lib/snapshot/Makefile
lib/thin/Makefile
+libdaemon/Makefile
+libdaemon/client/Makefile
+libdaemon/server/Makefile
libdm/Makefile
libdm/libdevmapper.pc
liblvm/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.service
scripts/lvm2_monitoring_systemd_red_hat.service
+scripts/lvm2_tmpfiles_red_hat.conf
scripts/Makefile
test/Makefile
test/api/Makefile
unit-tests/datastruct/Makefile
unit-tests/regex/Makefile
unit-tests/mm/Makefile
+verity/Makefile
])
AC_OUTPUT