]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build-sys: don't compile lib{mount,blkid} tests when --disable-static specified
authorKarel Zak <kzak@redhat.com>
Thu, 2 Aug 2012 18:19:14 +0000 (20:19 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 2 Aug 2012 18:19:14 +0000 (20:19 +0200)
The tests often depend on private (non-API) library functions.

Signed-off-by: Karel Zak <kzak@redhat.com>
Documentation/howto-tests.txt
configure.ac
libblkid/src/Makemodule.am
libmount/src/Makemodule.am

index f41628e99725aa85fa6b2078c95344a992298a0f..ca14b2b953a71aa826b58374a4596810f51d6b3b 100644 (file)
@@ -9,6 +9,9 @@
 
        $ make check
 
+ Note that the configure option --disable-static disables many of libmount and
+ libblkid unit tests.
+
  Run all tests including tests that require root permissions:
 
        # cd tests
index 99f1df02539436cf47cb715ebee741eae8b4dc06..763ecff9b20b91a17c48c327ceb8ebb3d8c4b8f2 100644 (file)
@@ -725,6 +725,7 @@ if test "x$build_libblkid" = xyes; then
   AC_DEFINE(HAVE_LIBBLKID, 1, [Define to 1 if you have the -lblkid.])
 fi
 AM_CONDITIONAL(BUILD_LIBBLKID, test "x$build_libblkid" = xyes)
+AM_CONDITIONAL(BUILD_LIBBLKID_TESTS, test "x$build_libblkid" = xyes -a "x$enable_static" = xyes)
 
 dnl
 dnl libmount
@@ -738,6 +739,7 @@ UL_REQUIRES_LINUX([libmount])
 UL_REQUIRES_BUILD([libmount], [libblkid])
 UL_REQUIRES_HAVE([libmount], [scanf_alloc_modifier], [scanf string alloc modifier])
 AM_CONDITIONAL(BUILD_LIBMOUNT, test "x$build_libmount" = xyes)
+AM_CONDITIONAL(BUILD_LIBMOUNT_TESTS, test "x$build_libmount" = xyes -a "x$enable_static" = xyes)
 
 AC_SUBST([LIBMOUNT_VERSION])
 AC_SUBST([LIBMOUNT_VERSION_INFO])
index b168c7c1e9885e24aade230472197306110998f1..de60458014cbd3cfc65667de947d62104abf242c 100644 (file)
@@ -131,6 +131,7 @@ EXTRA_DIST += \
        libblkid/src/blkid.sym \
        libblkid/src/blkid.h.in
 
+if BUILD_LIBBLKID_TESTS
 check_PROGRAMS += \
        test_blkid_cache \
        test_blkid_config \
@@ -210,6 +211,9 @@ test_blkid_verify_CFLAGS = $(blkid_tests_cflags)
 test_blkid_verify_LDFLAGS = $(blkid_tests_ldflags)
 test_blkid_verify_LDADD = $(blkid_tests_ldadd)
 
+endif # BUILD_LIBBLKID_TESTS
+
+
 # move lib from $(usrlib_execdir) to $(libdir) if needed
 install-exec-hook-libblkid:
        if test "$(usrlib_execdir)" != "$(libdir)"; then \
index 8a6b2adf7e70c8cdf61c46c72f3cef79116b220e..494e02a34d4351823c2f8ae40d8e03021bef6ee4 100644 (file)
@@ -50,6 +50,7 @@ EXTRA_DIST += \
        libmount/src/libmount.sym \
        libmount/src/libmount.h.in
 
+if BUILD_LIBMOUNT_TESTS
 check_PROGRAMS += \
        test_mount_cache \
        test_mount_context \
@@ -114,6 +115,8 @@ test_mount_version_CFLAGS = $(libmount_tests_cflags)
 test_mount_version_LDFLAGS = $(libmount_tests_ldflags)
 test_mount_version_LDADD = $(libmount_tests_ldadd)
 
+endif # BUILD_LIBMOUNT_TESTS
+
 
 # move lib from $(usrlib_execdir) to $(libdir) if needed
 install-exec-hook-libmount: