summaryrefslogtreecommitdiff
path: root/m4/jm-macros.m4
diff options
context:
space:
mode:
authorKamil Dudka <kdudka@redhat.com>2009-08-04 16:21:08 +0200
committerJim Meyering <meyering@redhat.com>2009-08-04 16:51:52 +0200
commit1762092901adf040445d59931d14837ef7f2ebe1 (patch)
tree5eaf71b990598379906d816c081a93346b02ff05 /m4/jm-macros.m4
parentc60f151ebdfd47a56991a1fb481b28a2020d27f5 (diff)
downloadcoreutils-1762092901adf040445d59931d14837ef7f2ebe1.tar.xz
install runs faster again with SELinux enabled
* m4/jm-macros.m4: Pull in SELinux libraries while checking for matchpathcon_init_prefix (). Emit configure warning when not found with SELinux enabled. * NEWS (Bug fixes): Mention it. The bug was introduced in coreutils-7.0 via commit 0647f3eb, 2008-06-02, "accommodate older SELinux which lacks matchpathcon_init_prefix".
Diffstat (limited to 'm4/jm-macros.m4')
-rw-r--r--m4/jm-macros.m416
1 files changed, 15 insertions, 1 deletions
diff --git a/m4/jm-macros.m4 b/m4/jm-macros.m4
index f14d6a382..f862984cc 100644
--- a/m4/jm-macros.m4
+++ b/m4/jm-macros.m4
@@ -47,7 +47,21 @@ AC_DEFUN([coreutils_MACROS],
AC_CHECK_FUNCS_ONCE([directio])
# Used by install.c.
- AC_CHECK_FUNCS_ONCE([matchpathcon_init_prefix])
+ coreutils_saved_libs=$LIBS
+ LIBS="$LIBS $LIB_SELINUX"
+ 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
+ ])
+ LIBS=$coreutils_saved_libs
# Used by sort.c.
AC_CHECK_FUNCS_ONCE([nl_langinfo])