]>
Commit | Line | Data |
---|---|---|
fb0951b0 | 1 | # |
47be870b LP |
2 | # This file is part of systemd. |
3 | # | |
3e214785 KS |
4 | # Copyright 2010-2012 Lennart Poettering |
5 | # Copyright 2010-2012 Kay Sievers | |
47be870b LP |
6 | # |
7 | # systemd is free software; you can redistribute it and/or modify it | |
5430f7f2 LP |
8 | # under the terms of the GNU Lesser General Public License as published by |
9 | # the Free Software Foundation; either version 2.1 of the License, or | |
47be870b LP |
10 | # (at your option) any later version. |
11 | # | |
12 | # systemd is distributed in the hope that it will be useful, but | |
13 | # WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
5430f7f2 | 15 | # Lesser General Public License for more details. |
47be870b | 16 | # |
5430f7f2 | 17 | # You should have received a copy of the GNU Lesser General Public License |
47be870b LP |
18 | # along with systemd; If not, see <http://www.gnu.org/licenses/>. |
19 | ||
4e949c11 JJ |
20 | AC_PREREQ([2.64]) |
21 | ||
22 | AC_INIT([systemd], | |
42a04ee6 | 23 | [214], |
4e949c11 JJ |
24 | [http://bugs.freedesktop.org/enter_bug.cgi?product=systemd], |
25 | [systemd], | |
26 | [http://www.freedesktop.org/wiki/Software/systemd]) | |
47be870b | 27 | |
78a825f2 | 28 | AC_CONFIG_SRCDIR([src/core/main.c]) |
47be870b LP |
29 | AC_CONFIG_MACRO_DIR([m4]) |
30 | AC_CONFIG_HEADERS([config.h]) | |
a80db8bd JJ |
31 | AC_CONFIG_AUX_DIR([build-aux]) |
32 | ||
4db6d587 | 33 | AC_USE_SYSTEM_EXTENSIONS |
907dd195 | 34 | AC_SYS_LARGEFILE |
eb7bbee6 | 35 | AC_PREFIX_DEFAULT([/usr]) |
6aad7f2c | 36 | AM_MAINTAINER_MODE([enable]) |
4196a3ea | 37 | AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects]) |
3e214785 | 38 | AM_SILENT_RULES([yes]) |
47be870b | 39 | AC_CANONICAL_HOST |
22be093f | 40 | AC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.]) |
d59d0a2b | 41 | AS_IF([test "x$host_cpu" = "xmips" || test "x$host_cpu" = "xmipsel" || |
42 | test "x$host_cpu" = "xmips64" || test "x$host_cpu" = "xmips64el"], | |
43 | [AC_DEFINE(ARCH_MIPS, [], [Whether on mips arch])]) | |
47be870b | 44 | |
3e214785 | 45 | LT_PREREQ(2.2) |
8666abb4 | 46 | LT_INIT([disable-static]) |
47be870b | 47 | |
5e63ce78 | 48 | AS_IF([test "x$enable_static" = "xyes"], [AC_MSG_ERROR([--enable-static is not supported by systemd])]) |
3d585edb | 49 | AS_IF([test "x$enable_largefile" = "xno"], [AC_MSG_ERROR([--disable-largefile is not supported by systemd])]) |
5e63ce78 | 50 | |
1c7dde3e BN |
51 | # i18n stuff for the PolicyKit policy files |
52 | IT_PROG_INTLTOOL([0.40.0]) | |
53 | ||
54 | GETTEXT_PACKAGE=systemd | |
55 | AC_SUBST(GETTEXT_PACKAGE) | |
56 | ||
e9da3678 LP |
57 | AC_PROG_MKDIR_P |
58 | AC_PROG_LN_S | |
59 | AC_PROG_SED | |
3ce4fad8 | 60 | AC_PROG_GREP |
f975e971 | 61 | AC_PROG_AWK |
e9da3678 | 62 | |
47be870b | 63 | AC_PROG_CC_C99 |
47be870b | 64 | |
3e214785 | 65 | AC_PATH_PROG([M4], [m4]) |
fe1fed02 | 66 | AC_PATH_PROG([XSLTPROC], [xsltproc]) |
92ec4495 | 67 | |
2d0efdf1 SS |
68 | AC_PATH_PROG([QUOTAON], [quotaon], [/usr/sbin/quotaon], [$PATH:/usr/sbin:/sbin]) |
69 | AC_PATH_PROG([QUOTACHECK], [quotacheck], [/usr/sbin/quotacheck], [$PATH:/usr/sbin:/sbin]) | |
b51fc639 | 70 | |
2d0efdf1 | 71 | AC_PATH_PROG([KILL], [kill], [/usr/bin/kill], [$PATH:/usr/sbin:/sbin]) |
96ede260 | 72 | |
2d0efdf1 | 73 | AC_PATH_PROG([KMOD], [kmod], [/usr/bin/kmod], [$PATH:/usr/sbin:/sbin]) |
edeb68c5 | 74 | |
2d0efdf1 | 75 | AC_PATH_PROG([KEXEC], [kexec], [/usr/sbin/kexec], [$PATH:/usr/sbin:/sbin]) |
78013564 | 76 | |
44688352 LP |
77 | AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])]) |
78 | ||
4acbce79 ZJS |
79 | M4_DEFINES= |
80 | ||
80a5cbac | 81 | # gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line |
b37250d6 ZJS |
82 | m4_ifdef([GTK_DOC_CHECK], [ |
83 | GTK_DOC_CHECK([1.18],[--flavour no-tmpl])], | |
6581f00f ZJS |
84 | [AM_CONDITIONAL([ENABLE_GTK_DOC], [false]) |
85 | enable_gtk_doc=no]) | |
92ec4495 | 86 | |
fe1fed02 ZJS |
87 | AS_IF([test "x$enable_gtk_doc" = "xyes" -a "x$XSLTPROC" = x], [ |
88 | AC_MSG_ERROR([*** GTK doc requested but xsltproc not found]) | |
89 | ]) | |
90 | ||
6e92b23f | 91 | m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [ |
0eaeca1f | 92 | GOBJECT_INTROSPECTION_CHECK([1.31.1]) |
d66ee73a ZJS |
93 | ], [ |
94 | AM_CONDITIONAL([HAVE_INTROSPECTION], [false]) | |
95 | enable_introspection=no]) | |
3e214785 | 96 | |
ac714a78 MJ |
97 | AC_CHECK_TOOL(STRINGS, strings) |
98 | AC_CHECK_TOOL(GPERF, gperf) | |
b62cfcea MB |
99 | if test -z "$GPERF" ; then |
100 | AC_MSG_ERROR([*** gperf not found]) | |
101 | fi | |
9a60da28 | 102 | |
732bfe09 ZJS |
103 | # ------------------------------------------------------------------------------ |
104 | address_sanitizer_cflags= | |
105 | address_sanitizer_cppflags= | |
106 | address_sanitizer_ldflags= | |
107 | AC_ARG_ENABLE(address-sanitizer, AS_HELP_STRING([--enable-address-sanitizer], [enable -fsanitize=address])) | |
108 | AS_IF([test "x$enable_address_sanitizer" = "xyes"], [ | |
109 | CC_CHECK_FLAG_APPEND([with_as_cflags], [CFLAGS], [-fsanitize=address]) | |
110 | AS_IF([test -z "$with_as_cflags"], | |
111 | [AC_MSG_ERROR([*** -fsanitize=address is not supported])]) | |
112 | address_sanitizer_cflags="$with_as_cflags -fno-omit-frame-pointer -DVALGRIND=1" | |
113 | address_sanitizer_cppflags="-DVALGRIND=1" | |
114 | address_sanitizer_ldflags="-Wc,-fsanitize=address" | |
115 | ]) | |
116 | ||
ae0ceefc ZJS |
117 | undefined_sanitizer_cflags= |
118 | undefined_sanitizer_cppflags= | |
119 | undefined_sanitizer_ldflags= | |
120 | AC_ARG_ENABLE(undefined-sanitizer, AS_HELP_STRING([--enable-undefined-sanitizer], [enable -fsanitize=undefined])) | |
121 | AS_IF([test "x$enable_undefined_sanitizer" = "xyes"], [ | |
122 | CC_CHECK_FLAG_APPEND([with_us_cflags], [CFLAGS], [-fsanitize=undefined]) | |
123 | AS_IF([test -z "$with_us_cflags"], | |
124 | [AC_MSG_ERROR([*** -fsanitize=undefined is not supported])]) | |
125 | undefined_sanitizer_cflags="$with_us_cflags -fno-omit-frame-pointer -DVALGRIND=1" | |
126 | undefined_sanitizer_cppflags="-DVALGRIND=1" | |
127 | undefined_sanitizer_ldflags="-Wc,-fsanitize=undefined" | |
128 | ]) | |
129 | ||
130 | sanitizer_cflags="$address_sanitizer_cflags $undefined_sanitizer_cflags" | |
131 | sanitizer_cppflags="$address_sanitizer_cppflags $undefined_sanitizer_cppflags" | |
132 | sanitizer_ldflags="$address_sanitizer_ldflags $undefined_sanitizer_ldflags" | |
133 | ||
eb2e280f | 134 | CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\ |
be1a67d9 | 135 | -pipe \ |
d1ab0ca0 | 136 | -Wall \ |
d1ab0ca0 | 137 | -Wextra \ |
27765dfc | 138 | -Wno-inline \ |
d1ab0ca0 | 139 | -Wundef \ |
780040dc | 140 | "-Wformat=2 -Wformat-security -Wformat-nonliteral" \ |
d1ab0ca0 LP |
141 | -Wlogical-op \ |
142 | -Wsign-compare \ | |
d1ab0ca0 | 143 | -Wmissing-include-dirs \ |
d1ab0ca0 LP |
144 | -Wold-style-definition \ |
145 | -Wpointer-arith \ | |
146 | -Winit-self \ | |
03930e48 | 147 | -Wdeclaration-after-statement \ |
d1ab0ca0 | 148 | -Wfloat-equal \ |
693eb9a2 | 149 | -Wsuggest-attribute=noreturn \ |
d1ab0ca0 LP |
150 | -Wmissing-prototypes \ |
151 | -Wstrict-prototypes \ | |
152 | -Wredundant-decls \ | |
153 | -Wmissing-declarations \ | |
154 | -Wmissing-noreturn \ | |
155 | -Wshadow \ | |
156 | -Wendif-labels \ | |
d1ab0ca0 LP |
157 | -Wstrict-aliasing=2 \ |
158 | -Wwrite-strings \ | |
be1a67d9 LP |
159 | -Wno-long-long \ |
160 | -Wno-overlength-strings \ | |
d1ab0ca0 | 161 | -Wno-unused-parameter \ |
be1a67d9 | 162 | -Wno-missing-field-initializers \ |
8745297f | 163 | -Wno-unused-result \ |
d200735e | 164 | -Werror=overflow \ |
213298fb | 165 | -Wdate-time \ |
693eb9a2 | 166 | -Wnested-externs \ |
be1a67d9 | 167 | -ffast-math \ |
d1ab0ca0 LP |
168 | -fno-common \ |
169 | -fdiagnostics-show-option \ | |
9f64229f | 170 | -fdiagnostics-color \ |
9b85fc6a GSB |
171 | -fno-strict-aliasing \ |
172 | -fvisibility=hidden \ | |
173 | -ffunction-sections \ | |
5a45a936 | 174 | -fdata-sections \ |
c1663b9d | 175 | -fstack-protector \ |
aca33b07 | 176 | -fstack-protector-strong \ |
2a4d1ec1 | 177 | -fPIE \ |
c1663b9d | 178 | --param=ssp-buffer-size=4]) |
b850b06e KS |
179 | AS_CASE([$CFLAGS], [*-O[[12345\ ]]*], |
180 | [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\ | |
235c6e62 | 181 | -flto -ffat-lto-objects])], |
b850b06e | 182 | [AC_MSG_RESULT([skipping -flto, optimization not enabled])]) |
ae0ceefc | 183 | AC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags") |
5a45a936 | 184 | |
03a170c0 | 185 | AS_CASE([$CFLAGS], [*-O[[12345\ ]]*], |
a6c0b31d ZJS |
186 | [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\ |
187 | -Wp,-D_FORTIFY_SOURCE=2])], | |
188 | [AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])]) | |
ae0ceefc | 189 | AC_SUBST([OUR_CPPFLAGS], "$with_cppflags $sanitizer_cppflags") |
9e7adc3a LDM |
190 | |
191 | CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\ | |
9b85fc6a | 192 | -Wl,--as-needed \ |
9d2d0fe1 | 193 | -Wl,--no-undefined \ |
5a45a936 LP |
194 | -Wl,--gc-sections \ |
195 | -Wl,-z,relro \ | |
39c4ead2 | 196 | -Wl,-z,now \ |
2a4d1ec1 | 197 | -pie \ |
39c4ead2 | 198 | -Wl,-fuse-ld=gold]) |
ae0ceefc | 199 | AC_SUBST([OUR_LDFLAGS], "$with_ldflags $sanitizer_ldflags") |
47be870b | 200 | |
ccd06097 ZJS |
201 | AC_CHECK_SIZEOF(pid_t) |
202 | AC_CHECK_SIZEOF(uid_t) | |
1c231f56 | 203 | AC_CHECK_SIZEOF(gid_t) |
de0671ee ZJS |
204 | AC_CHECK_SIZEOF(time_t) |
205 | AC_CHECK_SIZEOF(rlim_t,,[ | |
206 | #include <sys/time.h> | |
207 | #include <sys/resource.h> | |
208 | ]) | |
ccd06097 | 209 | |
c937e0d5 ZJS |
210 | # ------------------------------------------------------------------------------ |
211 | # we use python to build the man page index, and for systemd-python | |
212 | have_python=no | |
c937e0d5 ZJS |
213 | AC_ARG_WITH([python], |
214 | [AS_HELP_STRING([--without-python], [Disable building the man page index and systemd-python (default: test)])]) | |
215 | ||
32dcef3a | 216 | have_lxml=no |
c937e0d5 ZJS |
217 | AS_IF([test "x$with_python" != "xno"], [ |
218 | AM_PATH_PYTHON(,, [:]) | |
be8737ae FB |
219 | AS_IF([test "x$PYTHON" != "x:"], [ |
220 | AC_MSG_CHECKING([for python lxml module]) | |
221 | AS_IF(["$PYTHON" -c 'import lxml' 2>/dev/null], [have_lxml=yes]) | |
222 | AC_MSG_RESULT([$have_lxml]) | |
223 | AS_IF([test "x$have_lxml" = "xyes"], [have_python=yes], | |
224 | [AC_MSG_WARN([*** python support requires python-lxml module installed])]) | |
225 | ]) | |
c937e0d5 | 226 | ]) |
747cf8cd ZJS |
227 | AS_IF([test "$have_python" != "yes"], [ |
228 | AS_IF([test "$with_python" = "yes"], | |
229 | [AC_MSG_ERROR([*** python support requested but python support not found])]) | |
230 | AS_IF([test "$with_python" != "no"], | |
231 | [AC_MSG_WARN([*** python support not found, some documentation cannot be built])]) | |
232 | ]) | |
233 | ||
c937e0d5 ZJS |
234 | AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"]) |
235 | AS_IF([test "x$PYTHON_BINARY" = "x"], | |
236 | [AS_IF([test "x$have_python" = "xyes"], | |
25ee45f9 | 237 | [PYTHON_BINARY="$(which "$PYTHON")"], |
c937e0d5 ZJS |
238 | [PYTHON_BINARY=/usr/bin/python])]) |
239 | AC_ARG_VAR(PYTHON_BINARY, [Python binary used to launch installed scripts]) | |
240 | ||
1864b0e3 ZJS |
241 | AS_IF([test "x$have_python" != "xyes" -a "x$enable_python_devel" = "xyes"], |
242 | [AC_MSG_ERROR([*** python-devel support requires --with-python])]) | |
243 | ||
a6c0b31d ZJS |
244 | have_python_devel=no |
245 | AC_ARG_ENABLE(python_devel, AS_HELP_STRING([--disable-python-devel], [Do not build python modules])) | |
1864b0e3 | 246 | AS_IF([test "x$have_python" = "xyes" -a "x$enable_python_devel" != "xno"], [ |
a6c0b31d ZJS |
247 | PKG_CHECK_MODULES([PYTHON_DEVEL], [python-${PYTHON_VERSION}], |
248 | [have_python_devel=yes], | |
249 | [PKG_CHECK_MODULES([PYTHON_DEVEL], [python], | |
250 | [have_python_devel=yes], | |
251 | [have_python_devel=no])]) | |
252 | AS_IF([test "x$have_python_devel" = xno -a "x$enable_python_devel" = xyes], | |
253 | [AC_MSG_ERROR([*** python-devel support requested but libraries not found])]) | |
f2ec0646 | 254 | AC_PATH_PROGS(SPHINX_BUILD, sphinx-build-${PYTHON_VERSION} sphinx-build) |
c937e0d5 ZJS |
255 | ]) |
256 | AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test "$have_python_devel" = "yes"]) | |
257 | ||
258 | # ------------------------------------------------------------------------------ | |
259 | ||
afea26ad | 260 | AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])]) |
7959ff99 | 261 | AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])]) |
4b357e15 | 262 | AC_CHECK_HEADERS([linux/btrfs.h], [], []) |
7959ff99 KS |
263 | |
264 | # unconditionally pull-in librt with old glibc versions | |
265 | AC_SEARCH_LIBS([clock_gettime], [rt], [], []) | |
85f19d82 MB |
266 | |
267 | save_LIBS="$LIBS" | |
268 | LIBS= | |
47be870b | 269 | AC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])]) |
85f19d82 | 270 | CAP_LIBS="$LIBS" |
7959ff99 KS |
271 | AC_SUBST(CAP_LIBS) |
272 | ||
273 | LIBS= | |
fba1ea06 SL |
274 | AC_SEARCH_LIBS([mq_open], [rt], [], [AC_MSG_ERROR([*** POSIX RT library not found])]) |
275 | RT_LIBS="$LIBS" | |
276 | AC_SUBST(RT_LIBS) | |
85f19d82 | 277 | LIBS="$save_LIBS" |
47be870b | 278 | |
9388e99e | 279 | AC_CHECK_FUNCS([fanotify_init fanotify_mark]) |
4db17f29 | 280 | AC_CHECK_FUNCS([__secure_getenv secure_getenv]) |
5f381b35 | 281 | AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, LO_FLAGS_PARTSCAN], [], [], [[#include <sys/types.h> |
a8348796 | 282 | #include <unistd.h> |
9388e99e | 283 | #include <sys/mount.h> |
3b794314 | 284 | #include <fcntl.h> |
5f381b35 LP |
285 | #include <sched.h> |
286 | #include <linux/loop.h>]]) | |
a8348796 | 287 | |
b237ef2c | 288 | # This makes sure pkg.m4 is available. |
a9b5b032 | 289 | m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config]) |
d1ab0ca0 | 290 | |
22703094 | 291 | # ------------------------------------------------------------------------------ |
ac6b760c ZJS |
292 | have_dbus=no |
293 | AC_ARG_ENABLE(dbus, AS_HELP_STRING([--disable-dbus], [disable usage of dbus-1 in tests])) | |
8114dedc | 294 | AS_IF([test "x$enable_dbus" != "xno"], [ |
ac6b760c ZJS |
295 | PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2], |
296 | [AC_DEFINE(HAVE_DBUS, 1, [Define if dbus-1 library is available]) have_dbus=yes], | |
297 | [have_dbus=no]) | |
298 | AS_IF([test "x$have_dbus" = "xno" -a "x$enable_dbus" = "xyes"], | |
299 | [AC_MSG_ERROR([*** dbus-1 support requested but libraries not found])])]) | |
22703094 | 300 | AM_CONDITIONAL(HAVE_DBUS, [test "$have_dbus" = "yes"]) |
4b357e15 | 301 | |
53e856e1 ZJS |
302 | # ------------------------------------------------------------------------------ |
303 | have_compat_libs=no | |
304 | AC_ARG_ENABLE([compat_libs], AS_HELP_STRING([--enable-compat-libs],[Enable creation of compatibility libraries]), | |
305 | [case "${enableval}" in | |
306 | yes) have_compat_libs=yes ;; | |
307 | no) have_compat_libs=no ;; | |
308 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-compat-libs) ;; | |
309 | esac], | |
310 | [have_compat_libs=no]) | |
311 | AM_CONDITIONAL([ENABLE_COMPAT_LIBS], [test "$have_compat_libs" = "yes"]) | |
312 | ||
6aea6d10 TA |
313 | # ------------------------------------------------------------------------------ |
314 | have_coverage=no | |
315 | AC_ARG_ENABLE(coverage, AS_HELP_STRING([--enable-coverage], [enable test coverage])) | |
316 | if test "x$enable_coverage" = "xyes" ; then | |
317 | AC_CHECK_PROG(lcov_found, [lcov], [yes], [no]) | |
318 | if test "x$lcov_found" = xno ; then | |
319 | AC_MSG_ERROR([*** lcov support requested but the program was not found]) | |
320 | else | |
321 | lcov_version_major="`lcov --version | cut -d ' ' -f 4 | cut -d '.' -f 1`" | |
322 | lcov_version_minor="`lcov --version | cut -d ' ' -f 4 | cut -d '.' -f 2`" | |
323 | if test "$lcov_version_major" -eq 1 -a "$lcov_version_minor" -lt 10; then | |
324 | AC_MSG_ERROR([*** lcov version is too old. 1.10 required]) | |
325 | else | |
326 | have_coverage=yes | |
327 | CC_CHECK_FLAGS_APPEND([with_coverage_cflags], [CFLAGS], [\ | |
328 | -fprofile-arcs \ | |
329 | -ftest-coverage]) | |
330 | AC_SUBST([OUR_CFLAGS], "$with_cflags $with_coverage_cflags") | |
331 | fi | |
332 | fi | |
333 | fi | |
334 | AM_CONDITIONAL(ENABLE_COVERAGE, [test "$have_coverage" = "yes"]) | |
335 | ||
e3043162 TG |
336 | # ------------------------------------------------------------------------------ |
337 | have_kmod=no | |
338 | AC_ARG_ENABLE(kmod, AS_HELP_STRING([--disable-kmod], [disable loadable modules support])) | |
339 | if test "x$enable_kmod" != "xno"; then | |
e2ca86cf DR |
340 | PKG_CHECK_EXISTS([ libkmod ], have_kmod=yes, have_kmod=no) |
341 | if test "x$have_kmod" = "xyes"; then | |
a18535d9 | 342 | PKG_CHECK_MODULES(KMOD, [ libkmod >= 15 ], |
e2ca86cf | 343 | [AC_DEFINE(HAVE_KMOD, 1, [Define if kmod is available])], |
70d83209 | 344 | AC_MSG_ERROR([*** kmod version >= 15 not found])) |
e2ca86cf | 345 | fi |
e3043162 | 346 | if test "x$have_kmod" = xno -a "x$enable_kmod" = xyes; then |
c4955740 | 347 | AC_MSG_ERROR([*** kmod support requested, but libraries not found]) |
e3043162 TG |
348 | fi |
349 | fi | |
350 | AM_CONDITIONAL(HAVE_KMOD, [test "$have_kmod" = "yes"]) | |
f553b3b1 AO |
351 | |
352 | # ------------------------------------------------------------------------------ | |
353 | have_blkid=no | |
354 | AC_ARG_ENABLE(blkid, AS_HELP_STRING([--disable-blkid], [disable blkid support])) | |
355 | if test "x$enable_blkid" != "xno"; then | |
356 | PKG_CHECK_MODULES(BLKID, [ blkid >= 2.20 ], | |
357 | [AC_DEFINE(HAVE_BLKID, 1, [Define if blkid is available]) have_blkid=yes], have_blkid=no) | |
358 | if test "x$have_blkid" = xno -a "x$enable_blkid" = xyes; then | |
359 | AC_MSG_ERROR([*** blkid support requested but libraries not found]) | |
360 | fi | |
361 | fi | |
362 | AM_CONDITIONAL(HAVE_BLKID, [test "$have_blkid" = "yes"]) | |
728beb28 | 363 | |
c0467cf3 RC |
364 | # ------------------------------------------------------------------------------ |
365 | have_seccomp=no | |
366 | AC_ARG_ENABLE(seccomp, AS_HELP_STRING([--disable-seccomp], [Disable optional SECCOMP support])) | |
367 | if test "x$enable_seccomp" != "xno"; then | |
368 | PKG_CHECK_MODULES(SECCOMP, [libseccomp >= 1.0.0], | |
17df7223 LP |
369 | [AC_DEFINE(HAVE_SECCOMP, 1, [Define if seccomp is available]) |
370 | have_seccomp=yes | |
371 | M4_DEFINES="$M4_DEFINES -DHAVE_SECCOMP"], | |
c0467cf3 RC |
372 | [have_seccomp=no]) |
373 | if test "x$have_seccomp" = "xno" -a "x$enable_seccomp" = "xyes"; then | |
374 | AC_MSG_ERROR([*** seccomp support requested but libraries not found]) | |
375 | fi | |
376 | fi | |
377 | AM_CONDITIONAL(HAVE_SECCOMP, [test "$have_seccomp" = "yes"]) | |
378 | ||
3e214785 | 379 | # ------------------------------------------------------------------------------ |
81611586 RS |
380 | have_ima=yes |
381 | AC_ARG_ENABLE([ima], AS_HELP_STRING([--disable-ima],[Disable optional IMA support]), | |
382 | [case "${enableval}" in | |
383 | yes) have_ima=yes ;; | |
384 | no) have_ima=no ;; | |
385 | *) AC_MSG_ERROR(bad value ${enableval} for --disable-ima) ;; | |
386 | esac], | |
387 | [have_ima=yes]) | |
388 | ||
389 | if test "x${have_ima}" != xno ; then | |
390 | AC_DEFINE(HAVE_IMA, 1, [Define if IMA is available]) | |
391 | fi | |
392 | ||
77e68fa2 LP |
393 | # ------------------------------------------------------------------------------ |
394 | have_chkconfig=yes | |
395 | AC_ARG_ENABLE([chkconfig], AS_HELP_STRING([--disable-chkconfig],[Disable optional chkconfig support]), | |
396 | [case "${enableval}" in | |
397 | yes) have_chkconfig=yes ;; | |
398 | no) have_chkconfig=no ;; | |
399 | *) AC_MSG_ERROR(bad value ${enableval} for --disable-chkconfig) ;; | |
400 | esac], | |
401 | [AC_PATH_PROG(CHKCONFIG, chkconfig) | |
402 | if test -z "$CHKCONFIG"; then | |
403 | have_chkconfig=no | |
404 | else | |
405 | have_chkconfig=yes | |
406 | fi]) | |
407 | ||
408 | if test "x${have_chkconfig}" != xno ; then | |
409 | AC_DEFINE(HAVE_CHKCONFIG, 1, [Define if CHKCONFIG is available]) | |
410 | fi | |
411 | ||
3e214785 | 412 | # ------------------------------------------------------------------------------ |
591622d7 LP |
413 | have_selinux=no |
414 | AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support])) | |
415 | if test "x$enable_selinux" != "xno"; then | |
3f8cc098 | 416 | PKG_CHECK_MODULES([SELINUX], [libselinux >= 2.1.9], |
6a6751fe LP |
417 | [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available]) |
418 | have_selinux=yes | |
419 | M4_DEFINES="$M4_DEFINES -DHAVE_SELINUX"], | |
420 | [have_selinux=no]) | |
591622d7 LP |
421 | if test "x$have_selinux" = xno -a "x$enable_selinux" = xyes; then |
422 | AC_MSG_ERROR([*** SELinux support requested but libraries not found]) | |
423 | fi | |
56cf987f | 424 | fi |
591622d7 | 425 | AM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"]) |
45df1f2c | 426 | |
eef65bf3 MS |
427 | have_apparmor=no |
428 | AC_ARG_ENABLE(apparmor, AS_HELP_STRING([--disable-apparmor], [Disable optional AppArmor support])) | |
429 | if test "x$enable_apparmor" != "xno"; then | |
430 | PKG_CHECK_MODULES([APPARMOR], [libapparmor], | |
431 | [AC_DEFINE(HAVE_APPARMOR, 1, [Define if AppArmor is available]) | |
432 | have_apparmor=yes | |
433 | M4_DEFINES="$M4_DEFINES -DHAVE_APPARMOR"], | |
434 | [have_apparmor=no]) | |
435 | if test "x$have_apparmor" = xno -a "x$enable_apparmor" = xyes; then | |
436 | AC_MSG_ERROR([*** AppArmor support requested but libraries not found]) | |
437 | fi | |
438 | fi | |
439 | AM_CONDITIONAL(HAVE_APPARMOR, [test "$have_apparmor" = "yes"]) | |
440 | ||
441 | ||
45df1f2c CR |
442 | AC_ARG_WITH(debug-shell, |
443 | AS_HELP_STRING([--with-debug-shell=PATH], | |
444 | [Path to debug shell binary]), | |
445 | [SUSHELL="$withval"],[ | |
446 | AS_IF([test "x${have_selinux}" != "xno"], [SUSHELL="/sbin/sushell"] , [SUSHELL="/bin/sh"])]) | |
447 | ||
5ec6b15b | 448 | AC_SUBST(SUSHELL) |
56cf987f | 449 | |
45df1f2c CR |
450 | AC_ARG_WITH([debug-tty], |
451 | AS_HELP_STRING([--with-debug-tty=PATH], | |
452 | [Specify the tty device for debug shell]), | |
453 | [DEBUGTTY="$withval"], | |
454 | [DEBUGTTY=/dev/tty9]) | |
455 | ||
456 | AC_SUBST(DEBUGTTY) | |
457 | ||
3e214785 | 458 | # ------------------------------------------------------------------------------ |
807e17f0 LP |
459 | have_xz=no |
460 | AC_ARG_ENABLE(xz, AS_HELP_STRING([--disable-xz], [Disable optional XZ support])) | |
461 | if test "x$enable_xz" != "xno"; then | |
462 | PKG_CHECK_MODULES(XZ, [ liblzma ], | |
463 | [AC_DEFINE(HAVE_XZ, 1, [Define if XZ is available]) have_xz=yes], have_xz=no) | |
807e17f0 LP |
464 | if test "x$have_xz" = xno -a "x$enable_xz" = xyes; then |
465 | AC_MSG_ERROR([*** Xz support requested but libraries not found]) | |
466 | fi | |
467 | fi | |
468 | AM_CONDITIONAL(HAVE_XZ, [test "$have_xz" = "yes"]) | |
469 | ||
3e214785 | 470 | # ------------------------------------------------------------------------------ |
5b6319dc LP |
471 | AC_ARG_ENABLE([pam], |
472 | AS_HELP_STRING([--disable-pam],[Disable optional PAM support]), | |
473 | [case "${enableval}" in | |
474 | yes) have_pam=yes ;; | |
475 | no) have_pam=no ;; | |
476 | *) AC_MSG_ERROR(bad value ${enableval} for --disable-pam) ;; | |
477 | esac], | |
478 | [have_pam=auto]) | |
479 | ||
480 | if test "x${have_pam}" != xno ; then | |
481 | AC_CHECK_HEADERS( | |
482 | [security/pam_modules.h security/pam_modutil.h security/pam_ext.h], | |
483 | [have_pam=yes], | |
484 | [if test "x$have_pam" = xyes ; then | |
485 | AC_MSG_ERROR([*** PAM headers not found.]) | |
486 | fi]) | |
487 | ||
488 | AC_CHECK_LIB( | |
489 | [pam], | |
490 | [pam_syslog], | |
491 | [have_pam=yes], | |
492 | [if test "x$have_pam" = xyes ; then | |
493 | AC_MSG_ERROR([*** libpam not found.]) | |
494 | fi]) | |
495 | ||
496 | if test "x$have_pam" = xyes ; then | |
497 | PAM_LIBS="-lpam -lpam_misc" | |
498 | AC_DEFINE(HAVE_PAM, 1, [PAM available]) | |
6a6751fe | 499 | M4_DEFINES="$M4_DEFINES -DHAVE_PAM" |
812cce32 LP |
500 | else |
501 | have_pam=no | |
5b6319dc LP |
502 | fi |
503 | else | |
504 | PAM_LIBS= | |
505 | fi | |
506 | AC_SUBST(PAM_LIBS) | |
507 | AM_CONDITIONAL([HAVE_PAM], [test "x$have_pam" != xno]) | |
508 | ||
3e214785 | 509 | # ------------------------------------------------------------------------------ |
5eda94dd LP |
510 | AC_ARG_ENABLE([acl], |
511 | AS_HELP_STRING([--disable-acl],[Disable optional ACL support]), | |
512 | [case "${enableval}" in | |
513 | yes) have_acl=yes ;; | |
514 | no) have_acl=no ;; | |
515 | *) AC_MSG_ERROR(bad value ${enableval} for --disable-acl) ;; | |
516 | esac], | |
517 | [have_acl=auto]) | |
518 | ||
519 | if test "x${have_acl}" != xno ; then | |
520 | AC_CHECK_HEADERS( | |
521 | [sys/acl.h acl/libacl.h], | |
522 | [have_acl=yes], | |
523 | [if test "x$have_acl" = xyes ; then | |
524 | AC_MSG_ERROR([*** ACL headers not found.]) | |
525 | fi]) | |
526 | ||
527 | AC_CHECK_LIB( | |
528 | [acl], | |
529 | [acl_get_file], | |
530 | [have_acl=yes], | |
531 | [if test "x$have_acl" = xyes ; then | |
532 | AC_MSG_ERROR([*** libacl not found.]) | |
533 | fi]) | |
534 | ||
535 | if test "x$have_acl" = xyes ; then | |
536 | ACL_LIBS="-lacl" | |
537 | AC_DEFINE(HAVE_ACL, 1, [ACL available]) | |
538 | else | |
539 | have_acl=no | |
540 | fi | |
541 | else | |
542 | ACL_LIBS= | |
543 | fi | |
544 | AC_SUBST(ACL_LIBS) | |
545 | AM_CONDITIONAL([HAVE_ACL], [test "x$have_acl" != xno]) | |
546 | ||
2b3e18de KL |
547 | # ------------------------------------------------------------------------------ |
548 | AC_ARG_ENABLE([smack], AS_HELP_STRING([--disable-smack],[Disable optional SMACK support]), | |
549 | [case "${enableval}" in | |
550 | yes) have_smack=yes ;; | |
551 | no) have_smack=no ;; | |
552 | *) AC_MSG_ERROR(bad value ${enableval} for --disable-smack) ;; | |
553 | esac], | |
554 | [have_smack=auto]) | |
555 | ||
d2edfae0 KS |
556 | if test "x${have_smack}" = xauto; then |
557 | M4_DEFINES="$M4_DEFINES -DHAVE_SMACK" | |
558 | have_smack=yes | |
2b3e18de KL |
559 | fi |
560 | ||
8b197c3a AK |
561 | AC_ARG_WITH(smack-run-label, |
562 | AS_HELP_STRING([--with-smack-run-label=STRING], | |
563 | [run systemd --system with a specific SMACK label]), | |
564 | [AC_DEFINE_UNQUOTED(SMACK_RUN_LABEL, ["$withval"], [Run with a smack label])], | |
565 | []) | |
566 | ||
2b3e18de KL |
567 | if test "x${have_smack}" = xyes ; then |
568 | AC_DEFINE(HAVE_SMACK, 1, [Define if SMACK is available]) | |
569 | fi | |
570 | ||
7560fffc | 571 | # ------------------------------------------------------------------------------ |
feb12d3e | 572 | AC_ARG_ENABLE([gcrypt], |
7560fffc LP |
573 | AS_HELP_STRING([--disable-gcrypt],[Disable optional GCRYPT support]), |
574 | [case "${enableval}" in | |
575 | yes) have_gcrypt=yes ;; | |
576 | no) have_gcrypt=no ;; | |
577 | *) AC_MSG_ERROR(bad value ${enableval} for --disable-gcrypt) ;; | |
578 | esac], | |
579 | [have_gcrypt=auto]) | |
580 | ||
581 | if test "x${have_gcrypt}" != xno ; then | |
582 | AM_PATH_LIBGCRYPT( | |
583 | [1.4.5], | |
584 | [have_gcrypt=yes], | |
585 | [if test "x$have_gcrypt" = xyes ; then | |
586 | AC_MSG_ERROR([*** GCRYPT headers not found.]) | |
587 | fi]) | |
588 | ||
589 | if test "x$have_gcrypt" = xyes ; then | |
590 | GCRYPT_LIBS="$LIBGCRYPT_LIBS" | |
591 | GCRYPT_CFLAGS="$LIBGCRYPT_CFLAGS" | |
592 | AC_DEFINE(HAVE_GCRYPT, 1, [GCRYPT available]) | |
593 | else | |
594 | have_gcrypt=no | |
595 | fi | |
596 | else | |
597 | GCRYPT_LIBS= | |
598 | GCRYPT_CFLAGS= | |
599 | fi | |
600 | AC_SUBST(GCRYPT_LIBS) | |
601 | AC_SUBST(GCRYPT_CFLAGS) | |
602 | AM_CONDITIONAL([HAVE_GCRYPT], [test "x$have_gcrypt" != xno]) | |
603 | ||
3e214785 | 604 | # ------------------------------------------------------------------------------ |
4927fcae LP |
605 | AC_ARG_ENABLE([audit], |
606 | AS_HELP_STRING([--disable-audit],[Disable optional AUDIT support]), | |
607 | [case "${enableval}" in | |
608 | yes) have_audit=yes ;; | |
609 | no) have_audit=no ;; | |
610 | *) AC_MSG_ERROR(bad value ${enableval} for --disable-audit) ;; | |
611 | esac], | |
612 | [have_audit=auto]) | |
613 | ||
614 | if test "x${have_audit}" != xno ; then | |
615 | AC_CHECK_HEADERS( | |
616 | [libaudit.h], | |
617 | [have_audit=yes], | |
618 | [if test "x$have_audit" = xyes ; then | |
619 | AC_MSG_ERROR([*** AUDIT headers not found.]) | |
620 | fi]) | |
621 | ||
622 | AC_CHECK_LIB( | |
623 | [audit], | |
624 | [audit_open], | |
625 | [have_audit=yes], | |
626 | [if test "x$have_audit" = xyes ; then | |
627 | AC_MSG_ERROR([*** libaudit not found.]) | |
628 | fi]) | |
629 | ||
630 | if test "x$have_audit" = xyes ; then | |
631 | AUDIT_LIBS="-laudit" | |
632 | AC_DEFINE(HAVE_AUDIT, 1, [AUDIT available]) | |
633 | else | |
634 | have_audit=no | |
635 | fi | |
636 | else | |
637 | AUDIT_LIBS= | |
638 | fi | |
639 | AC_SUBST(AUDIT_LIBS) | |
640 | ||
8d4e028f LP |
641 | # ------------------------------------------------------------------------------ |
642 | AC_ARG_ENABLE([elfutils], | |
643 | AS_HELP_STRING([--disable-elfutils],[Disable optional ELFUTILS support]), | |
644 | [case "${enableval}" in | |
645 | yes) have_elfutils=yes ;; | |
646 | no) have_elfutils=no ;; | |
647 | *) AC_MSG_ERROR(bad value ${enableval} for --disable-elfutils) ;; | |
648 | esac], | |
649 | [have_elfutils=auto]) | |
650 | ||
651 | if test "x${have_elfutils}" != xno ; then | |
652 | AC_CHECK_HEADERS( | |
653 | [elfutils/libdwfl.h], | |
654 | [have_elfutils=yes], | |
655 | [if test "x$have_elfutils" = xyes ; then | |
656 | AC_MSG_ERROR([*** ELFUTILS headers not found.]) | |
657 | fi]) | |
658 | ||
659 | AC_CHECK_LIB( | |
660 | [dw], | |
661 | [dwfl_begin], | |
662 | [have_elfutils=yes], | |
663 | [if test "x$have_elfutils" = xyes ; then | |
664 | AC_MSG_ERROR([*** ELFUTILS libs not found.]) | |
665 | fi]) | |
666 | ||
667 | if test "x$have_elfutils" = xyes ; then | |
668 | ELFUTILS_LIBS="-lelf -ldw" | |
669 | AC_DEFINE(HAVE_ELFUTILS, 1, [ELFUTILS available]) | |
670 | else | |
671 | have_elfutils=no | |
672 | fi | |
673 | else | |
674 | ELFUTILS_LIBS= | |
675 | fi | |
676 | AC_SUBST(ELFUTILS_LIBS) | |
677 | AM_CONDITIONAL(HAVE_ELFUTILS, [test "$have_elfutils" = "yes"]) | |
678 | ||
3e214785 | 679 | # ------------------------------------------------------------------------------ |
7f4e0805 LP |
680 | have_libcryptsetup=no |
681 | AC_ARG_ENABLE(libcryptsetup, AS_HELP_STRING([--disable-libcryptsetup], [disable libcryptsetup tools])) | |
682 | if test "x$enable_libcryptsetup" != "xno"; then | |
8cf3ca80 | 683 | PKG_CHECK_MODULES(LIBCRYPTSETUP, [ libcryptsetup >= 1.6.0 ], |
7f4e0805 | 684 | [AC_DEFINE(HAVE_LIBCRYPTSETUP, 1, [Define if libcryptsetup is available]) have_libcryptsetup=yes], have_libcryptsetup=no) |
7f4e0805 | 685 | if test "x$have_libcryptsetup" = xno -a "x$enable_libcryptsetup" = xyes; then |
591622d7 | 686 | AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found]) |
7f4e0805 LP |
687 | fi |
688 | fi | |
689 | AM_CONDITIONAL(HAVE_LIBCRYPTSETUP, [test "$have_libcryptsetup" = "yes"]) | |
690 | ||
f6a971bc LP |
691 | # ------------------------------------------------------------------------------ |
692 | have_qrencode=no | |
693 | AC_ARG_ENABLE(qrencode, AS_HELP_STRING([--disable-qrencode], [disable qrencode support])) | |
694 | if test "x$enable_qrencode" != "xno"; then | |
695 | PKG_CHECK_MODULES(QRENCODE, [ libqrencode ], | |
696 | [AC_DEFINE(HAVE_QRENCODE, 1, [Define if qrencode is available]) have_qrencode=yes], have_qrencode=no) | |
697 | if test "x$have_qrencode" = xno -a "x$enable_qrencode" = xyes; then | |
698 | AC_MSG_ERROR([*** qrencode support requested but libraries not found]) | |
699 | fi | |
700 | fi | |
701 | AM_CONDITIONAL(HAVE_QRENCODE, [test "$have_qrencode" = "yes"]) | |
702 | ||
7b17a7d7 LP |
703 | # ------------------------------------------------------------------------------ |
704 | have_microhttpd=no | |
705 | AC_ARG_ENABLE(microhttpd, AS_HELP_STRING([--disable-microhttpd], [disable microhttpd support])) | |
706 | if test "x$enable_microhttpd" != "xno"; then | |
3f573096 | 707 | PKG_CHECK_MODULES(MICROHTTPD, [libmicrohttpd >= 0.9.33], |
7b17a7d7 LP |
708 | [AC_DEFINE(HAVE_MICROHTTPD, 1, [Define if microhttpd is available]) have_microhttpd=yes], have_microhttpd=no) |
709 | if test "x$have_microhttpd" = xno -a "x$enable_microhttpd" = xyes; then | |
710 | AC_MSG_ERROR([*** microhttpd support requested but libraries not found]) | |
711 | fi | |
712 | fi | |
713 | AM_CONDITIONAL(HAVE_MICROHTTPD, [test "$have_microhttpd" = "yes"]) | |
714 | ||
60313199 ZJS |
715 | # ------------------------------------------------------------------------------ |
716 | have_gnutls=no | |
717 | AC_ARG_ENABLE(gnutls, AS_HELP_STRING([--disable-gnutls], [disable gnutls support])) | |
718 | if test "x$enable_gnutls" != "xno"; then | |
f12be7e8 | 719 | PKG_CHECK_MODULES(GNUTLS, [gnutls >= 3.1.4], |
60313199 ZJS |
720 | [AC_DEFINE(HAVE_GNUTLS, 1, [Define if gnutls is available]) have_gnutls=yes], have_gnutls=no) |
721 | if test "x$have_gnutls" = xno -a "x$enable_gnutls" = xyes; then | |
722 | AC_MSG_ERROR([*** gnutls support requested but libraries not found]) | |
723 | fi | |
724 | fi | |
725 | AM_CONDITIONAL(HAVE_GNUTLS, [test "$have_gnutls" = "yes"]) | |
726 | ||
3e214785 | 727 | # ------------------------------------------------------------------------------ |
27669061 MV |
728 | have_binfmt=no |
729 | AC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool])) | |
730 | if test "x$enable_binfmt" != "xno"; then | |
be31376e | 731 | have_binfmt=yes |
27669061 MV |
732 | fi |
733 | AM_CONDITIONAL(ENABLE_BINFMT, [test "$have_binfmt" = "yes"]) | |
734 | ||
3e214785 | 735 | # ------------------------------------------------------------------------------ |
e5e83e83 LP |
736 | have_vconsole=no |
737 | AC_ARG_ENABLE(vconsole, AS_HELP_STRING([--disable-vconsole], [disable vconsole tool])) | |
738 | if test "x$enable_vconsole" != "xno"; then | |
be31376e | 739 | have_vconsole=yes |
e5e83e83 LP |
740 | fi |
741 | AM_CONDITIONAL(ENABLE_VCONSOLE, [test "$have_vconsole" = "yes"]) | |
742 | ||
3e214785 | 743 | # ------------------------------------------------------------------------------ |
e5e83e83 LP |
744 | have_readahead=no |
745 | AC_ARG_ENABLE(readahead, AS_HELP_STRING([--disable-readahead], [disable readahead tools])) | |
746 | if test "x$enable_readahead" != "xno"; then | |
be31376e | 747 | have_readahead=yes |
e5e83e83 LP |
748 | fi |
749 | AM_CONDITIONAL(ENABLE_READAHEAD, [test "$have_readahead" = "yes"]) | |
750 | ||
83fdc450 AK |
751 | # ------------------------------------------------------------------------------ |
752 | have_bootchart=no | |
753 | AC_ARG_ENABLE(bootchart, AS_HELP_STRING([--disable-bootchart], [disable bootchart tool])) | |
754 | if test "x$enable_bootchart" != "xno"; then | |
755 | have_bootchart=yes | |
756 | fi | |
757 | AM_CONDITIONAL(ENABLE_BOOTCHART, [test "$have_bootchart" = "yes"]) | |
758 | ||
3e214785 | 759 | # ------------------------------------------------------------------------------ |
4de85612 LP |
760 | have_quotacheck=no |
761 | AC_ARG_ENABLE(quotacheck, AS_HELP_STRING([--disable-quotacheck], [disable quotacheck tools])) | |
762 | if test "x$enable_quotacheck" != "xno"; then | |
be31376e | 763 | have_quotacheck=yes |
4de85612 LP |
764 | fi |
765 | AM_CONDITIONAL(ENABLE_QUOTACHECK, [test "$have_quotacheck" = "yes"]) | |
766 | ||
6351163b UTL |
767 | # ------------------------------------------------------------------------------ |
768 | have_tmpfiles=no | |
769 | AC_ARG_ENABLE(tmpfiles, AS_HELP_STRING([--disable-tmpfiles], [disable tmpfiles support])) | |
770 | if test "x$enable_tmpfiles" != "xno"; then | |
771 | have_tmpfiles=yes | |
772 | fi | |
773 | AM_CONDITIONAL(ENABLE_TMPFILES, [test "$have_tmpfiles" = "yes"]) | |
774 | ||
1b992147 LP |
775 | # ------------------------------------------------------------------------------ |
776 | have_sysusers=no | |
777 | AC_ARG_ENABLE(sysusers, AS_HELP_STRING([--disable-sysusers], [disable sysusers support])) | |
778 | if test "x$enable_sysusers" != "xno"; then | |
779 | have_sysusers=yes | |
780 | fi | |
781 | AM_CONDITIONAL(ENABLE_SYSUSERS, [test "$have_sysusers" = "yes"]) | |
782 | ||
3e214785 | 783 | # ------------------------------------------------------------------------------ |
4de85612 LP |
784 | have_randomseed=no |
785 | AC_ARG_ENABLE(randomseed, AS_HELP_STRING([--disable-randomseed], [disable randomseed tools])) | |
786 | if test "x$enable_randomseed" != "xno"; then | |
be31376e | 787 | have_randomseed=yes |
4de85612 LP |
788 | fi |
789 | AM_CONDITIONAL(ENABLE_RANDOMSEED, [test "$have_randomseed" = "yes"]) | |
790 | ||
3731acf1 LP |
791 | # ------------------------------------------------------------------------------ |
792 | have_backlight=no | |
793 | AC_ARG_ENABLE(backlight, AS_HELP_STRING([--disable-backlight], [disable backlight tools])) | |
794 | if test "x$enable_backlight" != "xno"; then | |
795 | have_backlight=yes | |
796 | fi | |
797 | AM_CONDITIONAL(ENABLE_BACKLIGHT, [test "$have_backlight" = "yes"]) | |
798 | ||
3990f247 LP |
799 | # ------------------------------------------------------------------------------ |
800 | have_rfkill=no | |
801 | AC_ARG_ENABLE(rfkill, AS_HELP_STRING([--disable-rfkill], [disable rfkill tools])) | |
802 | if test "x$enable_rfkill" != "xno"; then | |
803 | have_rfkill=yes | |
804 | fi | |
805 | AM_CONDITIONAL(ENABLE_RFKILL, [test "$have_rfkill" = "yes"]) | |
806 | ||
3e214785 | 807 | # ------------------------------------------------------------------------------ |
2a018e83 KS |
808 | have_logind=no |
809 | AC_ARG_ENABLE(logind, AS_HELP_STRING([--disable-logind], [disable login daemon])) | |
810 | if test "x$enable_logind" != "xno"; then | |
be31376e | 811 | have_logind=yes |
2a018e83 KS |
812 | fi |
813 | AM_CONDITIONAL(ENABLE_LOGIND, [test "$have_logind" = "yes"]) | |
4c80c73c | 814 | AS_IF([test "$have_logind" = "yes"], [ AC_DEFINE(HAVE_LOGIND, [1], [Logind support available]) ]) |
2a018e83 | 815 | |
1ee306e1 LP |
816 | # ------------------------------------------------------------------------------ |
817 | have_machined=no | |
818 | AC_ARG_ENABLE(machined, AS_HELP_STRING([--disable-machined], [disable machine daemon])) | |
819 | if test "x$enable_machined" != "xno"; then | |
820 | have_machined=yes | |
821 | fi | |
822 | AM_CONDITIONAL(ENABLE_MACHINED, [test "$have_machined" = "yes"]) | |
823 | AS_IF([test "$have_machined" = "yes"], [ AC_DEFINE(HAVE_MACHINED, [1], [Machined support available]) ]) | |
824 | ||
3e214785 | 825 | # ------------------------------------------------------------------------------ |
b2e9fb99 MV |
826 | have_hostnamed=no |
827 | AC_ARG_ENABLE(hostnamed, AS_HELP_STRING([--disable-hostnamed], [disable hostname daemon])) | |
828 | if test "x$enable_hostnamed" != "xno"; then | |
be31376e | 829 | have_hostnamed=yes |
b2e9fb99 MV |
830 | fi |
831 | AM_CONDITIONAL(ENABLE_HOSTNAMED, [test "$have_hostnamed" = "yes"]) | |
832 | ||
3e214785 | 833 | # ------------------------------------------------------------------------------ |
f47cd184 MV |
834 | have_timedated=no |
835 | AC_ARG_ENABLE(timedated, AS_HELP_STRING([--disable-timedated], [disable timedate daemon])) | |
836 | if test "x$enable_timedated" != "xno"; then | |
be31376e | 837 | have_timedated=yes |
f47cd184 MV |
838 | fi |
839 | AM_CONDITIONAL(ENABLE_TIMEDATED, [test "$have_timedated" = "yes"]) | |
840 | ||
3e214785 | 841 | # ------------------------------------------------------------------------------ |
687ed123 KS |
842 | have_timesyncd=no |
843 | AC_ARG_ENABLE(timesyncd, AS_HELP_STRING([--disable-timesyncd], [disable timesync daemon])) | |
43ba1b3e | 844 | if test "x$enable_timesyncd" != "xno"; then |
687ed123 KS |
845 | have_timesyncd=yes |
846 | fi | |
847 | AM_CONDITIONAL(ENABLE_TIMESYNCD, [test "$have_timesyncd" = "yes"]) | |
848 | ||
e8af6973 LP |
849 | AC_ARG_WITH(ntp-servers, |
850 | AS_HELP_STRING([--with-ntp-servers=NTPSERVERS], | |
851 | [Space-separated list of default NTP servers]), | |
852 | [NTP_SERVERS="$withval"], | |
853 | [NTP_SERVERS="time1.google.com time2.google.com time3.google.com time4.google.com"]) | |
854 | ||
855 | AC_DEFINE_UNQUOTED(NTP_SERVERS, ["$NTP_SERVERS"], [Default NTP Servers]) | |
856 | AC_SUBST(NTP_SERVERS) | |
857 | ||
661278ee LP |
858 | AC_ARG_WITH(time-epoch, |
859 | AS_HELP_STRING([--with-time-epoch=SECONDS], | |
5ea846cc | 860 | [Time epoch for time clients]), |
661278ee LP |
861 | [TIME_EPOCH="$withval"], |
862 | [TIME_EPOCH="`stat -c %Y ${srcdir}/NEWS 2>/dev/null || echo 0`"]) | |
863 | ||
864 | AC_DEFINE_UNQUOTED(TIME_EPOCH, [$TIME_EPOCH], [Time Epoch]) | |
865 | ||
f7dc3ab9 LP |
866 | # ------------------------------------------------------------------------------ |
867 | AC_ARG_WITH(system-uid-max, | |
868 | AS_HELP_STRING([--with-system-uid-max=UID] | |
869 | [Maximum UID for system users]), | |
870 | [SYSTEM_UID_MAX="$withval"], | |
871 | [SYSTEM_UID_MAX="`awk 'BEGIN { uid=999 } /^\s*SYS_UID_MAX\s+/ { uid=$2 } END { print uid }' /etc/login.defs 2>/dev/null || echo 999`"]) | |
872 | ||
873 | AC_DEFINE_UNQUOTED(SYSTEM_UID_MAX, [$SYSTEM_UID_MAX], [Maximum System UID]) | |
874 | AC_SUBST(SYSTEM_UID_MAX) | |
875 | ||
876 | # ------------------------------------------------------------------------------ | |
877 | AC_ARG_WITH(system-gid-max, | |
878 | AS_HELP_STRING([--with-system-gid-max=GID] | |
879 | [Maximum GID for system groups]), | |
880 | [SYSTEM_GID_MAX="$withval"], | |
881 | [SYSTEM_GID_MAX="`awk 'BEGIN { gid=999 } /^\s*SYS_GID_MAX\s+/ { gid=$2 } END { print gid }' /etc/login.defs 2>/dev/null || echo 999`"]) | |
882 | ||
883 | AC_DEFINE_UNQUOTED(SYSTEM_GID_MAX, [$SYSTEM_GID_MAX], [Maximum System GID]) | |
884 | AC_SUBST(SYSTEM_GID_MAX) | |
885 | ||
687ed123 | 886 | # ------------------------------------------------------------------------------ |
4cd1eaa5 MV |
887 | have_localed=no |
888 | AC_ARG_ENABLE(localed, AS_HELP_STRING([--disable-localed], [disable locale daemon])) | |
889 | if test "x$enable_localed" != "xno"; then | |
be31376e | 890 | have_localed=yes |
4cd1eaa5 MV |
891 | fi |
892 | AM_CONDITIONAL(ENABLE_LOCALED, [test "$have_localed" = "yes"]) | |
893 | ||
3e214785 | 894 | # ------------------------------------------------------------------------------ |
f5e04665 LP |
895 | have_coredump=no |
896 | AC_ARG_ENABLE(coredump, AS_HELP_STRING([--disable-coredump], [disable coredump hook])) | |
897 | if test "x$enable_coredump" != "xno"; then | |
be31376e | 898 | have_coredump=yes |
f5e04665 LP |
899 | fi |
900 | AM_CONDITIONAL(ENABLE_COREDUMP, [test "$have_coredump" = "yes"]) | |
901 | ||
46ba8aae LP |
902 | # ------------------------------------------------------------------------------ |
903 | have_polkit=no | |
904 | AC_ARG_ENABLE(polkit, AS_HELP_STRING([--disable-polkit], [disable PolicyKit support])) | |
905 | if test "x$enable_polkit" != "xno"; then | |
906 | AC_DEFINE(ENABLE_POLKIT, 1, [Define if PolicyKit support is to be enabled]) | |
907 | have_polkit=yes | |
908 | fi | |
909 | AM_CONDITIONAL(ENABLE_POLKIT, [test "x$have_polkit" = "xyes"]) | |
910 | ||
3c9317d2 | 911 | # ------------------------------------------------------------------------------ |
091a364c TG |
912 | have_resolved=no |
913 | AC_ARG_ENABLE(resolved, AS_HELP_STRING([--disable-resolved], [disable resolve daemon])) | |
914 | if test "x$enable_resolved" != "xno"; then | |
915 | have_resolved=yes | |
3c9317d2 | 916 | fi |
091a364c | 917 | AM_CONDITIONAL(ENABLE_RESOLVED, [test "$have_resolved" = "yes"]) |
3c9317d2 | 918 | |
e16cb2e4 TG |
919 | AC_ARG_WITH(dns-servers, |
920 | AS_HELP_STRING([--with-dns-servers=DNSSERVERS], | |
921 | [Space-separated list of default DNS servers]), | |
49e5c2b2 | 922 | [DNS_SERVERS="$withval"], |
7b4d7968 | 923 | [DNS_SERVERS="8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844"]) |
e16cb2e4 TG |
924 | |
925 | AC_DEFINE_UNQUOTED(DNS_SERVERS, ["$DNS_SERVERS"], [Default DNS Servers]) | |
926 | AC_SUBST(DNS_SERVERS) | |
927 | ||
091a364c TG |
928 | # ------------------------------------------------------------------------------ |
929 | have_networkd=no | |
930 | AC_ARG_ENABLE(networkd, AS_HELP_STRING([--disable-networkd], [disable networkd])) | |
931 | if test "x$enable_networkd" != "xno"; then | |
932 | AC_DEFINE(ENABLE_NETWORKD, 1, [Define if networkd support is to be enabled]) | |
933 | have_networkd=yes | |
934 | fi | |
091a364c TG |
935 | AM_CONDITIONAL(ENABLE_NETWORKD, [test "x$have_networkd" = "xyes"]) |
936 | ||
b872e9a0 LP |
937 | # ------------------------------------------------------------------------------ |
938 | have_efi=no | |
939 | AC_ARG_ENABLE(efi, AS_HELP_STRING([--disable-efi], [disable EFI support])) | |
940 | if test "x$enable_efi" != "xno"; then | |
941 | AC_DEFINE(ENABLE_EFI, 1, [Define if EFI support is to be enabled]) | |
942 | have_efi=yes | |
943 | fi | |
944 | AM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"]) | |
945 | ||
bd441fa2 ZJS |
946 | # ------------------------------------------------------------------------------ |
947 | have_multi_seat_x=no | |
948 | AC_ARG_ENABLE(multi_seat_x, AS_HELP_STRING([--disable-multi-seat-x], [do not build multi-seat-x])) | |
949 | if test "x$enable_multi_seat_x" != "xno"; then | |
950 | have_multi_seat_x=yes | |
951 | fi | |
952 | AM_CONDITIONAL(ENABLE_MULTI_SEAT_X, [test "$have_multi_seat_x" = "yes"]) | |
953 | ||
626851be LP |
954 | # ------------------------------------------------------------------------------ |
955 | have_kdbus=no | |
c97a6dbc | 956 | AC_ARG_ENABLE(kdbus, AS_HELP_STRING([--enable-kdbus], [do connect to kdbus by default])) |
146ccaaf | 957 | if test "x$enable_kdbus" = "xyes"; then |
626851be LP |
958 | AC_DEFINE(ENABLE_KDBUS, 1, [Define if kdbus support is to be enabled]) |
959 | have_kdbus=yes | |
4acbce79 | 960 | M4_DEFINES="$M4_DEFINES -DENABLE_KDBUS" |
626851be LP |
961 | fi |
962 | AM_CONDITIONAL(ENABLE_KDBUS, [test "$have_kdbus" = "yes"]) | |
963 | ||
b1c4ca25 LP |
964 | # ------------------------------------------------------------------------------ |
965 | AC_ARG_WITH(rc-local-script-path-start, | |
966 | AS_HELP_STRING([--with-rc-local-script-path-start=PATH], | |
967 | [Path to /etc/rc.local]), | |
968 | [RC_LOCAL_SCRIPT_PATH_START="$withval"], | |
969 | [RC_LOCAL_SCRIPT_PATH_START="/etc/rc.local"]) | |
970 | ||
971 | AC_ARG_WITH(rc-local-script-path-stop, | |
972 | AS_HELP_STRING([--with-rc-local-script-path-stop=PATH], | |
bc270841 | 973 | [Path to /usr/sbin/halt.local]), |
b1c4ca25 | 974 | [RC_LOCAL_SCRIPT_PATH_STOP="$withval"], |
bc270841 | 975 | [RC_LOCAL_SCRIPT_PATH_STOP="/usr/sbin/halt.local"]) |
b1c4ca25 LP |
976 | |
977 | AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_START, ["$RC_LOCAL_SCRIPT_PATH_START"], [Path of /etc/rc.local script]) | |
bc270841 | 978 | AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_STOP, ["$RC_LOCAL_SCRIPT_PATH_STOP"], [Path of /usr/sbin/halt.local script]) |
b1c4ca25 LP |
979 | |
980 | AC_SUBST(RC_LOCAL_SCRIPT_PATH_START) | |
981 | AC_SUBST(RC_LOCAL_SCRIPT_PATH_STOP) | |
982 | ||
a382332e LP |
983 | # ------------------------------------------------------------------------------ |
984 | AC_ARG_WITH(kbd-loadkeys, | |
985 | AS_HELP_STRING([--with-kbd-loadkeys=PATH], | |
986 | [Path to loadkeys]), | |
987 | [KBD_LOADKEYS="$withval"], | |
988 | [KBD_LOADKEYS="/usr/bin/loadkeys"]) | |
989 | ||
990 | AC_ARG_WITH(kbd-setfont, | |
991 | AS_HELP_STRING([--with-kbd-setfont=PATH], | |
992 | [Path to setfont]), | |
993 | [KBD_SETFONT="$withval"], | |
994 | [KBD_SETFONT="/usr/bin/setfont"]) | |
995 | ||
996 | AC_DEFINE_UNQUOTED(KBD_LOADKEYS, ["$KBD_LOADKEYS"], [Path of loadkeys]) | |
997 | AC_DEFINE_UNQUOTED(KBD_SETFONT, ["$KBD_SETFONT"], [Path of setfont]) | |
998 | ||
999 | AC_SUBST(KBD_LOADKEYS) | |
1000 | AC_SUBST(KBD_SETFONT) | |
1001 | ||
4ad61fd1 CR |
1002 | AC_ARG_WITH(telinit, |
1003 | AS_HELP_STRING([--with-telinit=PATH], | |
1004 | [Path to telinit]), | |
1005 | [TELINIT="$withval"], | |
abaaabf4 | 1006 | [TELINIT="/lib/sysvinit/telinit"]) |
4ad61fd1 CR |
1007 | |
1008 | AC_DEFINE_UNQUOTED(TELINIT, ["$TELINIT"], [Path to telinit]) | |
1009 | ||
1010 | AC_SUBST(TELINIT) | |
1011 | ||
54b434b1 | 1012 | AC_CHECK_HEADERS_ONCE([valgrind/memcheck.h valgrind/valgrind.h]) |
7211f918 | 1013 | |
d562955e TG |
1014 | # ------------------------------------------------------------------------------ |
1015 | have_myhostname=no | |
f8c5a581 | 1016 | AC_ARG_ENABLE(myhostname, AS_HELP_STRING([--disable-myhostname], [disable nss-myhostname support])) |
d562955e TG |
1017 | if test "x$enable_myhostname" != "xno"; then |
1018 | AC_HEADER_STDC | |
a3b6fafe | 1019 | AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h nss.h sys/ioctl.h sys/auxv.h]) |
d562955e TG |
1020 | |
1021 | AC_C_CONST | |
1022 | AC_TYPE_SIZE_T | |
1023 | AC_HEADER_TIME | |
1024 | ||
1025 | AC_FUNC_MALLOC | |
1026 | AC_FUNC_SELECT_ARGTYPES | |
1027 | AC_CHECK_FUNCS([gethostbyaddr gethostbyname gettimeofday inet_ntoa memset select socket strcspn strdup strerror strncasecmp strcasecmp strspn]) | |
1028 | ||
1029 | have_myhostname=yes | |
1030 | fi | |
1031 | AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"]) | |
1032 | ||
3e214785 KS |
1033 | # ------------------------------------------------------------------------------ |
1034 | AC_ARG_WITH(firmware-path, | |
1035 | AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]], | |
a3bd8447 TG |
1036 | [Firmware search path (default="")]), |
1037 | [], [with_firmware_path=""]) | |
3e214785 KS |
1038 | OLD_IFS=$IFS |
1039 | IFS=: | |
1040 | for i in $with_firmware_path; do | |
1041 | if test "x${FIRMWARE_PATH}" = "x"; then | |
1042 | FIRMWARE_PATH="\\\"${i}/\\\"" | |
1043 | else | |
1044 | FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\"" | |
1045 | fi | |
1046 | done | |
1047 | IFS=$OLD_IFS | |
a3bd8447 | 1048 | AC_SUBST(FIRMWARE_PATH) |
d8d4bee7 | 1049 | AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ]) |
a3bd8447 | 1050 | AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"]) |
3e214785 KS |
1051 | |
1052 | # ------------------------------------------------------------------------------ | |
1053 | AC_ARG_ENABLE([gudev], | |
1054 | AS_HELP_STRING([--disable-gudev], [disable Gobject libudev support @<:@default=enabled@:>@]), | |
1055 | [], [enable_gudev=yes]) | |
de1c301e | 1056 | AS_IF([test "x$enable_gudev" = "xyes"], [ PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.22.0 gobject-2.0 >= 2.22.0 gio-2.0]) ]) |
3e214785 | 1057 | AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"]) |
de1c301e LP |
1058 | AS_IF([test "x$enable_gudev" = "xyes"], [ AC_DEFINE(HAVE_GLIB, 1, [Define if glib is available]) ]) |
1059 | ||
3e214785 | 1060 | # ------------------------------------------------------------------------------ |
75db9a77 | 1061 | have_manpages=no |
4c2b0e4e | 1062 | AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages])) |
4ca39b28 | 1063 | AS_IF([test "x$enable_manpages" != xno], [have_manpages=yes]) |
fe1fed02 | 1064 | AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"]) |
75db9a77 | 1065 | |
3e214785 | 1066 | # ------------------------------------------------------------------------------ |
d1ab0ca0 | 1067 | |
34eff652 LP |
1068 | # Location of the init scripts as mandated by LSB |
1069 | SYSTEM_SYSVINIT_PATH=/etc/init.d | |
f1dd0c3f | 1070 | SYSTEM_SYSVRCND_PATH=/etc/rc.d |
12e84679 | 1071 | |
136337ff | 1072 | AC_ARG_WITH([sysvinit-path], |
be31376e | 1073 | [AS_HELP_STRING([--with-sysvinit-path=PATH], |
bc270841 | 1074 | [Specify the path to where the SysV init scripts are located])], |
be31376e KS |
1075 | [SYSTEM_SYSVINIT_PATH="$withval"], |
1076 | []) | |
136337ff | 1077 | |
dee4c244 LP |
1078 | AC_ARG_WITH([sysvrcnd-path], |
1079 | [AS_HELP_STRING([--with-sysvrcnd-path=PATH], | |
bc270841 | 1080 | [Specify the path to the base directory for the SysV rcN.d directories])], |
136337ff TFH |
1081 | [SYSTEM_SYSVRCND_PATH="$withval"], |
1082 | []) | |
1083 | ||
07459bb6 FF |
1084 | if test "x${SYSTEM_SYSVINIT_PATH}" != "x" -a "x${SYSTEM_SYSVRCND_PATH}" != "x"; then |
1085 | AC_DEFINE(HAVE_SYSV_COMPAT, [], [SysV init scripts and rcN.d links are supported.]) | |
1086 | SYSTEM_SYSV_COMPAT="yes" | |
f975e971 | 1087 | M4_DEFINES="$M4_DEFINES -DHAVE_SYSV_COMPAT" |
07459bb6 | 1088 | elif test "x${SYSTEM_SYSVINIT_PATH}" != "x" -o "x${SYSTEM_SYSVRCND_PATH}" != "x"; then |
dee4c244 | 1089 | AC_MSG_ERROR([*** You need both --with-sysvinit-path=PATH and --with-sysvrcnd-path=PATH to enable SysV compatibility support, or both empty to disable it.]) |
07459bb6 FF |
1090 | else |
1091 | SYSTEM_SYSV_COMPAT="no" | |
1092 | fi | |
1093 | ||
bc270841 LP |
1094 | AC_SUBST(SYSTEM_SYSVINIT_PATH) |
1095 | AC_SUBST(SYSTEM_SYSVRCND_PATH) | |
1096 | AC_SUBST(M4_DEFINES) | |
1097 | ||
1098 | AM_CONDITIONAL(HAVE_SYSV_COMPAT, test "$SYSTEM_SYSV_COMPAT" = "yes") | |
1099 | ||
bef2733f | 1100 | AC_ARG_WITH([tty-gid], |
a05ea46d | 1101 | [AS_HELP_STRING([--with-tty-gid=GID], |
bef2733f | 1102 | [Specify the numeric GID of the 'tty' group])], |
f8b5d994 LP |
1103 | [TTY_GID="$withval"], |
1104 | [TTY_GID="5"]) | |
1105 | ||
1106 | AC_DEFINE_UNQUOTED(TTY_GID, [$TTY_GID], [GID of the 'tty' group]) | |
1107 | AC_SUBST(TTY_GID) | |
bef2733f | 1108 | |
d2d12cd1 LP |
1109 | AC_ARG_WITH([dbuspolicydir], |
1110 | AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]), | |
1111 | [], | |
25ee45f9 | 1112 | [with_dbuspolicydir=$($PKG_CONFIG --variable=sysconfdir dbus-1)/dbus-1/system.d]) |
d122948d | 1113 | |
d2d12cd1 LP |
1114 | AC_ARG_WITH([dbussessionservicedir], |
1115 | AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]), | |
1116 | [], | |
25ee45f9 | 1117 | [with_dbussessionservicedir=$($PKG_CONFIG --variable=session_bus_services_dir dbus-1)]) |
d122948d | 1118 | |
d2d12cd1 LP |
1119 | AC_ARG_WITH([dbussystemservicedir], |
1120 | AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]), | |
1121 | [], | |
03c14914 | 1122 | [with_dbussystemservicedir=$(readlink -m $($PKG_CONFIG --variable=session_bus_services_dir dbus-1)/../system-services)]) |
d122948d | 1123 | |
d2d12cd1 LP |
1124 | AC_ARG_WITH([dbusinterfacedir], |
1125 | AS_HELP_STRING([--with-dbusinterfacedir=DIR], [D-Bus interface directory]), | |
1126 | [], | |
03c14914 | 1127 | [with_dbusinterfacedir=$(readlink -m $($PKG_CONFIG --variable=session_bus_services_dir dbus-1)/../interfaces)]) |
d122948d | 1128 | |
db059f1b MB |
1129 | AC_ARG_WITH([bashcompletiondir], |
1130 | AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]), | |
1131 | [], | |
25ee45f9 MB |
1132 | [AS_IF([$($PKG_CONFIG --exists bash-completion)], [ |
1133 | with_bashcompletiondir=$($PKG_CONFIG --variable=completionsdir bash-completion) | |
db059f1b MB |
1134 | ] , [ |
1135 | with_bashcompletiondir=${datadir}/bash-completion/completions | |
1136 | ])]) | |
1137 | ||
4f87c47b WG |
1138 | AC_ARG_WITH([zshcompletiondir], |
1139 | AS_HELP_STRING([--with-zshcompletiondir=DIR], [Zsh completions directory]), | |
1140 | [], [with_zshcompletiondir=${datadir}/zsh/site-functions]) | |
1141 | ||
b8079ae1 KS |
1142 | AC_ARG_WITH([rootprefix], |
1143 | AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]), | |
39ad55a9 | 1144 | [], [with_rootprefix=${ac_default_prefix}]) |
d2d12cd1 | 1145 | |
ae446765 KS |
1146 | AC_ARG_WITH([rootlibdir], |
1147 | AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]), | |
1148 | [], | |
1149 | [with_rootlibdir=${libdir}]) | |
1150 | ||
9d3203b4 | 1151 | AC_ARG_WITH([pamlibdir], |
b0cca7d8 | 1152 | AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]), |
9d3203b4 KS |
1153 | [], |
1154 | [with_pamlibdir=${with_rootlibdir}/security]) | |
1155 | ||
5c390a4a ZJS |
1156 | AC_ARG_WITH([pamconfdir], |
1157 | AS_HELP_STRING([--with-pamconfdir=DIR], [Directory for PAM configuration]), | |
1158 | [], | |
1159 | [with_pamconfdir=${sysconfdir}/pam.d]) | |
1160 | ||
bc9bdbba MG |
1161 | AC_ARG_ENABLE([split-usr], |
1162 | AS_HELP_STRING([--enable-split-usr], [Assume that /bin, /sbin aren\'t symlinks into /usr]), | |
1163 | [], | |
1164 | [AS_IF([test "x${ac_default_prefix}" != "x${with_rootprefix}"], [ | |
1165 | enable_split_usr=yes | |
1166 | ], [ | |
1167 | enable_split_usr=no | |
1168 | ])]) | |
1169 | ||
1170 | AS_IF([test "x${enable_split_usr}" = "xyes"], [ | |
2c6db6fb | 1171 | AC_DEFINE(HAVE_SPLIT_USR, 1, [Define if /bin, /sbin aren't symlinks into /usr]) |
bc9bdbba | 1172 | ]) |
2c6db6fb | 1173 | |
6fc00209 ZJS |
1174 | # Work around intltoolize and gtk-doc problems in VPATH builds |
1175 | AM_CONDITIONAL([ENABLE_GTK_DOC_TESTS], [test "x$0" = "x./configure"], | |
1176 | [Define to do gtk-doc tests]) | |
1177 | AS_IF([test "x$0" != "x./configure"], [ | |
1178 | AC_SUBST([INTLTOOL_UPDATE], [/bin/true]) | |
1179 | ]) | |
1180 | ||
cee22bd3 HGB |
1181 | AC_ARG_ENABLE(tests, |
1182 | [AC_HELP_STRING([--disable-tests], [disable tests])], | |
1183 | enable_tests=$enableval, enable_tests=yes) | |
1184 | AM_CONDITIONAL(ENABLE_TESTS, [test x$enable_tests = xyes]) | |
1185 | ||
d2d12cd1 LP |
1186 | AC_SUBST([dbuspolicydir], [$with_dbuspolicydir]) |
1187 | AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir]) | |
1188 | AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir]) | |
1189 | AC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir]) | |
db059f1b | 1190 | AC_SUBST([bashcompletiondir], [$with_bashcompletiondir]) |
4f87c47b | 1191 | AC_SUBST([zshcompletiondir], [$with_zshcompletiondir]) |
8c6db833 | 1192 | AC_SUBST([pamlibdir], [$with_pamlibdir]) |
5c390a4a | 1193 | AC_SUBST([pamconfdir], [$with_pamconfdir]) |
b8079ae1 | 1194 | AC_SUBST([rootprefix], [$with_rootprefix]) |
ae446765 | 1195 | AC_SUBST([rootlibdir], [$with_rootlibdir]) |
8c4a3079 | 1196 | |
3e214785 KS |
1197 | AC_CONFIG_FILES([ |
1198 | Makefile po/Makefile.in | |
bb061708 KS |
1199 | docs/libudev/Makefile |
1200 | docs/libudev/version.xml | |
1201 | docs/gudev/Makefile | |
1202 | docs/gudev/version.xml | |
3e214785 KS |
1203 | ]) |
1204 | ||
a45a909f | 1205 | AC_OUTPUT |
ae446765 | 1206 | AC_MSG_RESULT([ |
0571e011 LP |
1207 | $PACKAGE_NAME $VERSION |
1208 | ||
7f4e0805 | 1209 | libcryptsetup: ${have_libcryptsetup} |
5b6319dc | 1210 | PAM: ${have_pam} |
12716238 | 1211 | AUDIT: ${have_audit} |
81611586 | 1212 | IMA: ${have_ima} |
eef65bf3 | 1213 | AppArmor: ${have_apparmor} |
12716238 | 1214 | SELinux: ${have_selinux} |
c0467cf3 | 1215 | SECCOMP: ${have_seccomp} |
2b3e18de | 1216 | SMACK: ${have_smack} |
807e17f0 | 1217 | XZ: ${have_xz} |
5eda94dd | 1218 | ACL: ${have_acl} |
7560fffc | 1219 | GCRYPT: ${have_gcrypt} |
f6a971bc | 1220 | QRENCODE: ${have_qrencode} |
7b17a7d7 | 1221 | MICROHTTPD: ${have_microhttpd} |
77e68fa2 | 1222 | CHKCONFIG: ${have_chkconfig} |
60313199 | 1223 | GNUTLS: ${have_gnutls} |
8d4e028f | 1224 | ELFUTILS: ${have_elfutils} |
27669061 | 1225 | binfmt: ${have_binfmt} |
e5e83e83 LP |
1226 | vconsole: ${have_vconsole} |
1227 | readahead: ${have_readahead} | |
83fdc450 | 1228 | bootchart: ${have_bootchart} |
4de85612 | 1229 | quotacheck: ${have_quotacheck} |
6351163b | 1230 | tmpfiles: ${have_tmpfiles} |
1b992147 | 1231 | sysusers: ${have_sysusers} |
4de85612 | 1232 | randomseed: ${have_randomseed} |
3731acf1 | 1233 | backlight: ${have_backlight} |
3990f247 | 1234 | rfkill: ${have_rfkill} |
2a018e83 | 1235 | logind: ${have_logind} |
1ee306e1 | 1236 | machined: ${have_machined} |
b2e9fb99 | 1237 | hostnamed: ${have_hostnamed} |
f47cd184 | 1238 | timedated: ${have_timedated} |
a91df40e | 1239 | timesyncd: ${have_timesyncd} |
e8af6973 | 1240 | default NTP servers: ${NTP_SERVERS} |
661278ee | 1241 | time epoch: ${TIME_EPOCH} |
4cd1eaa5 | 1242 | localed: ${have_localed} |
7a243b22 | 1243 | networkd: ${have_networkd} |
091a364c | 1244 | resolved: ${have_resolved} |
e16cb2e4 | 1245 | default DNS servers: ${DNS_SERVERS} |
f5e04665 | 1246 | coredump: ${have_coredump} |
46ba8aae | 1247 | polkit: ${have_polkit} |
b872e9a0 | 1248 | efi: ${have_efi} |
e3043162 | 1249 | kmod: ${have_kmod} |
f553b3b1 | 1250 | blkid: ${have_blkid} |
ac6b760c | 1251 | dbus: ${have_dbus} |
d562955e | 1252 | nss-myhostname: ${have_myhostname} |
3e214785 KS |
1253 | gudev: ${enable_gudev} |
1254 | gintrospection: ${enable_introspection} | |
bd441fa2 | 1255 | multi-seat-x: ${have_multi_seat_x} |
626851be | 1256 | kdbus: ${have_kdbus} |
8d7e170a LP |
1257 | Python: ${have_python} |
1258 | Python Headers: ${have_python_devel} | |
2f4da3e6 ZJS |
1259 | man pages: ${have_manpages} |
1260 | gtk-doc: ${enable_gtk_doc} | |
6aea6d10 | 1261 | test coverage: ${have_coverage} |
2f4da3e6 ZJS |
1262 | Split /usr: ${enable_split_usr} |
1263 | SysV compatibility: ${SYSTEM_SYSV_COMPAT} | |
53e856e1 | 1264 | compatibility libraries: ${have_compat_libs} |
3e214785 | 1265 | |
8c4a3079 | 1266 | prefix: ${prefix} |
b8079ae1 | 1267 | rootprefix: ${with_rootprefix} |
3e214785 KS |
1268 | sysconf dir: ${sysconfdir} |
1269 | datarootdir: ${datarootdir} | |
1270 | includedir: ${includedir} | |
1271 | include_prefix: ${INCLUDE_PREFIX} | |
ae446765 KS |
1272 | lib dir: ${libdir} |
1273 | rootlib dir: ${with_rootlibdir} | |
2f4da3e6 ZJS |
1274 | SysV init scripts: ${SYSTEM_SYSVINIT_PATH} |
1275 | SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH} | |
1276 | Build Python: ${PYTHON} | |
1277 | Installation Python: ${PYTHON_BINARY} | |
f2ec0646 | 1278 | sphinx binary: ${SPHINX_BUILD} |
2f4da3e6 | 1279 | firmware path: ${FIRMWARE_PATH} |
2c6db6fb | 1280 | PAM modules dir: ${with_pamlibdir} |
5c390a4a | 1281 | PAM configuration dir: ${with_pamconfdir} |
2c6db6fb LP |
1282 | D-Bus policy dir: ${with_dbuspolicydir} |
1283 | D-Bus session dir: ${with_dbussessionservicedir} | |
1284 | D-Bus system dir: ${with_dbussystemservicedir} | |
1285 | D-Bus interfaces dir: ${with_dbusinterfacedir} | |
db059f1b | 1286 | Bash completions dir: ${with_bashcompletiondir} |
4f87c47b | 1287 | Zsh completions dir: ${with_zshcompletiondir} |
b1c4ca25 LP |
1288 | Extra start script: ${RC_LOCAL_SCRIPT_PATH_START} |
1289 | Extra stop script: ${RC_LOCAL_SCRIPT_PATH_STOP} | |
45df1f2c | 1290 | Debug shell: ${SUSHELL} @ ${DEBUGTTY} |
f8b5d994 | 1291 | TTY GID: ${TTY_GID} |
f7dc3ab9 LP |
1292 | Maximum System UID: ${SYSTEM_UID_MAX} |
1293 | Maximum System GID: ${SYSTEM_GID_MAX} | |
66be6554 | 1294 | |
5a45a936 | 1295 | CFLAGS: ${OUR_CFLAGS} ${CFLAGS} |
1f048a6b | 1296 | CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS} |
5a45a936 | 1297 | LDFLAGS: ${OUR_LDFLAGS} ${LDFLAGS} |
a6c0b31d ZJS |
1298 | PYTHON_CFLAGS: ${PYTHON_DEVEL_CFLAGS} |
1299 | PYTHON_LIBS: ${PYTHON_DEVEL_LIBS} | |
ae446765 | 1300 | ]) |