提交 d7c4e003 编写于 作者: C Claudio Bley

tests: fix building without xattr support

Only compile securityselinuxhelper.c if xattr support was detected to
avoid this error:

securityselinuxhelper.c:34:24: fatal error: attr/xattr.h: No such file
or directory compilation terminated.

Since all SELinux tests depend upon the securityselinuxhelper library,
these test programs are now only build when xattr support is
available.
上级 4b8d387e
...@@ -138,9 +138,9 @@ test_programs += virnettlscontexttest virnettlssessiontest ...@@ -138,9 +138,9 @@ test_programs += virnettlscontexttest virnettlssessiontest
endif endif
if WITH_SECDRIVER_SELINUX if WITH_SECDRIVER_SELINUX
if WITH_ATTR
test_programs += securityselinuxtest test_programs += securityselinuxtest
if WITH_QEMU if WITH_QEMU
if WITH_ATTR
test_programs += securityselinuxlabeltest test_programs += securityselinuxlabeltest
endif endif
endif endif
...@@ -709,6 +709,7 @@ seclabeltest_SOURCES = \ ...@@ -709,6 +709,7 @@ seclabeltest_SOURCES = \
seclabeltest_LDADD = $(LDADDS) seclabeltest_LDADD = $(LDADDS)
if WITH_SECDRIVER_SELINUX if WITH_SECDRIVER_SELINUX
if WITH_ATTR
if WITH_TESTS if WITH_TESTS
noinst_LTLIBRARIES += libsecurityselinuxhelper.la noinst_LTLIBRARIES += libsecurityselinuxhelper.la
else else
...@@ -727,7 +728,6 @@ securityselinuxtest_DEPENDENCIES = libsecurityselinuxhelper.la \ ...@@ -727,7 +728,6 @@ securityselinuxtest_DEPENDENCIES = libsecurityselinuxhelper.la \
../src/libvirt.la ../src/libvirt.la
if WITH_QEMU if WITH_QEMU
if WITH_ATTR
securityselinuxlabeltest_SOURCES = \ securityselinuxlabeltest_SOURCES = \
securityselinuxlabeltest.c testutils.h testutils.c \ securityselinuxlabeltest.c testutils.h testutils.c \
testutilsqemu.h testutilsqemu.c testutilsqemu.h testutilsqemu.c
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册