File: x_ac_selinux.m4

package info (click to toggle)
slurm-wlm 22.05.8-4%2Bdeb12u3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 48,492 kB
  • sloc: ansic: 475,246; exp: 69,020; sh: 8,862; javascript: 6,528; python: 6,444; makefile: 4,185; perl: 4,069; pascal: 131
file content (35 lines) | stat: -rw-r--r-- 1,056 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
##*****************************************************************************
#  AUTHOR:
#    Tim Wickberg <tim@schedmd.com>
#
#  SYNOPSIS:
#    X_AC_SELINUX
#
#  DESCRIPTION:
#    Determine if Slurm's internal SELinux support should be enabled.
##*****************************************************************************
#
# Copyright 2021 SchedMD LLC. All rights reserved.
#

AC_DEFUN([X_AC_SELINUX],
[
  AC_MSG_CHECKING([whether Slurm internal SELinux support is enabled])
  AC_ARG_ENABLE(
    [selinux],
    AS_HELP_STRING(--enable-selinux, enable internal SELinux support),
    [ case "$enableval" in
        yes) x_ac_selinux=yes ;;
         no) x_ac_selinux=no ;;
          *) AC_MSG_RESULT([doh!])
             AC_MSG_ERROR([bad value "$enableval" for --enable-selinux])
      esac
    ]
  )
  AC_MSG_RESULT([$x_ac_selinux])
  if test "$x_ac_selinux" = yes; then
    AC_DEFINE(WITH_SELINUX, 1, [Using internal Slurm SELinux support])
    PKG_CHECK_MODULES([libselinux], [libselinux], ,
      [AC_MSG_ERROR(cannot locate libselinux)])
  fi
])