]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: fix building without xattr support
authorClaudio Bley <cbley@av-test.de>
Wed, 21 Aug 2013 06:52:20 +0000 (08:52 +0200)
committerClaudio Bley <cbley@av-test.de>
Wed, 21 Aug 2013 13:17:12 +0000 (15:17 +0200)
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.

tests/Makefile.am

index 9098dece817ea64d967038f1317921b2a5238885..09144d6e29e6c713972791662ba7742ad83117fa 100644 (file)
@@ -138,9 +138,9 @@ test_programs += virnettlscontexttest virnettlssessiontest
 endif
 
 if WITH_SECDRIVER_SELINUX
+if WITH_ATTR
 test_programs += securityselinuxtest
 if WITH_QEMU
-if WITH_ATTR
 test_programs += securityselinuxlabeltest
 endif
 endif
@@ -709,6 +709,7 @@ seclabeltest_SOURCES = \
 seclabeltest_LDADD = $(LDADDS)
 
 if WITH_SECDRIVER_SELINUX
+if WITH_ATTR
 if WITH_TESTS
 noinst_LTLIBRARIES += libsecurityselinuxhelper.la
 else
@@ -727,7 +728,6 @@ securityselinuxtest_DEPENDENCIES = libsecurityselinuxhelper.la \
        ../src/libvirt.la
 
 if WITH_QEMU
-if WITH_ATTR
 securityselinuxlabeltest_SOURCES = \
        securityselinuxlabeltest.c testutils.h testutils.c \
         testutilsqemu.h testutilsqemu.c