chiark / gitweb /
cbc638c8cb1b946f805e6ef7be7f3c8edde7cefa
[elogind.git] / src / basic / build.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 /***
5   This file is part of systemd.
6
7   Copyright 2010 Lennart Poettering
8
9   systemd is free software; you can redistribute it and/or modify it
10   under the terms of the GNU Lesser General Public License as published by
11   the Free Software Foundation; either version 2.1 of the License, or
12   (at your option) any later version.
13
14   systemd is distributed in the hope that it will be useful, but
15   WITHOUT ANY WARRANTY; without even the implied warranty of
16   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17   Lesser General Public License for more details.
18
19   You should have received a copy of the GNU Lesser General Public License
20   along with systemd; If not, see <http://www.gnu.org/licenses/>.
21 ***/
22
23 #if HAVE_PAM
24 #define _PAM_FEATURE_ "+PAM"
25 #else
26 #define _PAM_FEATURE_ "-PAM"
27 #endif
28
29 #if HAVE_AUDIT
30 #define _AUDIT_FEATURE_ "+AUDIT"
31 #else
32 #define _AUDIT_FEATURE_ "-AUDIT"
33 #endif
34
35 #if HAVE_SELINUX
36 #define _SELINUX_FEATURE_ "+SELINUX"
37 #else
38 #define _SELINUX_FEATURE_ "-SELINUX"
39 #endif
40
41 #if 0 /// UNSUPPORTED by elogind
42 #if HAVE_APPARMOR
43 #define _APPARMOR_FEATURE_ "+APPARMOR"
44 #else
45 #define _APPARMOR_FEATURE_ "-APPARMOR"
46 #endif
47
48 #if ENABLE_IMA
49 #define _IMA_FEATURE_ "+IMA"
50 #else
51 #define _IMA_FEATURE_ "-IMA"
52 #endif
53 #endif // 0
54
55 #if ENABLE_SMACK
56 #define _SMACK_FEATURE_ "+SMACK"
57 #else
58 #define _SMACK_FEATURE_ "-SMACK"
59 #endif
60
61 #if 0 /// UNSUPPORTED by elogind
62 #if HAVE_SYSV_COMPAT
63 #define _SYSVINIT_FEATURE_ "+SYSVINIT"
64 #else
65 #define _SYSVINIT_FEATURE_ "-SYSVINIT"
66 #endif
67 #endif // 0
68
69 #if ENABLE_UTMP
70 #define _UTMP_FEATURE_ "+UTMP"
71 #else
72 #define _UTMP_FEATURE_ "-UTMP"
73 #endif
74
75 #if 0 /// UNSUPPORTED by elogind
76 #if HAVE_LIBCRYPTSETUP
77 #define _LIBCRYPTSETUP_FEATURE_ "+LIBCRYPTSETUP"
78 #else
79 #define _LIBCRYPTSETUP_FEATURE_ "-LIBCRYPTSETUP"
80 #endif
81
82 #if HAVE_GCRYPT
83 #define _GCRYPT_FEATURE_ "+GCRYPT"
84 #else
85 #define _GCRYPT_FEATURE_ "-GCRYPT"
86 #endif
87
88 #if HAVE_GNUTLS
89 #define _GNUTLS_FEATURE_ "+GNUTLS"
90 #else
91 #define _GNUTLS_FEATURE_ "-GNUTLS"
92 #endif
93 #endif // 0
94
95 #if HAVE_ACL
96 #define _ACL_FEATURE_ "+ACL"
97 #else
98 #define _ACL_FEATURE_ "-ACL"
99 #endif
100
101 #if 0 /// UNSUPPORTED by elogind
102 #if HAVE_XZ
103 #define _XZ_FEATURE_ "+XZ"
104 #else
105 #define _XZ_FEATURE_ "-XZ"
106 #endif
107
108 #if HAVE_LZ4
109 #define _LZ4_FEATURE_ "+LZ4"
110 #else
111 #define _LZ4_FEATURE_ "-LZ4"
112 #endif
113
114 #if HAVE_SECCOMP
115 #define _SECCOMP_FEATURE_ "+SECCOMP"
116 #else
117 #define _SECCOMP_FEATURE_ "-SECCOMP"
118 #endif
119
120 #if HAVE_BLKID
121 #define _BLKID_FEATURE_ "+BLKID"
122 #else
123 #define _BLKID_FEATURE_ "-BLKID"
124 #endif
125
126 #if HAVE_ELFUTILS
127 #define _ELFUTILS_FEATURE_ "+ELFUTILS"
128 #else
129 #define _ELFUTILS_FEATURE_ "-ELFUTILS"
130 #endif
131
132 #if HAVE_KMOD
133 #define _KMOD_FEATURE_ "+KMOD"
134 #else
135 #define _KMOD_FEATURE_ "-KMOD"
136 #endif
137
138 #if HAVE_LIBIDN2
139 #define _IDN2_FEATURE_ "+IDN2"
140 #else
141 #define _IDN2_FEATURE_ "-IDN2"
142 #endif
143
144 #if HAVE_LIBIDN
145 #define _IDN_FEATURE_ "+IDN"
146 #else
147 #define _IDN_FEATURE_ "-IDN"
148 #endif
149
150 #if HAVE_PCRE2
151 #define _PCRE2_FEATURE_ "+PCRE2"
152 #else
153 #define _PCRE2_FEATURE_ "-PCRE2"
154 #endif
155 #else
156 #define _IDN_FEATURE_ "-IDN"
157 #endif
158 #endif // 0
159
160 #define _CGROUP_HIEARCHY_ "default-hierarchy=" DEFAULT_HIERARCHY_NAME
161
162 #if 0 /// elogind has a much shorter list
163 #define SYSTEMD_FEATURES                                                \
164         _PAM_FEATURE_ " "                                               \
165         _AUDIT_FEATURE_ " "                                             \
166         _SELINUX_FEATURE_ " "                                           \
167         _IMA_FEATURE_ " "                                               \
168         _APPARMOR_FEATURE_ " "                                          \
169         _SMACK_FEATURE_ " "                                             \
170         _SYSVINIT_FEATURE_ " "                                          \
171         _UTMP_FEATURE_ " "                                              \
172         _LIBCRYPTSETUP_FEATURE_ " "                                     \
173         _GCRYPT_FEATURE_ " "                                            \
174         _GNUTLS_FEATURE_ " "                                            \
175         _ACL_FEATURE_ " "                                               \
176         _XZ_FEATURE_ " "                                                \
177         _LZ4_FEATURE_ " "                                               \
178         _SECCOMP_FEATURE_ " "                                           \
179         _BLKID_FEATURE_ " "                                             \
180         _ELFUTILS_FEATURE_ " "                                          \
181         _KMOD_FEATURE_ " "                                              \
182         _IDN2_FEATURE_ " "                                              \
183         _IDN_FEATURE_ " "                                               \
184         _PCRE2_FEATURE_ " "                                             \
185         _CGROUP_HIEARCHY_
186 #else
187 #define SYSTEMD_FEATURES                                                \
188         _PAM_FEATURE_ " "                                               \
189         _AUDIT_FEATURE_ " "                                             \
190         _SELINUX_FEATURE_ " "                                           \
191         _SMACK_FEATURE_ " "                                             \
192         _UTMP_FEATURE_ " "                                              \
193         _ACL_FEATURE_ " "                                               \
194         _CGROUP_HIEARCHY_
195 #endif // 0