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