chiark / gitweb /
Remove kill checks
[elogind.git] / configure.ac
1 #
2 #  This file is part of systemd.
3 #
4 #  Copyright 2010-2012 Lennart Poettering
5 #  Copyright 2010-2012 Kay Sievers
6 #
7 #  systemd is free software; you can redistribute it and/or modify it
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
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
15 #  Lesser General Public License for more details.
16 #
17 #  You should have received a copy of the GNU Lesser General Public License
18 #  along with systemd; If not, see <http://www.gnu.org/licenses/>.
19
20 AC_PREREQ([2.64])
21
22 # FIXME: Update to proper web page
23 AC_INIT([elogind],
24         [219],
25         [http://bugs.freedesktop.org/enter_bug.cgi?product=elogind],
26         [elogind],
27         [http://www.freedesktop.org/wiki/Software/elogind])
28
29 AC_CONFIG_SRCDIR([src/login/logind.c])
30 AC_CONFIG_MACRO_DIR([m4])
31 AC_CONFIG_HEADERS([config.h])
32 AC_CONFIG_AUX_DIR([build-aux])
33
34 AC_USE_SYSTEM_EXTENSIONS
35 AC_SYS_LARGEFILE
36 AC_PREFIX_DEFAULT([/usr])
37 AM_MAINTAINER_MODE([enable])
38 AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects parallel-tests])
39 AM_SILENT_RULES([yes])
40 AC_CANONICAL_HOST
41 AC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.])
42 LT_PREREQ(2.2)
43 LT_INIT([disable-static])
44
45 AS_IF([test "x$enable_static" = "xyes"], [AC_MSG_ERROR([--enable-static is not supported by elogind])])
46 AS_IF([test "x$enable_largefile" = "xno"], [AC_MSG_ERROR([--disable-largefile is not supported by elogind])])
47
48 SET_ARCH(X86_64, x86_64*)
49 SET_ARCH(IA32, i*86*)
50 SET_ARCH(MIPS, mips*)
51
52 # i18n stuff for the PolicyKit policy files, heck whether intltool can be found, disable NLS otherwise
53 AC_CHECK_PROG(intltool_found, [intltool-merge], [yes], [no])
54 AS_IF([test x"$intltool_found" != xyes],
55       [AS_IF([test x"$enable_nls" = xyes],
56              [AC_MSG_ERROR([--enable-nls requested but intltool not found])],
57              [AS_IF([test x"$enable_nls" != xno],
58                     [AC_MSG_WARN([*** Disabling NLS support because intltool was not found])
59                      enable_nls=no])
60              ])
61       ])
62
63 AM_NLS
64 AS_IF([test x"$enable_nls" != xno -o "x$enable_polkit" != xno], [
65     # intltoolize greps for '^(AC|IT)_PROG_INTLTOOL', so it needs to be on its own line
66 IT_PROG_INTLTOOL([0.40.0])
67 ])
68
69 AS_IF([test -z "$INTLTOOL_POLICY_RULE"], [
70     # If intltool is not available, provide a dummy rule to fail generation of %.policy files with a meaningful error message
71     INTLTOOL_POLICY_RULE='%.policy: %.policy.in ; @echo "  ITMRG   " $@ && echo "*** intltool support required to build target $@" && false'
72     AC_SUBST(INTLTOOL_POLICY_RULE)
73 ])
74
75 GETTEXT_PACKAGE=elogind
76 AC_SUBST(GETTEXT_PACKAGE)
77 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [elogind])
78
79 AC_PROG_MKDIR_P
80 AC_PROG_LN_S
81 AC_PROG_SED
82 AC_PROG_GREP
83 AC_PROG_AWK
84
85 AC_PROG_CC_C99
86
87 AC_PATH_PROG([M4], [m4])
88 AC_PATH_PROG([XSLTPROC], [xsltproc])
89
90 AC_PATH_PROG([KMOD], [kmod], [/usr/bin/kmod], [$PATH:/usr/sbin:/sbin])
91
92 AC_PATH_PROG([KEXEC], [kexec], [/usr/sbin/kexec], [$PATH:/usr/sbin:/sbin])
93
94 AC_PATH_PROG([SULOGIN], [sulogin], [/usr/sbin/sulogin], [$PATH:/usr/sbin:/sbin])
95
96 AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
97
98 M4_DEFINES=
99
100 # gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line
101 m4_ifdef([GTK_DOC_CHECK], [
102 GTK_DOC_CHECK([1.18],[--flavour no-tmpl])],
103          [AM_CONDITIONAL([ENABLE_GTK_DOC], [false])
104           enable_gtk_doc=no])
105
106 AS_IF([test "x$enable_gtk_doc" = "xyes" -a "x$XSLTPROC" = x], [
107         AC_MSG_ERROR([*** GTK doc requested but xsltproc not found])
108 ])
109
110 m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [
111 GOBJECT_INTROSPECTION_CHECK([1.31.1])
112 ], [
113    AM_CONDITIONAL([HAVE_INTROSPECTION], [false])
114    enable_introspection=no])
115
116 AC_CHECK_TOOL(STRINGS, strings)
117 AC_CHECK_TOOL(GPERF, gperf)
118 if test -z "$GPERF" ; then
119         AC_MSG_ERROR([*** gperf not found])
120 fi
121
122 # ------------------------------------------------------------------------------
123 address_sanitizer_cflags=
124 address_sanitizer_cppflags=
125 address_sanitizer_ldflags=
126 AC_ARG_ENABLE(address-sanitizer, AS_HELP_STRING([--enable-address-sanitizer], [enable -fsanitize=address]))
127 AS_IF([test "x$enable_address_sanitizer" = "xyes"], [
128             CC_CHECK_FLAG_APPEND([with_as_cflags], [CFLAGS], [-fsanitize=address])
129             AS_IF([test -z "$with_as_cflags"],
130                   [AC_MSG_ERROR([*** -fsanitize=address is not supported])])
131             address_sanitizer_cflags="$with_as_cflags -fno-omit-frame-pointer -DVALGRIND=1"
132             address_sanitizer_cppflags="-DVALGRIND=1"
133             address_sanitizer_ldflags="-Wc,-fsanitize=address"
134       ])
135
136 undefined_sanitizer_cflags=
137 undefined_sanitizer_cppflags=
138 undefined_sanitizer_ldflags=
139 AC_ARG_ENABLE(undefined-sanitizer, AS_HELP_STRING([--enable-undefined-sanitizer], [enable -fsanitize=undefined]))
140 AS_IF([test "x$enable_undefined_sanitizer" = "xyes"], [
141             CC_CHECK_FLAG_APPEND([with_us_cflags], [CFLAGS], [-fsanitize=undefined])
142             AS_IF([test -z "$with_us_cflags"],
143                   [AC_MSG_ERROR([*** -fsanitize=undefined is not supported])])
144             undefined_sanitizer_cflags="$with_us_cflags -fno-omit-frame-pointer -DVALGRIND=1"
145             undefined_sanitizer_cppflags="-DVALGRIND=1"
146             undefined_sanitizer_ldflags="-Wc,-fsanitize=undefined"
147       ])
148
149 sanitizer_cflags="$address_sanitizer_cflags $undefined_sanitizer_cflags"
150 sanitizer_cppflags="$address_sanitizer_cppflags $undefined_sanitizer_cppflags"
151 sanitizer_ldflags="$address_sanitizer_ldflags $undefined_sanitizer_ldflags"
152
153 CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
154         -pipe \
155         -Wall \
156         -Wextra \
157         -Wno-inline \
158         -Wundef \
159         "-Wformat=2 -Wformat-security -Wformat-nonliteral" \
160         -Wlogical-op \
161         -Wsign-compare \
162         -Wmissing-include-dirs \
163         -Wold-style-definition \
164         -Wpointer-arith \
165         -Winit-self \
166         -Wdeclaration-after-statement \
167         -Wfloat-equal \
168         -Wsuggest-attribute=noreturn \
169         -Wmissing-prototypes \
170         -Wstrict-prototypes \
171         -Wredundant-decls \
172         -Wmissing-declarations \
173         -Wmissing-noreturn \
174         -Wshadow \
175         -Wendif-labels \
176         -Wstrict-aliasing=2 \
177         -Wwrite-strings \
178         -Wno-long-long \
179         -Wno-overlength-strings \
180         -Wno-unused-parameter \
181         -Wno-missing-field-initializers \
182         -Wno-unused-result \
183         -Wno-format-signedness \
184         -Werror=overflow \
185         -Wdate-time \
186         -Wnested-externs \
187         -ffast-math \
188         -fno-common \
189         -fdiagnostics-show-option \
190         -fno-strict-aliasing \
191         -fvisibility=hidden \
192         -ffunction-sections \
193         -fdata-sections \
194         -fstack-protector \
195         -fstack-protector-strong \
196         -fPIE \
197         --param=ssp-buffer-size=4])
198
199 AS_CASE([$CC], [*clang*],
200         [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
201                -Wno-typedef-redefinition \
202                -Wno-gnu-variable-sized-type-not-at-end \
203         ])])
204
205 AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
206         [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
207                -flto -ffat-lto-objects])],
208         [AC_MSG_RESULT([skipping -flto, optimization not enabled])])
209 AC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags")
210
211 AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
212         [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
213                -Wp,-D_FORTIFY_SOURCE=2])],
214         [AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])])
215 AC_SUBST([OUR_CPPFLAGS], "$with_cppflags $sanitizer_cppflags")
216
217 CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
218         -Wl,--as-needed \
219         -Wl,--no-undefined \
220         -Wl,--gc-sections \
221         -Wl,-z,relro \
222         -Wl,-z,now \
223         -pie \
224         -Wl,-fuse-ld=gold])
225 AC_SUBST([OUR_LDFLAGS], "$with_ldflags $sanitizer_ldflags")
226
227 AC_CHECK_SIZEOF(pid_t)
228 AC_CHECK_SIZEOF(uid_t)
229 AC_CHECK_SIZEOF(gid_t)
230 AC_CHECK_SIZEOF(time_t)
231 AC_CHECK_SIZEOF(dev_t)
232 AC_CHECK_SIZEOF(rlim_t,,[
233        #include <sys/time.h>
234        #include <sys/resource.h>
235 ])
236
237 # ------------------------------------------------------------------------------
238
239 AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
240 AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
241 AC_CHECK_HEADERS([linux/btrfs.h], [], [])
242 AC_CHECK_HEADERS([linux/memfd.h], [], [])
243
244 # unconditionally pull-in librt with old glibc versions
245 AC_SEARCH_LIBS([clock_gettime], [rt], [], [])
246
247 save_LIBS="$LIBS"
248 LIBS=
249 AC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])])
250 CAP_LIBS="$LIBS"
251 AC_SUBST(CAP_LIBS)
252
253 LIBS=
254 AC_SEARCH_LIBS([mq_open], [rt], [], [AC_MSG_ERROR([*** POSIX RT library not found])])
255 RT_LIBS="$LIBS"
256 AC_SUBST(RT_LIBS)
257 LIBS="$save_LIBS"
258
259 AC_CHECK_FUNCS([memfd_create])
260 AC_CHECK_FUNCS([__secure_getenv secure_getenv])
261 AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, getrandom, renameat2, kcmp, LO_FLAGS_PARTSCAN],
262                [], [], [[
263 #include <sys/types.h>
264 #include <unistd.h>
265 #include <sys/mount.h>
266 #include <fcntl.h>
267 #include <sched.h>
268 #include <linux/loop.h>
269 #include <linux/random.h>
270 ]])
271
272 AC_CHECK_DECLS([IFLA_INET6_ADDR_GEN_MODE,
273                 IFLA_MACVLAN_FLAGS,
274                 IFLA_IPVLAN_MODE,
275                 IFLA_VTI_REMOTE,
276                 IFLA_PHYS_PORT_ID,
277                 IFLA_BOND_AD_INFO,
278                 IFLA_VLAN_PROTOCOL,
279                 IFLA_VXLAN_LOCAL6,
280                 IFLA_IPTUN_6RD_RELAY_PREFIXLEN,
281                 IFLA_BRIDGE_VLAN_INFO,
282                 IFLA_BRPORT_UNICAST_FLOOD,
283                 NDA_IFINDEX],
284 [], [], [[
285 #include <inttypes.h>
286 #include <netinet/in.h>
287 #include <netinet/ether.h>
288 #include <linux/rtnetlink.h>
289 #include <net/if.h>
290 #include <linux/ip.h>
291 #include <linux/if_tunnel.h>
292 #include <linux/if_link.h>
293 #include <linux/if_bridge.h>
294 #include <linux/neighbour.h>
295 ]])
296
297 # This makes sure pkg.m4 is available.
298 m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
299
300 # ------------------------------------------------------------------------------
301 have_dbus=no
302 AC_ARG_ENABLE(dbus, AS_HELP_STRING([--disable-dbus], [disable usage of dbus-1 in tests]))
303 AS_IF([test "x$enable_dbus" != "xno"], [
304         PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2],
305                 [AC_DEFINE(HAVE_DBUS, 1, [Define if dbus-1 library is available]) have_dbus=yes],
306                 [have_dbus=no])
307         AS_IF([test "x$have_dbus" = "xno" -a "x$enable_dbus" = "xyes"],
308                 [AC_MSG_ERROR([*** dbus-1 support requested but libraries not found])])])
309 AM_CONDITIONAL(HAVE_DBUS, [test "$have_dbus" = "yes"])
310
311 # ------------------------------------------------------------------------------
312 PKG_CHECK_MODULES(UDEV, [libudev])
313
314 # ------------------------------------------------------------------------------
315 have_compat_libs=no
316 AC_ARG_ENABLE([compat_libs], AS_HELP_STRING([--enable-compat-libs],[Enable creation of compatibility libraries]),
317                 [case "${enableval}" in
318                         yes) have_compat_libs=yes ;;
319                         no) have_compat_libs=no ;;
320                         *) AC_MSG_ERROR(bad value ${enableval} for --enable-compat-libs) ;;
321                 esac],
322                 [have_compat_libs=no])
323 AM_CONDITIONAL([ENABLE_COMPAT_LIBS], [test "$have_compat_libs" = "yes"])
324
325 # ------------------------------------------------------------------------------
326 have_coverage=no
327 AC_ARG_ENABLE(coverage, AS_HELP_STRING([--enable-coverage], [enable test coverage]))
328 if test "x$enable_coverage" = "xyes" ; then
329         AC_CHECK_PROG(lcov_found, [lcov], [yes], [no])
330         if test "x$lcov_found" = xno ; then
331                 AC_MSG_ERROR([*** lcov support requested but the program was not found])
332         else
333                 lcov_version_major="`lcov --version | cut -d ' ' -f 4 | cut -d '.' -f 1`"
334                 lcov_version_minor="`lcov --version | cut -d ' ' -f 4 | cut -d '.' -f 2`"
335                 if test "$lcov_version_major" -eq 1 -a "$lcov_version_minor" -lt 10; then
336                         AC_MSG_ERROR([*** lcov version is too old. 1.10 required])
337                 else
338                         have_coverage=yes
339                         CC_CHECK_FLAGS_APPEND([with_coverage_cflags], [CFLAGS], [\
340                         -fprofile-arcs \
341                         -ftest-coverage])
342                         AC_SUBST([OUR_CFLAGS], "$with_cflags $with_coverage_cflags")
343                 fi
344         fi
345 fi
346 AM_CONDITIONAL(ENABLE_COVERAGE, [test "$have_coverage" = "yes"])
347
348 # ------------------------------------------------------------------------------
349 have_kmod=no
350 AC_ARG_ENABLE(kmod, AS_HELP_STRING([--disable-kmod], [disable loadable modules support]))
351 if test "x$enable_kmod" != "xno"; then
352         PKG_CHECK_EXISTS([ libkmod ], have_kmod=yes, have_kmod=no)
353         if test "x$have_kmod" = "xyes"; then
354                 PKG_CHECK_MODULES(KMOD, [ libkmod >= 15 ],
355                         [AC_DEFINE(HAVE_KMOD, 1, [Define if kmod is available])],
356                         AC_MSG_ERROR([*** kmod version >= 15 not found]))
357         fi
358         if test "x$have_kmod" = xno -a "x$enable_kmod" = xyes; then
359                 AC_MSG_ERROR([*** kmod support requested, but libraries not found])
360         fi
361 fi
362 AM_CONDITIONAL(HAVE_KMOD, [test "$have_kmod" = "yes"])
363
364 # ------------------------------------------------------------------------------
365 have_xkbcommon=no
366 AC_ARG_ENABLE(xkbcommon, AS_HELP_STRING([--disable-xkbcommon], [disable xkbcommon keymap support]))
367 if test "x$enable_xkbcommon" != "xno"; then
368         PKG_CHECK_MODULES(XKBCOMMON, [ xkbcommon >= 0.3.0 ],
369                 [AC_DEFINE(HAVE_XKBCOMMON, 1, [Define if libxkbcommon is available]) have_xkbcommon=yes], have_xkbcommon=no)
370         if test "x$have_xkbcommon" = xno -a "x$enable_xkbcommon" = xyes; then
371                 AC_MSG_ERROR([*** xkbcommon support requested but libraries not found])
372         fi
373 fi
374 AM_CONDITIONAL(HAVE_XKBCOMMON, [test "$have_xkbcommon" = "yes"])
375
376 # ------------------------------------------------------------------------------
377 have_blkid=no
378 AC_ARG_ENABLE(blkid, AS_HELP_STRING([--disable-blkid], [disable blkid support]))
379 if test "x$enable_blkid" != "xno"; then
380         PKG_CHECK_MODULES(BLKID, [ blkid >= 2.24 ],
381                 [AC_DEFINE(HAVE_BLKID, 1, [Define if blkid is available]) have_blkid=yes], have_blkid=no)
382         if test "x$have_blkid" = xno -a "x$enable_blkid" = xyes; then
383                 AC_MSG_ERROR([*** blkid support requested but libraries not found])
384         fi
385 fi
386 AM_CONDITIONAL(HAVE_BLKID, [test "$have_blkid" = "yes"])
387
388 # ------------------------------------------------------------------------------
389 have_seccomp=no
390 AC_ARG_ENABLE(seccomp, AS_HELP_STRING([--disable-seccomp], [Disable optional SECCOMP support]))
391 if test "x$enable_seccomp" != "xno"; then
392         PKG_CHECK_MODULES(SECCOMP, [libseccomp >= 1.0.0],
393                [AC_DEFINE(HAVE_SECCOMP, 1, [Define if seccomp is available])
394                 have_seccomp=yes
395                 M4_DEFINES="$M4_DEFINES -DHAVE_SECCOMP"],
396                [have_seccomp=no])
397         if test "x$have_seccomp" = "xno" -a "x$enable_seccomp" = "xyes"; then
398                 AC_MSG_ERROR([*** seccomp support requested but libraries not found])
399         fi
400 fi
401 AM_CONDITIONAL(HAVE_SECCOMP, [test "$have_seccomp" = "yes"])
402
403 # ------------------------------------------------------------------------------
404 have_ima=yes
405 AC_ARG_ENABLE([ima], AS_HELP_STRING([--disable-ima],[Disable optional IMA support]),
406                 [case "${enableval}" in
407                         yes) have_ima=yes ;;
408                         no) have_ima=no ;;
409                         *) AC_MSG_ERROR(bad value ${enableval} for --disable-ima) ;;
410                 esac],
411                 [have_ima=yes])
412
413 if test "x${have_ima}" != xno ; then
414         AC_DEFINE(HAVE_IMA, 1, [Define if IMA is available])
415 fi
416
417 # ------------------------------------------------------------------------------
418 have_chkconfig=yes
419 AC_ARG_ENABLE([chkconfig], AS_HELP_STRING([--disable-chkconfig],[Disable optional chkconfig support]),
420                 [case "${enableval}" in
421                         yes) have_chkconfig=yes ;;
422                         no) have_chkconfig=no ;;
423                         *) AC_MSG_ERROR(bad value ${enableval} for --disable-chkconfig) ;;
424                 esac],
425                 [AC_PATH_PROG(CHKCONFIG, chkconfig)
426                 if test -z "$CHKCONFIG"; then
427                         have_chkconfig=no
428                 else
429                         have_chkconfig=yes
430                 fi])
431
432 if test "x${have_chkconfig}" != xno ; then
433         AC_DEFINE(HAVE_CHKCONFIG, 1, [Define if CHKCONFIG is available])
434 fi
435
436 # ------------------------------------------------------------------------------
437 have_selinux=no
438 AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
439 if test "x$enable_selinux" != "xno"; then
440         PKG_CHECK_MODULES([SELINUX], [libselinux >= 2.1.9],
441                 [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available])
442                  have_selinux=yes
443                  M4_DEFINES="$M4_DEFINES -DHAVE_SELINUX"],
444                 [have_selinux=no])
445         if test "x$have_selinux" = xno -a "x$enable_selinux" = xyes; then
446                 AC_MSG_ERROR([*** SELinux support requested but libraries not found])
447         fi
448 fi
449 AM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"])
450
451 have_apparmor=no
452 AC_ARG_ENABLE(apparmor, AS_HELP_STRING([--disable-apparmor], [Disable optional AppArmor support]))
453 if test "x$enable_apparmor" != "xno"; then
454         PKG_CHECK_MODULES([APPARMOR], [libapparmor],
455                 [AC_DEFINE(HAVE_APPARMOR, 1, [Define if AppArmor is available])
456                  have_apparmor=yes
457                  M4_DEFINES="$M4_DEFINES -DHAVE_APPARMOR"],
458                 [have_apparmor=no])
459         if test "x$have_apparmor" = xno -a "x$enable_apparmor" = xyes; then
460                 AC_MSG_ERROR([*** AppArmor support requested but libraries not found])
461         fi
462 fi
463 AM_CONDITIONAL(HAVE_APPARMOR, [test "$have_apparmor" = "yes"])
464
465
466 AC_ARG_WITH(debug-shell,
467         AS_HELP_STRING([--with-debug-shell=PATH],
468                 [Path to debug shell binary]),
469         [SUSHELL="$withval"],[
470         AS_IF([test "x${have_selinux}" != "xno"], [SUSHELL="/sbin/sushell"] , [SUSHELL="/bin/sh"])])
471
472 AC_SUBST(SUSHELL)
473
474 AC_ARG_WITH([debug-tty],
475         AS_HELP_STRING([--with-debug-tty=PATH],
476                 [Specify the tty device for debug shell]),
477         [DEBUGTTY="$withval"],
478         [DEBUGTTY=/dev/tty9])
479
480 AC_SUBST(DEBUGTTY)
481
482 AC_ARG_WITH([certificate-root],
483         AS_HELP_STRING([--with-certificate-root=PATH],
484                 [Specify the prefix for TLS certificates [/etc/ssl]]),
485         [CERTIFICATEROOT="$withval"],
486         [CERTIFICATEROOT="/etc/ssl"])
487
488 AC_SUBST(CERTIFICATEROOT)
489
490 # ------------------------------------------------------------------------------
491 have_xz=no
492 AC_ARG_ENABLE(xz, AS_HELP_STRING([--disable-xz], [Disable optional XZ support]))
493 if test "x$enable_xz" != "xno"; then
494         PKG_CHECK_MODULES(XZ, [ liblzma ],
495                 [AC_DEFINE(HAVE_XZ, 1, [Define if XZ is available]) have_xz=yes], have_xz=no)
496         if test "x$have_xz" = xno -a "x$enable_xz" = xyes; then
497                 AC_MSG_ERROR([*** XZ support requested but libraries not found])
498         fi
499 fi
500 AM_CONDITIONAL(HAVE_XZ, [test "$have_xz" = "yes"])
501
502 # ------------------------------------------------------------------------------
503 have_zlib=no
504 AC_ARG_ENABLE(zlib, AS_HELP_STRING([--disable-zlib], [Disable optional ZLIB support]))
505 if test "x$enable_zlib" != "xno"; then
506         PKG_CHECK_MODULES(ZLIB, [ zlib ],
507                 [AC_DEFINE(HAVE_ZLIB, 1, [Define if ZLIB is available]) have_zlib=yes], have_zlib=no)
508         if test "x$have_zlib" = xno -a "x$enable_zlib" = xyes; then
509                 AC_MSG_ERROR([*** ZLIB support requested but libraries not found])
510         fi
511 fi
512 AM_CONDITIONAL(HAVE_ZLIB, [test "$have_zlib" = "yes"])
513
514 # ------------------------------------------------------------------------------
515 have_bzip2=no
516 AC_ARG_ENABLE(bzip2, AS_HELP_STRING([--enable-bzip2], [Disable optional BZIP2 support]))
517 AS_IF([test "x$enable_bzip2" != "xno"], [
518         AC_CHECK_HEADERS(bzlib.h,
519                 [AC_DEFINE(HAVE_BZIP2, 1, [Define in BZIP2 is available])
520                  have_bzip2=yes],
521                 [AS_IF([test "x$have_bzip2" = xyes], [AC_MSG_ERROR([*** BZIP2 support requested but headers not found])])
522         ])
523 ])
524 AM_CONDITIONAL(HAVE_BZIP2, [test "$have_bzip2" = "yes"])
525
526 # ------------------------------------------------------------------------------
527 have_lz4=no
528 AC_ARG_ENABLE(lz4, AS_HELP_STRING([--enable-lz4], [Enable optional LZ4 support]))
529 AS_IF([test "x$enable_lz4" = "xyes"], [
530         AC_CHECK_HEADERS(lz4.h,
531                [AC_DEFINE(HAVE_LZ4, 1, [Define in LZ4 is available]) have_lz4=yes],
532                [AC_MSG_ERROR([*** LZ4 support requested but headers not found])])
533 ])
534 AM_CONDITIONAL(HAVE_LZ4, [test "$have_lz4" = "yes"])
535
536 AM_CONDITIONAL(HAVE_COMPRESSION, [test "$have_xz" = "yes" -o "$have_lz4" = "yes"])
537
538 # ------------------------------------------------------------------------------
539 AC_ARG_ENABLE([pam],
540         AS_HELP_STRING([--disable-pam],[Disable optional PAM support]),
541                 [case "${enableval}" in
542                         yes) have_pam=yes ;;
543                         no) have_pam=no ;;
544                         *) AC_MSG_ERROR(bad value ${enableval} for --disable-pam) ;;
545                 esac],
546                 [have_pam=auto])
547
548 if test "x${have_pam}" != xno ; then
549         AC_CHECK_HEADERS(
550                 [security/pam_modules.h security/pam_modutil.h security/pam_ext.h],
551                 [have_pam=yes],
552                 [if test "x$have_pam" = xyes ; then
553                         AC_MSG_ERROR([*** PAM headers not found.])
554                 fi])
555
556         AC_CHECK_LIB(
557                 [pam],
558                 [pam_syslog],
559                 [have_pam=yes],
560                 [if test "x$have_pam" = xyes ; then
561                         AC_MSG_ERROR([*** libpam not found.])
562                 fi])
563
564         if test "x$have_pam" = xyes ; then
565                 PAM_LIBS="-lpam -lpam_misc"
566                 AC_DEFINE(HAVE_PAM, 1, [PAM available])
567                 M4_DEFINES="$M4_DEFINES -DHAVE_PAM"
568         else
569                 have_pam=no
570         fi
571 else
572         PAM_LIBS=
573 fi
574 AC_SUBST(PAM_LIBS)
575 AM_CONDITIONAL([HAVE_PAM], [test "x$have_pam" != xno])
576
577 # ------------------------------------------------------------------------------
578 AC_ARG_ENABLE([acl],
579         AS_HELP_STRING([--disable-acl],[Disable optional ACL support]),
580                 [case "${enableval}" in
581                         yes) have_acl=yes ;;
582                         no) have_acl=no ;;
583                         *) AC_MSG_ERROR(bad value ${enableval} for --disable-acl) ;;
584                 esac],
585                 [have_acl=auto])
586
587 if test "x${have_acl}" != xno ; then
588         AC_CHECK_HEADERS(
589                 [sys/acl.h acl/libacl.h],
590                 [have_acl=yes],
591                 [if test "x$have_acl" = xyes ; then
592                         AC_MSG_ERROR([*** ACL headers not found.])
593                 fi])
594
595         AC_CHECK_LIB(
596                 [acl],
597                 [acl_get_file],
598                 [have_acl=yes],
599                 [if test "x$have_acl" = xyes ; then
600                         AC_MSG_ERROR([*** libacl not found.])
601                 fi])
602
603         if test "x$have_acl" = xyes ; then
604                 ACL_LIBS="-lacl"
605                 AC_DEFINE(HAVE_ACL, 1, [ACL available])
606                 M4_DEFINES="$M4_DEFINES -DHAVE_ACL"
607         else
608                 have_acl=no
609         fi
610 else
611         ACL_LIBS=
612 fi
613 AC_SUBST(ACL_LIBS)
614 AM_CONDITIONAL([HAVE_ACL], [test "x$have_acl" != xno])
615
616 # ------------------------------------------------------------------------------
617 AC_ARG_ENABLE([smack], AS_HELP_STRING([--disable-smack],[Disable optional SMACK support]),
618                 [case "${enableval}" in
619                         yes) have_smack=yes ;;
620                         no) have_smack=no ;;
621                         *) AC_MSG_ERROR(bad value ${enableval} for --disable-smack) ;;
622                 esac],
623                 [have_smack=auto])
624
625 if test "x${have_smack}" = xauto; then
626         M4_DEFINES="$M4_DEFINES -DHAVE_SMACK"
627         have_smack=yes
628 fi
629
630 AC_ARG_WITH(smack-run-label,
631 AS_HELP_STRING([--with-smack-run-label=STRING],
632         [run systemd --system with a specific SMACK label]),
633         [AC_DEFINE_UNQUOTED(SMACK_RUN_LABEL, ["$withval"], [Run with a smack label])],
634         [])
635
636 if test "x${have_smack}" = xyes ; then
637         AC_DEFINE(HAVE_SMACK, 1, [Define if SMACK is available])
638 fi
639
640 AM_CONDITIONAL([HAVE_SMACK], [test "x$have_smack" = "xyes"])
641
642 # ------------------------------------------------------------------------------
643 AC_ARG_ENABLE([gcrypt],
644         AS_HELP_STRING([--disable-gcrypt],[Disable optional GCRYPT support]),
645                 [case "${enableval}" in
646                         yes) have_gcrypt=yes ;;
647                         no) have_gcrypt=no ;;
648                         *) AC_MSG_ERROR(bad value ${enableval} for --disable-gcrypt) ;;
649                 esac],
650                 [have_gcrypt=auto])
651
652 if test "x${have_gcrypt}" != xno ; then
653         AM_PATH_LIBGCRYPT(
654                 [1.4.5],
655                 [have_gcrypt=yes],
656                 [if test "x$have_gcrypt" = xyes ; then
657                         AC_MSG_ERROR([*** GCRYPT headers not found.])
658                 fi])
659
660         if test "x$have_gcrypt" = xyes ; then
661                 GCRYPT_LIBS="$LIBGCRYPT_LIBS"
662                 GCRYPT_CFLAGS="$LIBGCRYPT_CFLAGS"
663                 AC_DEFINE(HAVE_GCRYPT, 1, [GCRYPT available])
664         else
665                 have_gcrypt=no
666         fi
667 else
668         GCRYPT_LIBS=
669         GCRYPT_CFLAGS=
670 fi
671 AC_SUBST(GCRYPT_LIBS)
672 AC_SUBST(GCRYPT_CFLAGS)
673 AM_CONDITIONAL([HAVE_GCRYPT], [test "x$have_gcrypt" != xno])
674
675 # ------------------------------------------------------------------------------
676 AC_ARG_ENABLE([audit],
677         AS_HELP_STRING([--disable-audit],[Disable optional AUDIT support]),
678                 [case "${enableval}" in
679                         yes) have_audit=yes ;;
680                         no) have_audit=no ;;
681                         *) AC_MSG_ERROR(bad value ${enableval} for --disable-audit) ;;
682                 esac],
683                 [have_audit=auto])
684
685 if test "x${have_audit}" != xno ; then
686         AC_CHECK_HEADERS(
687                 [libaudit.h],
688                 [have_audit=yes],
689                 [if test "x$have_audit" = xyes ; then
690                         AC_MSG_ERROR([*** AUDIT headers not found.])
691                 fi])
692
693         AC_CHECK_LIB(
694                 [audit],
695                 [audit_open],
696                 [have_audit=yes],
697                 [if test "x$have_audit" = xyes ; then
698                         AC_MSG_ERROR([*** libaudit not found.])
699                 fi])
700
701         if test "x$have_audit" = xyes ; then
702                 AUDIT_LIBS="-laudit"
703                 AC_DEFINE(HAVE_AUDIT, 1, [AUDIT available])
704         else
705                 have_audit=no
706         fi
707 else
708         AUDIT_LIBS=
709 fi
710 AC_SUBST(AUDIT_LIBS)
711
712 # ------------------------------------------------------------------------------
713 AC_ARG_ENABLE([elfutils],
714         AS_HELP_STRING([--disable-elfutils],[Disable optional ELFUTILS support]),
715                 [case "${enableval}" in
716                         yes) have_elfutils=yes ;;
717                         no) have_elfutils=no ;;
718                         *) AC_MSG_ERROR(bad value ${enableval} for --disable-elfutils) ;;
719                 esac],
720                 [have_elfutils=auto])
721
722 if test "x${have_elfutils}" != xno ; then
723         AC_CHECK_HEADERS(
724                 [elfutils/libdwfl.h],
725                 [],
726                 [if test "x$have_elfutils" = xyes ; then
727                         AC_MSG_ERROR([*** ELFUTILS headers not found.])
728                 fi])
729
730         AC_CHECK_LIB(
731                 [dw],
732                 [dwfl_begin],
733                 [],
734                 [if test "x$have_elfutils" = xyes ; then
735                         AC_MSG_ERROR([*** ELFUTILS libs not found.])
736                 fi])
737
738         AC_CHECK_LIB(
739                 [dw],
740                 [dwfl_core_file_attach],
741                 [have_elfutils=yes],
742                 [if test "x$have_elfutils" = xyes ; then
743                         AC_MSG_ERROR([*** ELFUTILS >= 158 is required.])
744                 fi])
745
746         if test "x$have_elfutils" = xyes ; then
747                 ELFUTILS_LIBS="-lelf -ldw"
748                 AC_DEFINE(HAVE_ELFUTILS, 1, [ELFUTILS available])
749         else
750                 have_elfutils=no
751         fi
752 else
753         ELFUTILS_LIBS=
754 fi
755 AC_SUBST(ELFUTILS_LIBS)
756 AM_CONDITIONAL(HAVE_ELFUTILS, [test "$have_elfutils" = "yes"])
757
758 # ------------------------------------------------------------------------------
759 have_libcryptsetup=no
760 AC_ARG_ENABLE(libcryptsetup, AS_HELP_STRING([--disable-libcryptsetup], [disable libcryptsetup tools]))
761 if test "x$enable_libcryptsetup" != "xno"; then
762         PKG_CHECK_MODULES(LIBCRYPTSETUP, [ libcryptsetup >= 1.6.0 ],
763                 [AC_DEFINE(HAVE_LIBCRYPTSETUP, 1, [Define if libcryptsetup is available]) have_libcryptsetup=yes], have_libcryptsetup=no)
764         if test "x$have_libcryptsetup" = xno -a "x$enable_libcryptsetup" = xyes; then
765                 AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found])
766         fi
767 fi
768 AM_CONDITIONAL(HAVE_LIBCRYPTSETUP, [test "$have_libcryptsetup" = "yes"])
769
770 # ------------------------------------------------------------------------------
771 have_qrencode=no
772 AC_ARG_ENABLE(qrencode, AS_HELP_STRING([--disable-qrencode], [disable qrencode support]))
773 if test "x$enable_qrencode" != "xno"; then
774         PKG_CHECK_MODULES(QRENCODE, [ libqrencode ],
775                 [AC_DEFINE(HAVE_QRENCODE, 1, [Define if qrencode is available]) have_qrencode=yes], have_qrencode=no)
776         if test "x$have_qrencode" = xno -a "x$enable_qrencode" = xyes; then
777                 AC_MSG_ERROR([*** qrencode support requested but libraries not found])
778         fi
779 fi
780 AM_CONDITIONAL(HAVE_QRENCODE, [test "$have_qrencode" = "yes"])
781
782 # ------------------------------------------------------------------------------
783 have_microhttpd=no
784 AC_ARG_ENABLE(microhttpd, AS_HELP_STRING([--disable-microhttpd], [disable microhttpd support]))
785 if test "x$enable_microhttpd" != "xno"; then
786         PKG_CHECK_MODULES(MICROHTTPD, [libmicrohttpd >= 0.9.33],
787                 [AC_DEFINE(HAVE_MICROHTTPD, 1, [Define if microhttpd is available]) have_microhttpd=yes], have_microhttpd=no)
788         if test "x$have_microhttpd" = xno -a "x$enable_microhttpd" = xyes; then
789                 AC_MSG_ERROR([*** microhttpd support requested but libraries not found])
790         fi
791 fi
792 AM_CONDITIONAL(HAVE_MICROHTTPD, [test "$have_microhttpd" = "yes"])
793
794 # ------------------------------------------------------------------------------
795 have_gnutls=no
796 AC_ARG_ENABLE(gnutls, AS_HELP_STRING([--disable-gnutls], [disable gnutls support]))
797 if test "x$enable_gnutls" != "xno"; then
798         PKG_CHECK_MODULES(GNUTLS, [gnutls >= 3.1.4],
799                 [AC_DEFINE(HAVE_GNUTLS, 1, [Define if gnutls is available]) have_gnutls=yes], have_gnutls=no)
800         if test "x$have_gnutls" = xno -a "x$enable_gnutls" = xyes; then
801                 AC_MSG_ERROR([*** gnutls support requested but libraries not found])
802         fi
803 fi
804 AM_CONDITIONAL(HAVE_GNUTLS, [test "$have_gnutls" = "yes"])
805
806 # ------------------------------------------------------------------------------
807 have_libcurl=no
808 AC_ARG_ENABLE(libcurl, AS_HELP_STRING([--disable-libcurl], [disable libcurl support]))
809 if test "x$enable_libcurl" != "xno"; then
810         PKG_CHECK_MODULES(LIBCURL, [libcurl],
811                 [AC_DEFINE(HAVE_LIBCURL, 1, [Define if libcurl is available]) have_libcurl=yes], have_libcurl=no)
812         if test "x$have_libcurl" = xno -a "x$enable_libcurl" = xyes; then
813                 AC_MSG_ERROR([*** libcurl support requested but libraries not found])
814         fi
815 fi
816 AM_CONDITIONAL(HAVE_LIBCURL, [test "$have_libcurl" = "yes"])
817
818 # ------------------------------------------------------------------------------
819 have_libidn=no
820 AC_ARG_ENABLE(libidn, AS_HELP_STRING([--disable-libidn], [Disable optional LIBIDN support]))
821 if test "x$enable_libidn" != "xno"; then
822         PKG_CHECK_MODULES(LIBIDN, [libidn],
823                [AC_DEFINE(HAVE_LIBIDN, 1, [Define if libidn is available])
824                 have_libidn=yes
825                 M4_DEFINES="$M4_DEFINES -DHAVE_LIBIDN"],
826                [have_libidn=no])
827         if test "x$have_libidn" = "xno" -a "x$enable_libidn" = "xyes"; then
828                 AC_MSG_ERROR([*** libidn support requested but libraries not found])
829         fi
830 fi
831 AM_CONDITIONAL(HAVE_LIBIDN, [test "$have_libidn" = "yes"])
832
833 # ------------------------------------------------------------------------------
834 have_binfmt=no
835 AC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool]))
836 if test "x$enable_binfmt" != "xno"; then
837         have_binfmt=yes
838 fi
839 AM_CONDITIONAL(ENABLE_BINFMT, [test "$have_binfmt" = "yes"])
840
841 # ------------------------------------------------------------------------------
842 have_vconsole=no
843 AC_ARG_ENABLE(vconsole, AS_HELP_STRING([--disable-vconsole], [disable vconsole tool]))
844 if test "x$enable_vconsole" != "xno"; then
845         have_vconsole=yes
846 fi
847 AM_CONDITIONAL(ENABLE_VCONSOLE, [test "$have_vconsole" = "yes"])
848
849 # ------------------------------------------------------------------------------
850 have_bootchart=no
851 AC_ARG_ENABLE(bootchart, AS_HELP_STRING([--disable-bootchart], [disable bootchart tool]))
852 if test "x$enable_bootchart" != "xno"; then
853         have_bootchart=yes
854 fi
855 AM_CONDITIONAL(ENABLE_BOOTCHART, [test "$have_bootchart" = "yes"])
856
857 # ------------------------------------------------------------------------------
858 have_tmpfiles=no
859 AC_ARG_ENABLE(tmpfiles, AS_HELP_STRING([--disable-tmpfiles], [disable tmpfiles support]))
860 if test "x$enable_tmpfiles" != "xno"; then
861         have_tmpfiles=yes
862 fi
863 AM_CONDITIONAL(ENABLE_TMPFILES, [test "$have_tmpfiles" = "yes"])
864
865 # ------------------------------------------------------------------------------
866 have_sysusers=no
867 AC_ARG_ENABLE(sysusers, AS_HELP_STRING([--disable-sysusers], [disable sysusers support]))
868 if test "x$enable_sysusers" != "xno"; then
869         have_sysusers=yes
870 fi
871 AM_CONDITIONAL(ENABLE_SYSUSERS, [test "$have_sysusers" = "yes"])
872
873 # ------------------------------------------------------------------------------
874 have_firstboot=no
875 AC_ARG_ENABLE(firstboot, AS_HELP_STRING([--disable-firstboot], [disable firstboot support]))
876 if test "x$enable_firstboot" != "xno"; then
877         have_firstboot=yes
878 fi
879 AM_CONDITIONAL(ENABLE_FIRSTBOOT, [test "$have_firstboot" = "yes"])
880
881 # ------------------------------------------------------------------------------
882 have_randomseed=no
883 AC_ARG_ENABLE(randomseed, AS_HELP_STRING([--disable-randomseed], [disable randomseed tools]))
884 if test "x$enable_randomseed" != "xno"; then
885         have_randomseed=yes
886 fi
887 AM_CONDITIONAL(ENABLE_RANDOMSEED, [test "$have_randomseed" = "yes"])
888
889 # ------------------------------------------------------------------------------
890 have_backlight=no
891 AC_ARG_ENABLE(backlight, AS_HELP_STRING([--disable-backlight], [disable backlight tools]))
892 if test "x$enable_backlight" != "xno"; then
893         have_backlight=yes
894 fi
895 AM_CONDITIONAL(ENABLE_BACKLIGHT, [test "$have_backlight" = "yes"])
896
897 # ------------------------------------------------------------------------------
898 have_rfkill=no
899 AC_ARG_ENABLE(rfkill, AS_HELP_STRING([--disable-rfkill], [disable rfkill tools]))
900 if test "x$enable_rfkill" != "xno"; then
901         have_rfkill=yes
902 fi
903 AM_CONDITIONAL(ENABLE_RFKILL, [test "$have_rfkill" = "yes"])
904
905 # ------------------------------------------------------------------------------
906 have_logind=no
907 AC_ARG_ENABLE(logind, AS_HELP_STRING([--disable-logind], [disable login daemon]))
908 if test "x$enable_logind" != "xno"; then
909         have_logind=yes
910 fi
911 AM_CONDITIONAL(ENABLE_LOGIND, [test "$have_logind" = "yes"])
912 AS_IF([test "$have_logind" = "yes"], [ AC_DEFINE(HAVE_LOGIND, [1], [Logind support available]) ])
913
914 # ------------------------------------------------------------------------------
915 have_machined=no
916 AC_ARG_ENABLE(machined, AS_HELP_STRING([--disable-machined], [disable machine daemon]))
917 if test "x$enable_machined" != "xno"; then
918         have_machined=yes
919 fi
920 AM_CONDITIONAL(ENABLE_MACHINED, [test "$have_machined" = "yes"])
921 AS_IF([test "$have_machined" = "yes"], [ AC_DEFINE(HAVE_MACHINED, [1], [Machined support available]) ])
922
923 # ------------------------------------------------------------------------------
924 have_importd=no
925 AC_ARG_ENABLE(importd, AS_HELP_STRING([--disable-importd], [disable import daemon]))
926 if test "x$enable_importd" != "xno"; then
927         have_importd=yes
928 fi
929 AM_CONDITIONAL(ENABLE_IMPORTD, [test "$have_importd" = "yes"])
930 AS_IF([test "$have_importd" = "yes"], [ AC_DEFINE(HAVE_IMPORTD, [1], [Importd support available]) ])
931
932 # ------------------------------------------------------------------------------
933 have_hostnamed=no
934 AC_ARG_ENABLE(hostnamed, AS_HELP_STRING([--disable-hostnamed], [disable hostname daemon]))
935 if test "x$enable_hostnamed" != "xno"; then
936         have_hostnamed=yes
937 fi
938 AM_CONDITIONAL(ENABLE_HOSTNAMED, [test "$have_hostnamed" = "yes"])
939
940 # ------------------------------------------------------------------------------
941 have_timedated=no
942 AC_ARG_ENABLE(timedated, AS_HELP_STRING([--disable-timedated], [disable timedate daemon]))
943 if test "x$enable_timedated" != "xno"; then
944         have_timedated=yes
945 fi
946 AM_CONDITIONAL(ENABLE_TIMEDATED, [test "$have_timedated" = "yes"])
947
948 # ------------------------------------------------------------------------------
949 have_timesyncd=no
950 AC_ARG_ENABLE(timesyncd, AS_HELP_STRING([--disable-timesyncd], [disable timesync daemon]))
951 if test "x$enable_timesyncd" != "xno"; then
952         have_timesyncd=yes
953         M4_DEFINES="$M4_DEFINES -DENABLE_TIMESYNCD"
954 fi
955 AM_CONDITIONAL(ENABLE_TIMESYNCD, [test "$have_timesyncd" = "yes"])
956
957 AC_ARG_WITH(ntp-servers,
958         AS_HELP_STRING([--with-ntp-servers=NTPSERVERS],
959                 [Space-separated list of default NTP servers]),
960         [NTP_SERVERS="$withval"],
961         [NTP_SERVERS="time1.google.com time2.google.com time3.google.com time4.google.com"])
962
963 AC_DEFINE_UNQUOTED(NTP_SERVERS, ["$NTP_SERVERS"], [Default NTP Servers])
964 AC_SUBST(NTP_SERVERS)
965
966 AC_ARG_WITH(time-epoch,
967         AS_HELP_STRING([--with-time-epoch=SECONDS],
968                 [Time epoch for time clients]),
969         [TIME_EPOCH="$withval"],
970         [TIME_EPOCH="`stat -c %Y ${srcdir}/NEWS 2>/dev/null || echo 0`"])
971
972 AC_DEFINE_UNQUOTED(TIME_EPOCH, [$TIME_EPOCH], [Time Epoch])
973
974 # ------------------------------------------------------------------------------
975 AC_ARG_WITH(system-uid-max,
976         AS_HELP_STRING([--with-system-uid-max=UID]
977                 [Maximum UID for system users]),
978         [SYSTEM_UID_MAX="$withval"],
979         [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`"])
980
981 AC_DEFINE_UNQUOTED(SYSTEM_UID_MAX, [$SYSTEM_UID_MAX], [Maximum System UID])
982 AC_SUBST(SYSTEM_UID_MAX)
983
984 # ------------------------------------------------------------------------------
985 AC_ARG_WITH(system-gid-max,
986         AS_HELP_STRING([--with-system-gid-max=GID]
987                 [Maximum GID for system groups]),
988         [SYSTEM_GID_MAX="$withval"],
989         [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`"])
990
991 AC_DEFINE_UNQUOTED(SYSTEM_GID_MAX, [$SYSTEM_GID_MAX], [Maximum System GID])
992 AC_SUBST(SYSTEM_GID_MAX)
993
994 # ------------------------------------------------------------------------------
995 have_localed=no
996 AC_ARG_ENABLE(localed, AS_HELP_STRING([--disable-localed], [disable locale daemon]))
997 if test "x$enable_localed" != "xno"; then
998         have_localed=yes
999 fi
1000 AM_CONDITIONAL(ENABLE_LOCALED, [test "$have_localed" = "yes"])
1001
1002 # ------------------------------------------------------------------------------
1003 have_coredump=no
1004 AC_ARG_ENABLE(coredump, AS_HELP_STRING([--disable-coredump], [disable coredump hook]))
1005 if test "x$enable_coredump" != "xno"; then
1006         have_coredump=yes
1007 fi
1008 AM_CONDITIONAL(ENABLE_COREDUMP, [test "$have_coredump" = "yes"])
1009
1010 # ------------------------------------------------------------------------------
1011 have_polkit=no
1012 AC_ARG_ENABLE(polkit, AS_HELP_STRING([--disable-polkit], [disable PolicyKit support]))
1013 if test "x$enable_polkit" != "xno"; then
1014         AC_DEFINE(ENABLE_POLKIT, 1, [Define if PolicyKit support is to be enabled])
1015         have_polkit=yes
1016 fi
1017 AM_CONDITIONAL(ENABLE_POLKIT, [test "x$have_polkit" = "xyes"])
1018
1019 # ------------------------------------------------------------------------------
1020 have_resolved=no
1021 AC_ARG_ENABLE(resolved, AS_HELP_STRING([--disable-resolved], [disable resolve daemon]))
1022 if test "x$enable_resolved" != "xno"; then
1023         have_resolved=yes
1024         M4_DEFINES="$M4_DEFINES -DENABLE_RESOLVED"
1025 fi
1026 AM_CONDITIONAL(ENABLE_RESOLVED, [test "$have_resolved" = "yes"])
1027
1028 AC_ARG_WITH(dns-servers,
1029         AS_HELP_STRING([--with-dns-servers=DNSSERVERS],
1030                 [Space-separated list of default DNS servers]),
1031         [DNS_SERVERS="$withval"],
1032         [DNS_SERVERS="8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844"])
1033
1034 AC_DEFINE_UNQUOTED(DNS_SERVERS, ["$DNS_SERVERS"], [Default DNS Servers])
1035 AC_SUBST(DNS_SERVERS)
1036
1037 # ------------------------------------------------------------------------------
1038 have_networkd=no
1039 AC_ARG_ENABLE(networkd, AS_HELP_STRING([--disable-networkd], [disable networkd]))
1040 AS_IF([test "x$enable_networkd" != "xno"], [
1041         AC_DEFINE(ENABLE_NETWORKD, 1, [Define if networkd support is to be enabled])
1042         have_networkd=yes
1043         M4_DEFINES="$M4_DEFINES -DENABLE_NETWORKD"
1044 ])
1045 AM_CONDITIONAL(ENABLE_NETWORKD, [test "x$have_networkd" = "xyes"])
1046
1047 # ------------------------------------------------------------------------------
1048 have_efi=no
1049 AC_ARG_ENABLE(efi, AS_HELP_STRING([--disable-efi], [disable EFI support]))
1050 if test "x$enable_efi" != "xno"; then
1051         AC_DEFINE(ENABLE_EFI, 1, [Define if EFI support is to be enabled])
1052         have_efi=yes
1053 fi
1054 AM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"])
1055
1056 # ------------------------------------------------------------------------------
1057 EFI_CC=gcc
1058 AC_SUBST([EFI_CC])
1059
1060 EFI_ARCH=`echo $host | sed "s/\(-\).*$//"`
1061
1062 AM_COND_IF(ARCH_IA32, [
1063         EFI_ARCH=ia32
1064         EFI_MACHINE_TYPE_NAME=ia32])
1065
1066 AM_COND_IF(ARCH_X86_64, [
1067         EFI_MACHINE_TYPE_NAME=x64])
1068
1069 AC_SUBST([EFI_ARCH])
1070 AC_SUBST([EFI_MACHINE_TYPE_NAME])
1071
1072 have_gnuefi=no
1073 AC_ARG_ENABLE(gnuefi, AS_HELP_STRING([--enable-gnuefi], [Disable optional gnuefi support]))
1074 AS_IF([test "x$enable_gnuefi" != "xno"], [
1075         AC_CHECK_HEADERS(efi/${EFI_ARCH}/efibind.h,
1076                 [AC_DEFINE(HAVE_GNUEFI, 1, [Define if gnuefi is available])
1077                  have_gnuefi=yes],
1078                 [AS_IF([test "x$enable_gnuefi" = xyes],
1079                        [AC_MSG_ERROR([*** gnuefi support requested but headers not found])])
1080         ])
1081
1082         efiroot=$(echo $(cd /usr/lib/$(gcc -print-multi-os-directory); pwd))
1083
1084         EFI_LIB_DIR="$efiroot"
1085         AC_ARG_WITH(efi-libdir,
1086                 AS_HELP_STRING([--with-efi-libdir=PATH], [Path to EFI lib directory]),
1087                 [EFI_LIB_DIR="$withval"], [EFI_LIB_DIR="$efiroot"]
1088         )
1089         AC_SUBST([EFI_LIB_DIR])
1090
1091         have_efi_lds=no
1092         AC_ARG_WITH(efi-ldsdir,
1093                 AS_HELP_STRING([--with-efi-ldsdir=PATH], [Path to EFI lds directory]),
1094                 [EFI_LDS_DIR="$withval" && AC_CHECK_FILE([${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds],
1095                         [have_efi_lds=yes])],
1096                 [AS_FOR([DIR], [EFI_LDS_DIR], ["${efiroot}/gnuefi" "${efiroot}"],
1097                         [AC_CHECK_FILE([${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds],
1098                                        [have_efi_lds=yes && break])])])
1099         AS_IF([test "x$have_efi_lds" = xyes],
1100               [AC_SUBST([EFI_LDS_DIR])],
1101               [AS_IF([test "x$enable_gnuefi" = xyes],
1102                      [AC_MSG_ERROR([*** gnuefi support requested but files not found])],
1103                      [have_gnuefi=no])])
1104
1105         AC_ARG_WITH(efi-includedir,
1106                 AS_HELP_STRING([--with-efi-includedir=PATH], [Path to EFI include directory]),
1107                 [EFI_INC_DIR="$withval"], [EFI_INC_DIR="/usr/include"]
1108         )
1109         AC_SUBST([EFI_INC_DIR])
1110 ])
1111 AM_CONDITIONAL(HAVE_GNUEFI, [test "x$have_gnuefi" = xyes])
1112
1113 # ------------------------------------------------------------------------------
1114 AC_ARG_WITH(unifont,
1115         AS_HELP_STRING([--with-unifont=PATH],
1116                 [Path to unifont.hex]),
1117         [UNIFONT="$withval"],
1118         [UNIFONT="/usr/share/unifont/unifont.hex"])
1119 AC_SUBST(UNIFONT)
1120
1121 have_terminal=no
1122 have_unifont=no
1123 AC_ARG_ENABLE(terminal, AS_HELP_STRING([--enable-terminal], [enable terminal support]))
1124 if test "x$enable_terminal" = "xyes"; then
1125         PKG_CHECK_MODULES([TERMINAL], [ libevdev >= 1.2 xkbcommon >= 0.5 libdrm >= 2.4], [have_terminal=yes])
1126         AC_CHECK_FILE($UNIFONT, [have_unifont=yes])
1127         AS_IF([test "x$have_terminal" != xyes -o "x$have_unifont" != "xyes" -a "x$enable_terminal" = xyes],
1128               [AC_MSG_ERROR([*** terminal support requested but required dependencies not available])],
1129               [test "x$have_terminal" = xyes -a "x$have_unifont" = "xyes"],
1130               [AC_DEFINE(ENABLE_TERMINAL, 1, [Define if terminal support is to be enabled])])
1131 fi
1132 AM_CONDITIONAL(ENABLE_TERMINAL, [test "x$have_terminal" = "xyes" -a "x$have_unifont" = "xyes"])
1133
1134 # ------------------------------------------------------------------------------
1135 have_kdbus=no
1136 AC_ARG_ENABLE(kdbus, AS_HELP_STRING([--enable-kdbus], [do connect to kdbus by default]))
1137 if test "x$enable_kdbus" = "xyes"; then
1138         AC_DEFINE(ENABLE_KDBUS, 1, [Define if kdbus support is to be enabled])
1139         have_kdbus=yes
1140         M4_DEFINES="$M4_DEFINES -DENABLE_KDBUS"
1141 fi
1142 AM_CONDITIONAL(ENABLE_KDBUS, [test "$have_kdbus" = "yes"])
1143
1144 # ------------------------------------------------------------------------------
1145 AC_ARG_WITH(rc-local-script-path-start,
1146         AS_HELP_STRING([--with-rc-local-script-path-start=PATH],
1147                 [Path to /etc/rc.local]),
1148         [RC_LOCAL_SCRIPT_PATH_START="$withval"],
1149         [RC_LOCAL_SCRIPT_PATH_START="/etc/rc.local"])
1150
1151 AC_ARG_WITH(rc-local-script-path-stop,
1152         AS_HELP_STRING([--with-rc-local-script-path-stop=PATH],
1153                 [Path to /usr/sbin/halt.local]),
1154         [RC_LOCAL_SCRIPT_PATH_STOP="$withval"],
1155         [RC_LOCAL_SCRIPT_PATH_STOP="/usr/sbin/halt.local"])
1156
1157 AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_START, ["$RC_LOCAL_SCRIPT_PATH_START"], [Path of /etc/rc.local script])
1158 AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_STOP, ["$RC_LOCAL_SCRIPT_PATH_STOP"], [Path of /usr/sbin/halt.local script])
1159
1160 AC_SUBST(RC_LOCAL_SCRIPT_PATH_START)
1161 AC_SUBST(RC_LOCAL_SCRIPT_PATH_STOP)
1162
1163 # ------------------------------------------------------------------------------
1164 AC_ARG_WITH(kbd-loadkeys,
1165         AS_HELP_STRING([--with-kbd-loadkeys=PATH],
1166                 [Path to loadkeys]),
1167         [KBD_LOADKEYS="$withval"],
1168         [KBD_LOADKEYS="/usr/bin/loadkeys"])
1169
1170 AC_ARG_WITH(kbd-setfont,
1171         AS_HELP_STRING([--with-kbd-setfont=PATH],
1172                 [Path to setfont]),
1173         [KBD_SETFONT="$withval"],
1174         [KBD_SETFONT="/usr/bin/setfont"])
1175
1176 AC_DEFINE_UNQUOTED(KBD_LOADKEYS, ["$KBD_LOADKEYS"], [Path of loadkeys])
1177 AC_DEFINE_UNQUOTED(KBD_SETFONT, ["$KBD_SETFONT"], [Path of setfont])
1178
1179 AC_SUBST(KBD_LOADKEYS)
1180 AC_SUBST(KBD_SETFONT)
1181
1182 AC_ARG_WITH(telinit,
1183         AS_HELP_STRING([--with-telinit=PATH],
1184                 [Path to telinit]),
1185         [TELINIT="$withval"],
1186         [TELINIT="/lib/sysvinit/telinit"])
1187
1188 AC_DEFINE_UNQUOTED(TELINIT, ["$TELINIT"], [Path to telinit])
1189
1190 AC_SUBST(TELINIT)
1191
1192 AC_CHECK_HEADERS_ONCE([valgrind/memcheck.h valgrind/valgrind.h])
1193
1194 # ------------------------------------------------------------------------------
1195 have_myhostname=no
1196 AC_ARG_ENABLE(myhostname, AS_HELP_STRING([--disable-myhostname], [disable nss-myhostname support]))
1197 if test "x$enable_myhostname" != "xno"; then
1198         AC_HEADER_STDC
1199         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])
1200
1201         AC_C_CONST
1202         AC_TYPE_SIZE_T
1203         AC_HEADER_TIME
1204
1205         AC_FUNC_MALLOC
1206         AC_FUNC_SELECT_ARGTYPES
1207         AC_CHECK_FUNCS([gethostbyaddr gethostbyname gettimeofday inet_ntoa memset select socket strcspn strdup strerror strncasecmp strcasecmp strspn])
1208
1209         have_myhostname=yes
1210 fi
1211 AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"])
1212
1213 # ------------------------------------------------------------------------------
1214 AC_ARG_ENABLE([gudev],
1215        AS_HELP_STRING([--disable-gudev], [disable Gobject libudev support @<:@default=enabled@:>@]),
1216        [], [enable_gudev=yes])
1217 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]) ])
1218 AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"])
1219 AS_IF([test "x$enable_gudev" = "xyes"], [ AC_DEFINE(HAVE_GLIB, 1, [Define if glib is available]) ])
1220
1221 # ------------------------------------------------------------------------------
1222 AC_ARG_ENABLE(hwdb, [AC_HELP_STRING([--disable-hwdb], [disable hardware database support])],
1223        enable_hwdb=$enableval, enable_hwdb=yes)
1224 AM_CONDITIONAL(ENABLE_HWDB, [test x$enable_hwdb = xyes])
1225
1226 # ------------------------------------------------------------------------------
1227 have_manpages=no
1228 AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages]))
1229 AS_IF([test "x$enable_manpages" != xno], [have_manpages=yes])
1230 AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
1231
1232 # ------------------------------------------------------------------------------
1233 AC_ARG_ENABLE(hibernate,
1234        [AC_HELP_STRING([--disable-hibernate], [disable hibernation support])],
1235        enable_hibernate=$enableval, enable_hibernate=yes)
1236 AM_CONDITIONAL(ENABLE_HIBERNATE, [test x$enable_hibernate = xyes])
1237
1238 # ------------------------------------------------------------------------------
1239 AC_ARG_ENABLE(ldconfig,
1240        [AC_HELP_STRING([--disable-ldconfig], [disable ldconfig])],
1241        enable_ldconfig=$enableval, enable_ldconfig=yes)
1242 AM_CONDITIONAL(ENABLE_LDCONFIG, [test x$enable_ldconfig = xyes])
1243
1244 AC_SUBST(M4_DEFINES)
1245
1246 AC_ARG_WITH([tty-gid],
1247         [AS_HELP_STRING([--with-tty-gid=GID],
1248                 [Specify the numeric GID of the 'tty' group])],
1249         [TTY_GID="$withval"],
1250         [TTY_GID="5"])
1251
1252 AC_DEFINE_UNQUOTED(TTY_GID, [$TTY_GID], [GID of the 'tty' group])
1253 AC_SUBST(TTY_GID)
1254
1255 AC_ARG_WITH([dbuspolicydir],
1256         AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
1257         [],
1258         [with_dbuspolicydir=${sysconfdir}/dbus-1/system.d])
1259
1260 AC_ARG_WITH([dbussessionservicedir],
1261         AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]),
1262         [],
1263         [with_dbussessionservicedir=${datadir}/dbus-1/services])
1264
1265 AC_ARG_WITH([dbussystemservicedir],
1266         AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]),
1267         [],
1268         [with_dbussystemservicedir=${datadir}/dbus-1/system-services])
1269
1270 AC_ARG_WITH([bashcompletiondir],
1271         AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]),
1272         [],
1273         [AS_IF([$($PKG_CONFIG --exists bash-completion)], [
1274                 with_bashcompletiondir=$($PKG_CONFIG --variable=completionsdir bash-completion)
1275         ] , [
1276                 with_bashcompletiondir=${datadir}/bash-completion/completions
1277         ])])
1278
1279 AC_ARG_WITH([zshcompletiondir],
1280         AS_HELP_STRING([--with-zshcompletiondir=DIR], [Zsh completions directory]),
1281         [], [with_zshcompletiondir=${datadir}/zsh/site-functions])
1282
1283 AC_ARG_WITH([rootprefix],
1284         AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
1285         [], [with_rootprefix=${ac_default_prefix}])
1286
1287 AC_ARG_WITH([rootlibdir],
1288         AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]),
1289         [],
1290         [with_rootlibdir=${libdir}])
1291
1292 AC_ARG_WITH([pamlibdir],
1293         AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
1294         [],
1295         [with_pamlibdir=${with_rootlibdir}/security])
1296
1297 AC_ARG_WITH([pamconfdir],
1298         AS_HELP_STRING([--with-pamconfdir=DIR], [Directory for PAM configuration]),
1299         [],
1300         [with_pamconfdir=${sysconfdir}/pam.d])
1301
1302 AC_ARG_ENABLE([split-usr],
1303         AS_HELP_STRING([--enable-split-usr], [Assume that /bin, /sbin aren\'t symlinks into /usr]),
1304         [],
1305         [AS_IF([test "x${ac_default_prefix}" != "x${with_rootprefix}"], [
1306                 enable_split_usr=yes
1307         ], [
1308                 enable_split_usr=no
1309         ])])
1310
1311 AC_ARG_WITH([dkr-index-url],
1312         [AS_HELP_STRING([--dkr-index-url=URL], [Specify the default index URL to use for image downloads])],
1313         [DEFAULT_DKR_INDEX_URL="\"$withval\""],
1314         [DEFAULT_DKR_INDEX_URL="NULL"])
1315
1316 AC_DEFINE_UNQUOTED(DEFAULT_DKR_INDEX_URL, [$DEFAULT_DKR_INDEX_URL], [Default index URL to use for image downloads])
1317 AC_SUBST(DEFAULT_DKR_INDEX_URL)
1318
1319 AS_IF([test "x${enable_split_usr}" = "xyes"], [
1320         AC_DEFINE(HAVE_SPLIT_USR, 1, [Define if /bin, /sbin aren't symlinks into /usr])
1321 ])
1322
1323 # Work around intltoolize and gtk-doc problems in VPATH builds
1324 AM_CONDITIONAL([ENABLE_GTK_DOC_TESTS], [test "x$0" = "x./configure"],
1325                                        [Define to do gtk-doc tests])
1326 AS_IF([test "x$0" != "x./configure"], [
1327         AC_SUBST([INTLTOOL_UPDATE], [/bin/true])
1328 ])
1329
1330 # QEMU and OVMF UEFI firmware
1331 AS_IF([test x"$cross_compiling" = "xyes"], [], [
1332         AC_PATH_PROG([QEMU], [qemu-system-x86_64])
1333         AC_CHECK_FILE([/usr/share/qemu/bios-ovmf.bin], [QEMU_BIOS=/usr/share/qemu/bios-ovmf.bin],
1334                 [AC_CHECK_FILE([/usr/share/qemu-ovmf/bios.bin], [QEMU_BIOS=/usr/share/qemu-ovmf/bios.bin])])
1335         AC_SUBST([QEMU_BIOS])
1336 ])
1337
1338 AC_ARG_ENABLE(tests,
1339         [AC_HELP_STRING([--disable-tests], [disable tests])],
1340         enable_tests=$enableval, enable_tests=yes)
1341 AM_CONDITIONAL(ENABLE_TESTS, [test x$enable_tests = xyes])
1342
1343 AC_ARG_ENABLE(debug,
1344         [AC_HELP_STRING([--enable-debug@<:@=LIST@:>@], [enable extra debugging (hashmap,mmap-cache)])],
1345         [if test "x$enableval" = "xyes"; then
1346                 enableval="hashmap,mmap-cache"
1347         fi
1348         saved_ifs="$IFS"
1349         IFS="$IFS$PATH_SEPARATOR,"
1350         for name in $enableval; do
1351                 case $name in
1352                 hashmap)
1353                         enable_debug_hashmap=yes
1354                         ;;
1355                 mmap-cache)
1356                         enable_debug_mmap_cache=yes
1357                         ;;
1358                 esac
1359         done
1360         IFS="$saved_ifs"],[])
1361
1362 enable_debug=""
1363 AS_IF([test x$enable_debug_hashmap = xyes], [
1364         AC_DEFINE(ENABLE_DEBUG_HASHMAP, 1, [Define if hashmap debugging is to be enabled])
1365         enable_debug="hashmap $enable_debug"
1366 ])
1367 AS_IF([test x$enable_debug_mmap_cache = xyes], [
1368         AC_DEFINE(ENABLE_DEBUG_MMAP_CACHE, 1, [Define if mmap cache debugging is to be enabled])
1369         enable_debug="mmap-cache $enable_debug"
1370 ])
1371 test -z "$enable_debug" && enable_debug="none"
1372
1373 AC_SUBST([dbuspolicydir], [$with_dbuspolicydir])
1374 AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir])
1375 AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
1376 AC_SUBST([bashcompletiondir], [$with_bashcompletiondir])
1377 AC_SUBST([zshcompletiondir], [$with_zshcompletiondir])
1378 AC_SUBST([pamlibdir], [$with_pamlibdir])
1379 AC_SUBST([pamconfdir], [$with_pamconfdir])
1380 AC_SUBST([rootprefix], [$with_rootprefix])
1381 AC_SUBST([rootlibdir], [$with_rootlibdir])
1382
1383 AC_CONFIG_FILES([
1384         Makefile po/Makefile.in
1385 ])
1386
1387 AC_OUTPUT
1388 AC_MSG_RESULT([
1389         $PACKAGE_NAME $VERSION
1390
1391         libcryptsetup:           ${have_libcryptsetup}
1392         PAM:                     ${have_pam}
1393         AUDIT:                   ${have_audit}
1394         IMA:                     ${have_ima}
1395         AppArmor:                ${have_apparmor}
1396         SELinux:                 ${have_selinux}
1397         SECCOMP:                 ${have_seccomp}
1398         SMACK:                   ${have_smack}
1399         ZLIB:                    ${have_zlib}
1400         XZ:                      ${have_xz}
1401         LZ4:                     ${have_lz4}
1402         BZIP2:                   ${have_bzip2}
1403         ACL:                     ${have_acl}
1404         GCRYPT:                  ${have_gcrypt}
1405         QRENCODE:                ${have_qrencode}
1406         MICROHTTPD:              ${have_microhttpd}
1407         CHKCONFIG:               ${have_chkconfig}
1408         GNUTLS:                  ${have_gnutls}
1409         libcurl:                 ${have_libcurl}
1410         libidn:                  ${have_libidn}
1411         ELFUTILS:                ${have_elfutils}
1412         binfmt:                  ${have_binfmt}
1413         vconsole:                ${have_vconsole}
1414         bootchart:               ${have_bootchart}
1415         tmpfiles:                ${have_tmpfiles}
1416         sysusers:                ${have_sysusers}
1417         firstboot:               ${have_firstboot}
1418         randomseed:              ${have_randomseed}
1419         backlight:               ${have_backlight}
1420         rfkill:                  ${have_rfkill}
1421         logind:                  ${have_logind}
1422         machined:                ${have_machined}
1423         importd:                 ${have_importd}
1424         hostnamed:               ${have_hostnamed}
1425         timedated:               ${have_timedated}
1426         timesyncd:               ${have_timesyncd}
1427         default NTP servers:     ${NTP_SERVERS}
1428         time epoch:              ${TIME_EPOCH}
1429         localed:                 ${have_localed}
1430         networkd:                ${have_networkd}
1431         resolved:                ${have_resolved}
1432         default DNS servers:     ${DNS_SERVERS}
1433         coredump:                ${have_coredump}
1434         polkit:                  ${have_polkit}
1435         efi:                     ${have_efi}
1436         gnuefi:                  ${have_gnuefi}
1437         efi arch:                ${EFI_ARCH}
1438         EFI machine type:        ${EFI_MACHINE_TYPE_NAME}
1439         EFI CC                   ${EFI_CC}
1440         EFI libdir:              ${EFI_LIB_DIR}
1441         EFI ldsdir:              ${EFI_LDS_DIR}
1442         EFI includedir:          ${EFI_INC_DIR}
1443         kmod:                    ${have_kmod}
1444         xkbcommon:               ${have_xkbcommon}
1445         blkid:                   ${have_blkid}
1446         dbus:                    ${have_dbus}
1447         nss-myhostname:          ${have_myhostname}
1448         gudev:                   ${enable_gudev}
1449         hwdb:                    ${enable_hwdb}
1450         gintrospection:          ${enable_introspection}
1451         terminal:                ${have_terminal}
1452         kdbus:                   ${have_kdbus}
1453         Python:                  ${have_python}
1454         Python Headers:          ${have_python_devel}
1455         man pages:               ${have_manpages}
1456         gtk-doc:                 ${enable_gtk_doc}
1457         test coverage:           ${have_coverage}
1458         Split /usr:              ${enable_split_usr}
1459         SysV compatibility:      ${SYSTEM_SYSV_COMPAT}
1460         compatibility libraries: ${have_compat_libs}
1461         ldconfig support:        ${enable_ldconfig}
1462         hibernate support:       ${enable_hibernate}
1463         extra debugging:         ${enable_debug}
1464
1465         prefix:                  ${prefix}
1466         rootprefix:              ${with_rootprefix}
1467         sysconf dir:             ${sysconfdir}
1468         datarootdir:             ${datarootdir}
1469         includedir:              ${includedir}
1470         include_prefix:          ${INCLUDE_PREFIX}
1471         lib dir:                 ${libdir}
1472         rootlib dir:             ${with_rootlibdir}
1473         SysV init scripts:       ${SYSTEM_SYSVINIT_PATH}
1474         SysV rc?.d directories:  ${SYSTEM_SYSVRCND_PATH}
1475         Build Python:            ${PYTHON}
1476         Installation Python:     ${PYTHON_BINARY}
1477         sphinx binary:           ${SPHINX_BUILD}
1478         PAM modules dir:         ${with_pamlibdir}
1479         PAM configuration dir:   ${with_pamconfdir}
1480         D-Bus policy dir:        ${with_dbuspolicydir}
1481         D-Bus session dir:       ${with_dbussessionservicedir}
1482         D-Bus system dir:        ${with_dbussystemservicedir}
1483         Bash completions dir:    ${with_bashcompletiondir}
1484         Zsh completions dir:     ${with_zshcompletiondir}
1485         Extra start script:      ${RC_LOCAL_SCRIPT_PATH_START}
1486         Extra stop script:       ${RC_LOCAL_SCRIPT_PATH_STOP}
1487         Debug shell:             ${SUSHELL} @ ${DEBUGTTY}
1488         TTY GID:                 ${TTY_GID}
1489         Maximum System UID:      ${SYSTEM_UID_MAX}
1490         Maximum System GID:      ${SYSTEM_GID_MAX}
1491         Certificate root:        ${CERTIFICATEROOT}
1492         Default dkr Index        ${DEFAULT_DKR_INDEX_URL}
1493
1494         CFLAGS:                  ${OUR_CFLAGS} ${CFLAGS}
1495         CPPFLAGS:                ${OUR_CPPFLAGS} ${CPPFLAGS}
1496         LDFLAGS:                 ${OUR_LDFLAGS} ${LDFLAGS}
1497         PYTHON_CFLAGS:           ${PYTHON_DEVEL_CFLAGS}
1498         PYTHON_LIBS:             ${PYTHON_DEVEL_LIBS}
1499 ])