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