Blob Blame History Raw
diff -ruNp coreutils-7.2.orig/m4/jm-macros.m4 coreutils-7.2/m4/jm-macros.m4
--- coreutils-7.2.orig/m4/jm-macros.m4	2009-08-05 10:50:48.389482889 +0200
+++ coreutils-7.2/m4/jm-macros.m4	2009-08-05 10:53:37.894733210 +0200
@@ -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])