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