]> sourceware.org Git - lvm2.git/commitdiff
configure: add --enable-blkid_wiping
authorPeter Rajnoha <prajnoha@redhat.com>
Thu, 14 Nov 2013 13:03:24 +0000 (14:03 +0100)
committerPeter Rajnoha <prajnoha@redhat.com>
Wed, 27 Nov 2013 14:48:16 +0000 (15:48 +0100)
WHATS_NEW
configure
configure.in
lib/misc/configure.h.in
liblvm/liblvm2app.pc.in
make.tmpl.in
tools/Makefile.in

index b4d683ddae271492fd5936bdf5751983cd632f2c..9823cd141c845effea794a329ae88441b477fa42 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.105 -
 =====================================
+  Add configure --enable-blkid_wiping to use libblkid to detect signatures.
   Add -W/--wipesignatures lvcreate option to support wiping on new LVs.
   Add allocation/wipe_signatures_on_new_logical_volumes_when_zeroing to lvm.conf.
   Do not fail the whole autoactivation if the VG refresh done before fails.
index 9418d5345f03dd46d38dab0a422844d55750d933..8247ddd548b419eb67ec41a6daeaf6bd90308c0a 100755 (executable)
--- a/configure
+++ b/configure
@@ -691,6 +691,8 @@ CLDFLAGS
 BUILD_LVMETAD
 BUILD_DMEVENTD
 BUILD_CMIRRORD
+BLKID_WIPING
+BLKID_PC
 APPLIB
 MODPROBE_CMD
 MSGFMT
@@ -700,6 +702,8 @@ LVM2CMD_LIB
 LVM2APP_LIB
 UDEV_LIBS
 UDEV_CFLAGS
+BLKID_LIBS
+BLKID_CFLAGS
 VALGRIND_POOL
 VALGRIND_LIBS
 VALGRIND_CFLAGS
@@ -852,6 +856,7 @@ enable_valgrind_pool
 enable_devmapper
 enable_lvmetad
 with_lvmetad_pidfile
+enable_blkid_wiping
 enable_udev_systemd_background_jobs
 enable_udev_sync
 enable_udev_rules
@@ -926,6 +931,8 @@ CUNIT_CFLAGS
 CUNIT_LIBS
 VALGRIND_CFLAGS
 VALGRIND_LIBS
+BLKID_CFLAGS
+BLKID_LIBS
 UDEV_CFLAGS
 UDEV_LIBS'
 
@@ -1556,6 +1563,7 @@ Optional Features:
   --enable-valgrind-pool  enable valgrind awareness of pools
   --disable-devmapper     disable LVM2 device-mapper interaction
   --enable-lvmetad        enable the LVM Metadata Daemon
+  --enable-blkid_wiping   use wiping functionality provided by libblkid
   --enable-udev-systemd-background-jobs
                           enable udev-systemd protocol to instantiate a
                           service for background job
@@ -1716,6 +1724,9 @@ Some influential environment variables:
               C compiler flags for VALGRIND, overriding pkg-config
   VALGRIND_LIBS
               linker flags for VALGRIND, overriding pkg-config
+  BLKID_CFLAGS
+              C compiler flags for BLKID, overriding pkg-config
+  BLKID_LIBS  linker flags for BLKID, overriding pkg-config
   UDEV_CFLAGS C compiler flags for UDEV, overriding pkg-config
   UDEV_LIBS   linker flags for UDEV, overriding pkg-config
 
@@ -9173,6 +9184,120 @@ _ACEOF
 
 fi
 
+################################################################################
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use blkid wiping functionality" >&5
+$as_echo_n "checking whether to use blkid wiping functionality... " >&6; }
+# Check whether --enable-blkid-wiping was given.
+if test "${enable_blkid_wiping+set}" = set; then :
+  enableval=$enable_blkid_wiping; BLKID_WIPING=$enableval
+else
+  BLKID_WIPING=no
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BLKID_WIPING" >&5
+$as_echo "$BLKID_WIPING" >&6; }
+
+
+if test x$BLKID_WIPING = xyes; then
+               if test x$PKGCONFIG_INIT != x1; then
+               pkg_config_init
+       fi
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BLKID" >&5
+$as_echo_n "checking for BLKID... " >&6; }
+
+if test -n "$BLKID_CFLAGS"; then
+    pkg_cv_BLKID_CFLAGS="$BLKID_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"blkid >= 2.22\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "blkid >= 2.22") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_BLKID_CFLAGS=`$PKG_CONFIG --cflags "blkid >= 2.22" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$BLKID_LIBS"; then
+    pkg_cv_BLKID_LIBS="$BLKID_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"blkid >= 2.22\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "blkid >= 2.22") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_BLKID_LIBS=`$PKG_CONFIG --libs "blkid >= 2.22" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+               BLKID_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "blkid >= 2.22" 2>&1`
+        else
+               BLKID_PKG_ERRORS=`$PKG_CONFIG --print-errors "blkid >= 2.22" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$BLKID_PKG_ERRORS" >&5
+
+       as_fn_error $? "Package requirements (blkid >= 2.22) were not met:
+
+$BLKID_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables BLKID_CFLAGS
+and BLKID_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+
+elif test $pkg_failed = untried; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables BLKID_CFLAGS
+and BLKID_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+
+else
+       BLKID_CFLAGS=$pkg_cv_BLKID_CFLAGS
+       BLKID_LIBS=$pkg_cv_BLKID_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       BLKID_PC="blkid"
+fi
+
+$as_echo "#define BLKID_WIPING_SUPPORT 1" >>confdefs.h
+
+fi
+
 ################################################################################
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use udev-systemd protocol for jobs in background" >&5
 $as_echo_n "checking whether to use udev-systemd protocol for jobs in background... " >&6; }
@@ -11025,6 +11150,9 @@ LVM_LIBAPI=`echo "$VER" | $AWK -F '[()]' '{print $2}'`
 
 
 
+
+
+
 
 
 
index cd802743ab7120f79306fda473bae91fd69ab6f5..ff9bf81a24bf38cb6d7d4e61414ec4ee90bf6340 100644 (file)
@@ -945,6 +945,25 @@ if test x$BUILD_LVMETAD = xyes; then
                           [Path to lvmetad pidfile.])
 fi
 
+################################################################################
+dnl -- Enable blkid wiping functionality
+AC_MSG_CHECKING(whether to use blkid wiping functionality)
+AC_ARG_ENABLE(blkid-wiping,
+             AC_HELP_STRING([--enable-blkid_wiping],
+                            [use wiping functionality provided by libblkid]),
+             BLKID_WIPING=$enableval, BLKID_WIPING=no)
+AC_MSG_RESULT($BLKID_WIPING)
+
+
+if test x$BLKID_WIPING = xyes; then
+       dnl -- init pkgconfig if required
+       if test x$PKGCONFIG_INIT != x1; then
+               pkg_config_init
+       fi
+       PKG_CHECK_MODULES(BLKID, blkid >= 2.22, [BLKID_PC="blkid"])
+       AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use wiping functionality provided by libblkid.])
+fi
+
 ################################################################################
 dnl -- Enable udev-systemd protocol to instantiate a service for background jobs
 AC_MSG_CHECKING(whether to use udev-systemd protocol for jobs in background)
@@ -1538,6 +1557,9 @@ LVM_LIBAPI=`echo "$VER" | $AWK -F '[[()]]' '{print $2}'`
 ################################################################################
 AC_SUBST(APPLIB)
 AC_SUBST(AWK)
+AC_SUBST(BLKID_LIBS)
+AC_SUBST(BLKID_PC)
+AC_SUBST(BLKID_WIPING)
 AC_SUBST(BUILD_CMIRRORD)
 AC_SUBST(BUILD_DMEVENTD)
 AC_SUBST(BUILD_LVMETAD)
index 13ba882a7b0fe367a778fba096e53cab8646dcfe..51db42ed9c8a4a758fcb4ab26e44cc0cc4790b08 100644 (file)
@@ -1,5 +1,8 @@
 /* lib/misc/configure.h.in.  Generated from configure.in by autoheader.  */
 
+/* Define to 1 to use wiping functionality provided by libblkid. */
+#undef BLKID_WIPING_SUPPORT
+
 /* Define to 1 if the `closedir' function returns void instead of `int'. */
 #undef CLOSEDIR_VOID
 
index 4c71c36e4479f2ff50fea33e14796df407c0ea33..7d7fd3deadb0d6e4393920f4d95caae2fbdf2aa8 100644 (file)
@@ -8,4 +8,4 @@ Description: lvm2 application library
 Version: @LVM_MAJOR@.@LVM_LIBAPI@
 Cflags: -I${includedir} 
 Libs: -L${libdir} -llvm2app
-Requires.private: devmapper
+Requires.private: devmapper @BLKID_PC@
index 3eea85e196bf99bbd25306491d01fba1dabaca89..35a47be2fa45f108b978f0b943caeb9e08ba6fcd 100644 (file)
@@ -43,7 +43,7 @@ PYTHON = @PYTHON@
 
 LIBS = @LIBS@
 # Extra libraries always linked with static binaries
-STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS)
+STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS) $(BLKID_LIBS)
 DEFS += @DEFS@
 # FIXME set this only where it's needed, not globally?
 CFLAGS += @CFLAGS@ @UDEV_CFLAGS@
@@ -52,12 +52,13 @@ ELDFLAGS += @ELDFLAGS@
 LDDEPS += @LDDEPS@
 LDFLAGS += @LDFLAGS@
 LIB_SUFFIX = @LIB_SUFFIX@
-LVMINTERNAL_LIBS = -llvm-internal $(DAEMON_LIBS) $(UDEV_LIBS) $(DL_LIBS)
+LVMINTERNAL_LIBS = -llvm-internal $(DAEMON_LIBS) $(UDEV_LIBS) $(DL_LIBS) $(BLKID_LIBS)
 DL_LIBS = @DL_LIBS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 READLINE_LIBS = @READLINE_LIBS@
 SELINUX_LIBS = @SELINUX_LIBS@
 UDEV_LIBS = @UDEV_LIBS@
+BLKID_LIBS=@BLKID_LIBS@
 TESTING = @TESTING@
 
 # Setup directory variables
index f90cfae53c90e73972a9ac2e7fd4de3392f6ea4c..f8e49349df7c49beae96264133688911aed954a9 100644 (file)
@@ -117,7 +117,7 @@ CFLOW_TARGET = lvm
 
 include $(top_builddir)/make.tmpl
 
-LIBS += $(UDEV_LIBS)
+LIBS += $(UDEV_LIBS) $(BLKID_LIBS)
 
 device-mapper: $(TARGETS_DM)
 
This page took 0.099598 seconds and 5 git commands to generate.