build-sys: don't compile lib{mount,blkid} tests when --disable-static specified
The tests often depend on private (non-API) library functions. Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
a754adbd69
commit
43ffdc82fa
|
@ -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
|
||||
|
|
|
@ -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])
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue