# Used by install.c.
AC_CHECK_FUNCS([matchpathcon_init_prefix], [],
[
- case "$ac_cv_search_setfilecon:$ac_cv_header_selinux_selinux_h" in
- no:*) # SELinux disabled
- ;;
- *:no) # SELinux disabled
- ;;
- *)
- AC_MSG_WARN([SELinux enabled, but matchpathcon_init_prefix not found])
- AC_MSG_WARN([The install utility may run slowly])
- esac
+ if test "$with_selinux" != no; then
+ case "$ac_cv_search_setfilecon:$ac_cv_header_selinux_selinux_h" in
+ no:*) # SELinux disabled
+ ;;
+ *:no) # SELinux disabled
+ ;;
+ *)
+ AC_MSG_WARN([SELinux enabled, but matchpathcon_init_prefix not found])
+ AC_MSG_WARN([The install utility may run slowly])
+ esac
+ fi
])
LIBS=$coreutils_saved_libs