]> sourceware.org Git - lvm2.git/blobdiff - configure.in
Reinstate accidentally-deleted line.
[lvm2.git] / configure.in
index 244bfc85e54f62691da0cb7601b1bc3007748dd0..c056984d8a1210b6d9026f5d3ef18ff1a7f7148c 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
@@ -31,10 +31,11 @@ case "$host_os" in
                CFLAGS="$CFLAGS"
                COPTIMISE_FLAG="-O2"
                CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym"
+               ELDFLAGS="-Wl,--export-dynamic"
+               # FIXME Generate list and use --dynamic-list=.dlopen.sym
                CLDWHOLEARCHIVE="-Wl,-whole-archive"
                CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
                LDDEPS="$LDDEPS .export.sym"
-               LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
                LIB_SUFFIX=so
                DEVMAPPER=yes
                LVMETAD=no
@@ -48,6 +49,7 @@ case "$host_os" in
                CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
                COPTIMISE_FLAG="-O2"
                CLDFLAGS="$CLDFLAGS"
+               ELDFLAGS=
                CLDWHOLEARCHIVE="-all_load"
                CLDNOWHOLEARCHIVE=
                LIB_SUFFIX=dylib
@@ -227,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)
@@ -547,6 +563,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.
@@ -565,7 +582,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
@@ -584,11 +601,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$BUILDCOROSYNC = xyes && \
-          test x$HAVE_CONFDB != xyes &&
+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; 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
 
@@ -627,11 +667,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 && \
@@ -648,6 +689,15 @@ 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
@@ -690,7 +740,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
@@ -757,11 +812,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
 
 ################################################################################
@@ -794,13 +845,17 @@ 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.])
+fi
+
 ################################################################################
 dnl -- Enable udev synchronisation
 AC_MSG_CHECKING(whether to enable synchronisation with udev processing)
@@ -827,6 +882,17 @@ AC_ARG_ENABLE(udev_rules,
              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,
@@ -1136,6 +1202,27 @@ 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,
+           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 [[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))
@@ -1313,6 +1400,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)
@@ -1342,6 +1431,7 @@ AC_SUBST(DM_DEVICE_UID)
 AC_SUBST(DM_IOCTLS)
 AC_SUBST(DM_LIB_VERSION)
 AC_SUBST(DM_LIB_PATCHLEVEL)
+AC_SUBST(ELDFLAGS)
 AC_SUBST(FSADM)
 AC_SUBST(HAVE_LIBDL)
 AC_SUBST(HAVE_REALTIME)
@@ -1389,6 +1479,9 @@ 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(DMEVENTD_PIDFILE)
 AC_SUBST(interface)
@@ -1398,6 +1491,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)
 
@@ -1417,6 +1512,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
@@ -1432,6 +1528,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
@@ -1440,12 +1539,17 @@ 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.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.02914 seconds and 5 git commands to generate.