]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build-sys: check for security_get_initial_context()
authorKarel Zak <kzak@redhat.com>
Wed, 20 Mar 2013 13:59:21 +0000 (14:59 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 20 Mar 2013 13:59:21 +0000 (14:59 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
configure.ac

index 3aae6eb2e6fc1511f704a98c854c5466f48bd2f8..b32d024ff091b1ce8241f7184506fe7c8c549d08 100644 (file)
@@ -567,6 +567,13 @@ else
   case "$with_selinux:$have_selinux" in
   yes:no) AC_MSG_ERROR([SELinux selected but libselinux not found or too old]);;
   esac
+
+  if test "x$have_selinux" = xyes; then
+    UL_SET_FLAGS([], [], [$SELINUX_LIBS])
+    # This function is missing in old libselinux 1.xx versions
+    AC_CHECK_FUNCS([security_get_initial_context])
+    UL_RESTORE_FLAGS
+  fi
 fi
 AC_SUBST([SELINUX_LIBS])
 AC_SUBST([SELINUX_LIBS_STATIC])