chiark / gitweb /
1851c073a414769abe537a035e641fe94fe55f87
[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 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_quotacheck=no
863 AC_ARG_ENABLE(quotacheck, AS_HELP_STRING([--disable-quotacheck], [disable quotacheck tools]))
864 if test "x$enable_quotacheck" != "xno"; then
865         have_quotacheck=yes
866 fi
867 AM_CONDITIONAL(ENABLE_QUOTACHECK, [test "$have_quotacheck" = "yes"])
868
869 # ------------------------------------------------------------------------------
870 have_tmpfiles=no
871 AC_ARG_ENABLE(tmpfiles, AS_HELP_STRING([--disable-tmpfiles], [disable tmpfiles support]))
872 if test "x$enable_tmpfiles" != "xno"; then
873         have_tmpfiles=yes
874 fi
875 AM_CONDITIONAL(ENABLE_TMPFILES, [test "$have_tmpfiles" = "yes"])
876
877 # ------------------------------------------------------------------------------
878 have_sysusers=no
879 AC_ARG_ENABLE(sysusers, AS_HELP_STRING([--disable-sysusers], [disable sysusers support]))
880 if test "x$enable_sysusers" != "xno"; then
881         have_sysusers=yes
882 fi
883 AM_CONDITIONAL(ENABLE_SYSUSERS, [test "$have_sysusers" = "yes"])
884
885 # ------------------------------------------------------------------------------
886 have_firstboot=no
887 AC_ARG_ENABLE(firstboot, AS_HELP_STRING([--disable-firstboot], [disable firstboot support]))
888 if test "x$enable_firstboot" != "xno"; then
889         have_firstboot=yes
890 fi
891 AM_CONDITIONAL(ENABLE_FIRSTBOOT, [test "$have_firstboot" = "yes"])
892
893 # ------------------------------------------------------------------------------
894 have_randomseed=no
895 AC_ARG_ENABLE(randomseed, AS_HELP_STRING([--disable-randomseed], [disable randomseed tools]))
896 if test "x$enable_randomseed" != "xno"; then
897         have_randomseed=yes
898 fi
899 AM_CONDITIONAL(ENABLE_RANDOMSEED, [test "$have_randomseed" = "yes"])
900
901 # ------------------------------------------------------------------------------
902 have_backlight=no
903 AC_ARG_ENABLE(backlight, AS_HELP_STRING([--disable-backlight], [disable backlight tools]))
904 if test "x$enable_backlight" != "xno"; then
905         have_backlight=yes
906 fi
907 AM_CONDITIONAL(ENABLE_BACKLIGHT, [test "$have_backlight" = "yes"])
908
909 # ------------------------------------------------------------------------------
910 have_rfkill=no
911 AC_ARG_ENABLE(rfkill, AS_HELP_STRING([--disable-rfkill], [disable rfkill tools]))
912 if test "x$enable_rfkill" != "xno"; then
913         have_rfkill=yes
914 fi
915 AM_CONDITIONAL(ENABLE_RFKILL, [test "$have_rfkill" = "yes"])
916
917 # ------------------------------------------------------------------------------
918 have_logind=no
919 AC_ARG_ENABLE(logind, AS_HELP_STRING([--disable-logind], [disable login daemon]))
920 if test "x$enable_logind" != "xno"; then
921         have_logind=yes
922 fi
923 AM_CONDITIONAL(ENABLE_LOGIND, [test "$have_logind" = "yes"])
924 AS_IF([test "$have_logind" = "yes"], [ AC_DEFINE(HAVE_LOGIND, [1], [Logind support available]) ])
925
926 # ------------------------------------------------------------------------------
927 have_machined=no
928 AC_ARG_ENABLE(machined, AS_HELP_STRING([--disable-machined], [disable machine daemon]))
929 if test "x$enable_machined" != "xno"; then
930         have_machined=yes
931 fi
932 AM_CONDITIONAL(ENABLE_MACHINED, [test "$have_machined" = "yes"])
933 AS_IF([test "$have_machined" = "yes"], [ AC_DEFINE(HAVE_MACHINED, [1], [Machined support available]) ])
934
935 # ------------------------------------------------------------------------------
936 have_importd=no
937 AC_ARG_ENABLE(importd, AS_HELP_STRING([--disable-importd], [disable import daemon]))
938 if test "x$enable_importd" != "xno"; then
939         have_importd=yes
940 fi
941 AM_CONDITIONAL(ENABLE_IMPORTD, [test "$have_importd" = "yes"])
942 AS_IF([test "$have_importd" = "yes"], [ AC_DEFINE(HAVE_IMPORTD, [1], [Importd support available]) ])
943
944 # ------------------------------------------------------------------------------
945 have_hostnamed=no
946 AC_ARG_ENABLE(hostnamed, AS_HELP_STRING([--disable-hostnamed], [disable hostname daemon]))
947 if test "x$enable_hostnamed" != "xno"; then
948         have_hostnamed=yes
949 fi
950 AM_CONDITIONAL(ENABLE_HOSTNAMED, [test "$have_hostnamed" = "yes"])
951
952 # ------------------------------------------------------------------------------
953 have_timedated=no
954 AC_ARG_ENABLE(timedated, AS_HELP_STRING([--disable-timedated], [disable timedate daemon]))
955 if test "x$enable_timedated" != "xno"; then
956         have_timedated=yes
957 fi
958 AM_CONDITIONAL(ENABLE_TIMEDATED, [test "$have_timedated" = "yes"])
959
960 # ------------------------------------------------------------------------------
961 have_timesyncd=no
962 AC_ARG_ENABLE(timesyncd, AS_HELP_STRING([--disable-timesyncd], [disable timesync daemon]))
963 if test "x$enable_timesyncd" != "xno"; then
964         have_timesyncd=yes
965         M4_DEFINES="$M4_DEFINES -DENABLE_TIMESYNCD"
966 fi
967 AM_CONDITIONAL(ENABLE_TIMESYNCD, [test "$have_timesyncd" = "yes"])
968
969 AC_ARG_WITH(ntp-servers,
970         AS_HELP_STRING([--with-ntp-servers=NTPSERVERS],
971                 [Space-separated list of default NTP servers]),
972         [NTP_SERVERS="$withval"],
973         [NTP_SERVERS="time1.google.com time2.google.com time3.google.com time4.google.com"])
974
975 AC_DEFINE_UNQUOTED(NTP_SERVERS, ["$NTP_SERVERS"], [Default NTP Servers])
976 AC_SUBST(NTP_SERVERS)
977
978 AC_ARG_WITH(time-epoch,
979         AS_HELP_STRING([--with-time-epoch=SECONDS],
980                 [Time epoch for time clients]),
981         [TIME_EPOCH="$withval"],
982         [TIME_EPOCH="`stat -c %Y ${srcdir}/NEWS 2>/dev/null || echo 0`"])
983
984 AC_DEFINE_UNQUOTED(TIME_EPOCH, [$TIME_EPOCH], [Time Epoch])
985
986 # ------------------------------------------------------------------------------
987 AC_ARG_WITH(system-uid-max,
988         AS_HELP_STRING([--with-system-uid-max=UID]
989                 [Maximum UID for system users]),
990         [SYSTEM_UID_MAX="$withval"],
991         [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`"])
992
993 AC_DEFINE_UNQUOTED(SYSTEM_UID_MAX, [$SYSTEM_UID_MAX], [Maximum System UID])
994 AC_SUBST(SYSTEM_UID_MAX)
995
996 # ------------------------------------------------------------------------------
997 AC_ARG_WITH(system-gid-max,
998         AS_HELP_STRING([--with-system-gid-max=GID]
999                 [Maximum GID for system groups]),
1000         [SYSTEM_GID_MAX="$withval"],
1001         [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`"])
1002
1003 AC_DEFINE_UNQUOTED(SYSTEM_GID_MAX, [$SYSTEM_GID_MAX], [Maximum System GID])
1004 AC_SUBST(SYSTEM_GID_MAX)
1005
1006 # ------------------------------------------------------------------------------
1007 have_localed=no
1008 AC_ARG_ENABLE(localed, AS_HELP_STRING([--disable-localed], [disable locale daemon]))
1009 if test "x$enable_localed" != "xno"; then
1010         have_localed=yes
1011 fi
1012 AM_CONDITIONAL(ENABLE_LOCALED, [test "$have_localed" = "yes"])
1013
1014 # ------------------------------------------------------------------------------
1015 have_coredump=no
1016 AC_ARG_ENABLE(coredump, AS_HELP_STRING([--disable-coredump], [disable coredump hook]))
1017 if test "x$enable_coredump" != "xno"; then
1018         have_coredump=yes
1019 fi
1020 AM_CONDITIONAL(ENABLE_COREDUMP, [test "$have_coredump" = "yes"])
1021
1022 # ------------------------------------------------------------------------------
1023 have_polkit=no
1024 AC_ARG_ENABLE(polkit, AS_HELP_STRING([--disable-polkit], [disable PolicyKit support]))
1025 if test "x$enable_polkit" != "xno"; then
1026         AC_DEFINE(ENABLE_POLKIT, 1, [Define if PolicyKit support is to be enabled])
1027         have_polkit=yes
1028 fi
1029 AM_CONDITIONAL(ENABLE_POLKIT, [test "x$have_polkit" = "xyes"])
1030
1031 # ------------------------------------------------------------------------------
1032 have_resolved=no
1033 AC_ARG_ENABLE(resolved, AS_HELP_STRING([--disable-resolved], [disable resolve daemon]))
1034 if test "x$enable_resolved" != "xno"; then
1035         have_resolved=yes
1036         M4_DEFINES="$M4_DEFINES -DENABLE_RESOLVED"
1037 fi
1038 AM_CONDITIONAL(ENABLE_RESOLVED, [test "$have_resolved" = "yes"])
1039
1040 AC_ARG_WITH(dns-servers,
1041         AS_HELP_STRING([--with-dns-servers=DNSSERVERS],
1042                 [Space-separated list of default DNS servers]),
1043         [DNS_SERVERS="$withval"],
1044         [DNS_SERVERS="8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844"])
1045
1046 AC_DEFINE_UNQUOTED(DNS_SERVERS, ["$DNS_SERVERS"], [Default DNS Servers])
1047 AC_SUBST(DNS_SERVERS)
1048
1049 # ------------------------------------------------------------------------------
1050 have_networkd=no
1051 AC_ARG_ENABLE(networkd, AS_HELP_STRING([--disable-networkd], [disable networkd]))
1052 AS_IF([test "x$enable_networkd" != "xno"], [
1053         AC_DEFINE(ENABLE_NETWORKD, 1, [Define if networkd support is to be enabled])
1054         have_networkd=yes
1055         M4_DEFINES="$M4_DEFINES -DENABLE_NETWORKD"
1056 ])
1057 AM_CONDITIONAL(ENABLE_NETWORKD, [test "x$have_networkd" = "xyes"])
1058
1059 # ------------------------------------------------------------------------------
1060 have_efi=no
1061 AC_ARG_ENABLE(efi, AS_HELP_STRING([--disable-efi], [disable EFI support]))
1062 if test "x$enable_efi" != "xno"; then
1063         AC_DEFINE(ENABLE_EFI, 1, [Define if EFI support is to be enabled])
1064         have_efi=yes
1065 fi
1066 AM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"])
1067
1068 # ------------------------------------------------------------------------------
1069 EFI_CC=gcc
1070 AC_SUBST([EFI_CC])
1071
1072 EFI_ARCH=`echo $host | sed "s/\(-\).*$//"`
1073
1074 AM_COND_IF(ARCH_IA32, [
1075         EFI_ARCH=ia32
1076         EFI_MACHINE_TYPE_NAME=ia32])
1077
1078 AM_COND_IF(ARCH_X86_64, [
1079         EFI_MACHINE_TYPE_NAME=x64])
1080
1081 AC_SUBST([EFI_ARCH])
1082 AC_SUBST([EFI_MACHINE_TYPE_NAME])
1083
1084 have_gnuefi=no
1085 AC_ARG_ENABLE(gnuefi, AS_HELP_STRING([--enable-gnuefi], [Disable optional gnuefi support]))
1086 AS_IF([test "x$enable_gnuefi" != "xno"], [
1087         AC_CHECK_HEADERS(efi/${EFI_ARCH}/efibind.h,
1088                 [AC_DEFINE(HAVE_GNUEFI, 1, [Define if gnuefi is available])
1089                  have_gnuefi=yes],
1090                 [AS_IF([test "x$enable_gnuefi" = xyes],
1091                        [AC_MSG_ERROR([*** gnuefi support requested but headers not found])])
1092         ])
1093
1094         efiroot=$(echo $(cd /usr/lib/$(gcc -print-multi-os-directory); pwd))
1095
1096         EFI_LIB_DIR="$efiroot"
1097         AC_ARG_WITH(efi-libdir,
1098                 AS_HELP_STRING([--with-efi-libdir=PATH], [Path to EFI lib directory]),
1099                 [EFI_LIB_DIR="$withval"], [EFI_LIB_DIR="$efiroot"]
1100         )
1101         AC_SUBST([EFI_LIB_DIR])
1102
1103         have_efi_lds=no
1104         AC_ARG_WITH(efi-ldsdir,
1105                 AS_HELP_STRING([--with-efi-ldsdir=PATH], [Path to EFI lds directory]),
1106                 [EFI_LDS_DIR="$withval" && AC_CHECK_FILE([${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds],
1107                         [have_efi_lds=yes])],
1108                 [AS_FOR([DIR], [EFI_LDS_DIR], ["${efiroot}/gnuefi" "${efiroot}"],
1109                         [AC_CHECK_FILE([${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds],
1110                                        [have_efi_lds=yes && break])])])
1111         AS_IF([test "x$have_efi_lds" = xyes],
1112               [AC_SUBST([EFI_LDS_DIR])],
1113               [AS_IF([test "x$enable_gnuefi" = xyes],
1114                      [AC_MSG_ERROR([*** gnuefi support requested but files not found])],
1115                      [have_gnuefi=no])])
1116
1117         AC_ARG_WITH(efi-includedir,
1118                 AS_HELP_STRING([--with-efi-includedir=PATH], [Path to EFI include directory]),
1119                 [EFI_INC_DIR="$withval"], [EFI_INC_DIR="/usr/include"]
1120         )
1121         AC_SUBST([EFI_INC_DIR])
1122 ])
1123 AM_CONDITIONAL(HAVE_GNUEFI, [test "x$have_gnuefi" = xyes])
1124
1125 # ------------------------------------------------------------------------------
1126 AC_ARG_WITH(unifont,
1127         AS_HELP_STRING([--with-unifont=PATH],
1128                 [Path to unifont.hex]),
1129         [UNIFONT="$withval"],
1130         [UNIFONT="/usr/share/unifont/unifont.hex"])
1131 AC_SUBST(UNIFONT)
1132
1133 have_terminal=no
1134 have_unifont=no
1135 AC_ARG_ENABLE(terminal, AS_HELP_STRING([--enable-terminal], [enable terminal support]))
1136 if test "x$enable_terminal" = "xyes"; then
1137         PKG_CHECK_MODULES([TERMINAL], [ libevdev >= 1.2 xkbcommon >= 0.5 libdrm >= 2.4], [have_terminal=yes])
1138         AC_CHECK_FILE($UNIFONT, [have_unifont=yes])
1139         AS_IF([test "x$have_terminal" != xyes -o "x$have_unifont" != "xyes" -a "x$enable_terminal" = xyes],
1140               [AC_MSG_ERROR([*** terminal support requested but required dependencies not available])],
1141               [test "x$have_terminal" = xyes -a "x$have_unifont" = "xyes"],
1142               [AC_DEFINE(ENABLE_TERMINAL, 1, [Define if terminal support is to be enabled])])
1143 fi
1144 AM_CONDITIONAL(ENABLE_TERMINAL, [test "x$have_terminal" = "xyes" -a "x$have_unifont" = "xyes"])
1145
1146 # ------------------------------------------------------------------------------
1147 have_kdbus=no
1148 AC_ARG_ENABLE(kdbus, AS_HELP_STRING([--enable-kdbus], [do connect to kdbus by default]))
1149 if test "x$enable_kdbus" = "xyes"; then
1150         AC_DEFINE(ENABLE_KDBUS, 1, [Define if kdbus support is to be enabled])
1151         have_kdbus=yes
1152         M4_DEFINES="$M4_DEFINES -DENABLE_KDBUS"
1153 fi
1154 AM_CONDITIONAL(ENABLE_KDBUS, [test "$have_kdbus" = "yes"])
1155
1156 # ------------------------------------------------------------------------------
1157 AC_ARG_WITH(rc-local-script-path-start,
1158         AS_HELP_STRING([--with-rc-local-script-path-start=PATH],
1159                 [Path to /etc/rc.local]),
1160         [RC_LOCAL_SCRIPT_PATH_START="$withval"],
1161         [RC_LOCAL_SCRIPT_PATH_START="/etc/rc.local"])
1162
1163 AC_ARG_WITH(rc-local-script-path-stop,
1164         AS_HELP_STRING([--with-rc-local-script-path-stop=PATH],
1165                 [Path to /usr/sbin/halt.local]),
1166         [RC_LOCAL_SCRIPT_PATH_STOP="$withval"],
1167         [RC_LOCAL_SCRIPT_PATH_STOP="/usr/sbin/halt.local"])
1168
1169 AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_START, ["$RC_LOCAL_SCRIPT_PATH_START"], [Path of /etc/rc.local script])
1170 AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_STOP, ["$RC_LOCAL_SCRIPT_PATH_STOP"], [Path of /usr/sbin/halt.local script])
1171
1172 AC_SUBST(RC_LOCAL_SCRIPT_PATH_START)
1173 AC_SUBST(RC_LOCAL_SCRIPT_PATH_STOP)
1174
1175 # ------------------------------------------------------------------------------
1176 AC_ARG_WITH(kbd-loadkeys,
1177         AS_HELP_STRING([--with-kbd-loadkeys=PATH],
1178                 [Path to loadkeys]),
1179         [KBD_LOADKEYS="$withval"],
1180         [KBD_LOADKEYS="/usr/bin/loadkeys"])
1181
1182 AC_ARG_WITH(kbd-setfont,
1183         AS_HELP_STRING([--with-kbd-setfont=PATH],
1184                 [Path to setfont]),
1185         [KBD_SETFONT="$withval"],
1186         [KBD_SETFONT="/usr/bin/setfont"])
1187
1188 AC_DEFINE_UNQUOTED(KBD_LOADKEYS, ["$KBD_LOADKEYS"], [Path of loadkeys])
1189 AC_DEFINE_UNQUOTED(KBD_SETFONT, ["$KBD_SETFONT"], [Path of setfont])
1190
1191 AC_SUBST(KBD_LOADKEYS)
1192 AC_SUBST(KBD_SETFONT)
1193
1194 AC_ARG_WITH(telinit,
1195         AS_HELP_STRING([--with-telinit=PATH],
1196                 [Path to telinit]),
1197         [TELINIT="$withval"],
1198         [TELINIT="/lib/sysvinit/telinit"])
1199
1200 AC_DEFINE_UNQUOTED(TELINIT, ["$TELINIT"], [Path to telinit])
1201
1202 AC_SUBST(TELINIT)
1203
1204 AC_CHECK_HEADERS_ONCE([valgrind/memcheck.h valgrind/valgrind.h])
1205
1206 # ------------------------------------------------------------------------------
1207 have_myhostname=no
1208 AC_ARG_ENABLE(myhostname, AS_HELP_STRING([--disable-myhostname], [disable nss-myhostname support]))
1209 if test "x$enable_myhostname" != "xno"; then
1210         AC_HEADER_STDC
1211         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])
1212
1213         AC_C_CONST
1214         AC_TYPE_SIZE_T
1215         AC_HEADER_TIME
1216
1217         AC_FUNC_MALLOC
1218         AC_FUNC_SELECT_ARGTYPES
1219         AC_CHECK_FUNCS([gethostbyaddr gethostbyname gettimeofday inet_ntoa memset select socket strcspn strdup strerror strncasecmp strcasecmp strspn])
1220
1221         have_myhostname=yes
1222 fi
1223 AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"])
1224
1225 # ------------------------------------------------------------------------------
1226 AC_ARG_ENABLE([gudev],
1227        AS_HELP_STRING([--disable-gudev], [disable Gobject libudev support @<:@default=enabled@:>@]),
1228        [], [enable_gudev=yes])
1229 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]) ])
1230 AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"])
1231 AS_IF([test "x$enable_gudev" = "xyes"], [ AC_DEFINE(HAVE_GLIB, 1, [Define if glib is available]) ])
1232
1233 # ------------------------------------------------------------------------------
1234 AC_ARG_ENABLE(hwdb, [AC_HELP_STRING([--disable-hwdb], [disable hardware database support])],
1235        enable_hwdb=$enableval, enable_hwdb=yes)
1236 AM_CONDITIONAL(ENABLE_HWDB, [test x$enable_hwdb = xyes])
1237
1238 # ------------------------------------------------------------------------------
1239 have_manpages=no
1240 AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages]))
1241 AS_IF([test "x$enable_manpages" != xno], [have_manpages=yes])
1242 AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
1243
1244 # ------------------------------------------------------------------------------
1245 AC_ARG_ENABLE(hibernate,
1246        [AC_HELP_STRING([--disable-hibernate], [disable hibernation support])],
1247        enable_hibernate=$enableval, enable_hibernate=yes)
1248 AM_CONDITIONAL(ENABLE_HIBERNATE, [test x$enable_hibernate = xyes])
1249
1250 # ------------------------------------------------------------------------------
1251 AC_ARG_ENABLE(ldconfig,
1252        [AC_HELP_STRING([--disable-ldconfig], [disable ldconfig])],
1253        enable_ldconfig=$enableval, enable_ldconfig=yes)
1254 AM_CONDITIONAL(ENABLE_LDCONFIG, [test x$enable_ldconfig = xyes])
1255
1256 AC_SUBST(M4_DEFINES)
1257
1258 AC_ARG_WITH([tty-gid],
1259         [AS_HELP_STRING([--with-tty-gid=GID],
1260                 [Specify the numeric GID of the 'tty' group])],
1261         [TTY_GID="$withval"],
1262         [TTY_GID="5"])
1263
1264 AC_DEFINE_UNQUOTED(TTY_GID, [$TTY_GID], [GID of the 'tty' group])
1265 AC_SUBST(TTY_GID)
1266
1267 AC_ARG_WITH([dbuspolicydir],
1268         AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
1269         [],
1270         [with_dbuspolicydir=${sysconfdir}/dbus-1/system.d])
1271
1272 AC_ARG_WITH([dbussessionservicedir],
1273         AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]),
1274         [],
1275         [with_dbussessionservicedir=${datadir}/dbus-1/services])
1276
1277 AC_ARG_WITH([dbussystemservicedir],
1278         AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]),
1279         [],
1280         [with_dbussystemservicedir=${datadir}/dbus-1/system-services])
1281
1282 AC_ARG_WITH([bashcompletiondir],
1283         AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]),
1284         [],
1285         [AS_IF([$($PKG_CONFIG --exists bash-completion)], [
1286                 with_bashcompletiondir=$($PKG_CONFIG --variable=completionsdir bash-completion)
1287         ] , [
1288                 with_bashcompletiondir=${datadir}/bash-completion/completions
1289         ])])
1290
1291 AC_ARG_WITH([zshcompletiondir],
1292         AS_HELP_STRING([--with-zshcompletiondir=DIR], [Zsh completions directory]),
1293         [], [with_zshcompletiondir=${datadir}/zsh/site-functions])
1294
1295 AC_ARG_WITH([rootprefix],
1296         AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
1297         [], [with_rootprefix=${ac_default_prefix}])
1298
1299 AC_ARG_WITH([rootlibdir],
1300         AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]),
1301         [],
1302         [with_rootlibdir=${libdir}])
1303
1304 AC_ARG_WITH([pamlibdir],
1305         AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
1306         [],
1307         [with_pamlibdir=${with_rootlibdir}/security])
1308
1309 AC_ARG_WITH([pamconfdir],
1310         AS_HELP_STRING([--with-pamconfdir=DIR], [Directory for PAM configuration]),
1311         [],
1312         [with_pamconfdir=${sysconfdir}/pam.d])
1313
1314 AC_ARG_ENABLE([split-usr],
1315         AS_HELP_STRING([--enable-split-usr], [Assume that /bin, /sbin aren\'t symlinks into /usr]),
1316         [],
1317         [AS_IF([test "x${ac_default_prefix}" != "x${with_rootprefix}"], [
1318                 enable_split_usr=yes
1319         ], [
1320                 enable_split_usr=no
1321         ])])
1322
1323 AC_ARG_WITH([dkr-index-url],
1324         [AS_HELP_STRING([--dkr-index-url=URL], [Specify the default index URL to use for image downloads])],
1325         [DEFAULT_DKR_INDEX_URL="\"$withval\""],
1326         [DEFAULT_DKR_INDEX_URL="NULL"])
1327
1328 AC_DEFINE_UNQUOTED(DEFAULT_DKR_INDEX_URL, [$DEFAULT_DKR_INDEX_URL], [Default index URL to use for image downloads])
1329 AC_SUBST(DEFAULT_DKR_INDEX_URL)
1330
1331 AS_IF([test "x${enable_split_usr}" = "xyes"], [
1332         AC_DEFINE(HAVE_SPLIT_USR, 1, [Define if /bin, /sbin aren't symlinks into /usr])
1333 ])
1334
1335 # Work around intltoolize and gtk-doc problems in VPATH builds
1336 AM_CONDITIONAL([ENABLE_GTK_DOC_TESTS], [test "x$0" = "x./configure"],
1337                                        [Define to do gtk-doc tests])
1338 AS_IF([test "x$0" != "x./configure"], [
1339         AC_SUBST([INTLTOOL_UPDATE], [/bin/true])
1340 ])
1341
1342 # QEMU and OVMF UEFI firmware
1343 AS_IF([test x"$cross_compiling" = "xyes"], [], [
1344         AC_PATH_PROG([QEMU], [qemu-system-x86_64])
1345         AC_CHECK_FILE([/usr/share/qemu/bios-ovmf.bin], [QEMU_BIOS=/usr/share/qemu/bios-ovmf.bin],
1346                 [AC_CHECK_FILE([/usr/share/qemu-ovmf/bios.bin], [QEMU_BIOS=/usr/share/qemu-ovmf/bios.bin])])
1347         AC_SUBST([QEMU_BIOS])
1348 ])
1349
1350 AC_ARG_ENABLE(tests,
1351         [AC_HELP_STRING([--disable-tests], [disable tests])],
1352         enable_tests=$enableval, enable_tests=yes)
1353 AM_CONDITIONAL(ENABLE_TESTS, [test x$enable_tests = xyes])
1354
1355 AC_ARG_ENABLE(debug,
1356         [AC_HELP_STRING([--enable-debug@<:@=LIST@:>@], [enable extra debugging (hashmap,mmap-cache)])],
1357         [if test "x$enableval" = "xyes"; then
1358                 enableval="hashmap,mmap-cache"
1359         fi
1360         saved_ifs="$IFS"
1361         IFS="$IFS$PATH_SEPARATOR,"
1362         for name in $enableval; do
1363                 case $name in
1364                 hashmap)
1365                         enable_debug_hashmap=yes
1366                         ;;
1367                 mmap-cache)
1368                         enable_debug_mmap_cache=yes
1369                         ;;
1370                 esac
1371         done
1372         IFS="$saved_ifs"],[])
1373
1374 enable_debug=""
1375 AS_IF([test x$enable_debug_hashmap = xyes], [
1376         AC_DEFINE(ENABLE_DEBUG_HASHMAP, 1, [Define if hashmap debugging is to be enabled])
1377         enable_debug="hashmap $enable_debug"
1378 ])
1379 AS_IF([test x$enable_debug_mmap_cache = xyes], [
1380         AC_DEFINE(ENABLE_DEBUG_MMAP_CACHE, 1, [Define if mmap cache debugging is to be enabled])
1381         enable_debug="mmap-cache $enable_debug"
1382 ])
1383 test -z "$enable_debug" && enable_debug="none"
1384
1385 AC_SUBST([dbuspolicydir], [$with_dbuspolicydir])
1386 AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir])
1387 AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
1388 AC_SUBST([bashcompletiondir], [$with_bashcompletiondir])
1389 AC_SUBST([zshcompletiondir], [$with_zshcompletiondir])
1390 AC_SUBST([pamlibdir], [$with_pamlibdir])
1391 AC_SUBST([pamconfdir], [$with_pamconfdir])
1392 AC_SUBST([rootprefix], [$with_rootprefix])
1393 AC_SUBST([rootlibdir], [$with_rootlibdir])
1394
1395 AC_CONFIG_FILES([
1396         Makefile po/Makefile.in
1397 ])
1398
1399 AC_OUTPUT
1400 AC_MSG_RESULT([
1401         $PACKAGE_NAME $VERSION
1402
1403         libcryptsetup:           ${have_libcryptsetup}
1404         PAM:                     ${have_pam}
1405         AUDIT:                   ${have_audit}
1406         IMA:                     ${have_ima}
1407         AppArmor:                ${have_apparmor}
1408         SELinux:                 ${have_selinux}
1409         SECCOMP:                 ${have_seccomp}
1410         SMACK:                   ${have_smack}
1411         ZLIB:                    ${have_zlib}
1412         XZ:                      ${have_xz}
1413         LZ4:                     ${have_lz4}
1414         BZIP2:                   ${have_bzip2}
1415         ACL:                     ${have_acl}
1416         GCRYPT:                  ${have_gcrypt}
1417         QRENCODE:                ${have_qrencode}
1418         MICROHTTPD:              ${have_microhttpd}
1419         CHKCONFIG:               ${have_chkconfig}
1420         GNUTLS:                  ${have_gnutls}
1421         libcurl:                 ${have_libcurl}
1422         libidn:                  ${have_libidn}
1423         ELFUTILS:                ${have_elfutils}
1424         binfmt:                  ${have_binfmt}
1425         vconsole:                ${have_vconsole}
1426         bootchart:               ${have_bootchart}
1427         quotacheck:              ${have_quotacheck}
1428         tmpfiles:                ${have_tmpfiles}
1429         sysusers:                ${have_sysusers}
1430         firstboot:               ${have_firstboot}
1431         randomseed:              ${have_randomseed}
1432         backlight:               ${have_backlight}
1433         rfkill:                  ${have_rfkill}
1434         logind:                  ${have_logind}
1435         machined:                ${have_machined}
1436         importd:                 ${have_importd}
1437         hostnamed:               ${have_hostnamed}
1438         timedated:               ${have_timedated}
1439         timesyncd:               ${have_timesyncd}
1440         default NTP servers:     ${NTP_SERVERS}
1441         time epoch:              ${TIME_EPOCH}
1442         localed:                 ${have_localed}
1443         networkd:                ${have_networkd}
1444         resolved:                ${have_resolved}
1445         default DNS servers:     ${DNS_SERVERS}
1446         coredump:                ${have_coredump}
1447         polkit:                  ${have_polkit}
1448         efi:                     ${have_efi}
1449         gnuefi:                  ${have_gnuefi}
1450         efi arch:                ${EFI_ARCH}
1451         EFI machine type:        ${EFI_MACHINE_TYPE_NAME}
1452         EFI CC                   ${EFI_CC}
1453         EFI libdir:              ${EFI_LIB_DIR}
1454         EFI ldsdir:              ${EFI_LDS_DIR}
1455         EFI includedir:          ${EFI_INC_DIR}
1456         kmod:                    ${have_kmod}
1457         xkbcommon:               ${have_xkbcommon}
1458         blkid:                   ${have_blkid}
1459         dbus:                    ${have_dbus}
1460         nss-myhostname:          ${have_myhostname}
1461         gudev:                   ${enable_gudev}
1462         hwdb:                    ${enable_hwdb}
1463         gintrospection:          ${enable_introspection}
1464         terminal:                ${have_terminal}
1465         kdbus:                   ${have_kdbus}
1466         Python:                  ${have_python}
1467         Python Headers:          ${have_python_devel}
1468         man pages:               ${have_manpages}
1469         gtk-doc:                 ${enable_gtk_doc}
1470         test coverage:           ${have_coverage}
1471         Split /usr:              ${enable_split_usr}
1472         SysV compatibility:      ${SYSTEM_SYSV_COMPAT}
1473         compatibility libraries: ${have_compat_libs}
1474         ldconfig support:        ${enable_ldconfig}
1475         hibernate support:       ${enable_hibernate}
1476         extra debugging:         ${enable_debug}
1477
1478         prefix:                  ${prefix}
1479         rootprefix:              ${with_rootprefix}
1480         sysconf dir:             ${sysconfdir}
1481         datarootdir:             ${datarootdir}
1482         includedir:              ${includedir}
1483         include_prefix:          ${INCLUDE_PREFIX}
1484         lib dir:                 ${libdir}
1485         rootlib dir:             ${with_rootlibdir}
1486         SysV init scripts:       ${SYSTEM_SYSVINIT_PATH}
1487         SysV rc?.d directories:  ${SYSTEM_SYSVRCND_PATH}
1488         Build Python:            ${PYTHON}
1489         Installation Python:     ${PYTHON_BINARY}
1490         sphinx binary:           ${SPHINX_BUILD}
1491         PAM modules dir:         ${with_pamlibdir}
1492         PAM configuration dir:   ${with_pamconfdir}
1493         D-Bus policy dir:        ${with_dbuspolicydir}
1494         D-Bus session dir:       ${with_dbussessionservicedir}
1495         D-Bus system dir:        ${with_dbussystemservicedir}
1496         Bash completions dir:    ${with_bashcompletiondir}
1497         Zsh completions dir:     ${with_zshcompletiondir}
1498         Extra start script:      ${RC_LOCAL_SCRIPT_PATH_START}
1499         Extra stop script:       ${RC_LOCAL_SCRIPT_PATH_STOP}
1500         Debug shell:             ${SUSHELL} @ ${DEBUGTTY}
1501         TTY GID:                 ${TTY_GID}
1502         Maximum System UID:      ${SYSTEM_UID_MAX}
1503         Maximum System GID:      ${SYSTEM_GID_MAX}
1504         Certificate root:        ${CERTIFICATEROOT}
1505         Default dkr Index        ${DEFAULT_DKR_INDEX_URL}
1506
1507         CFLAGS:                  ${OUR_CFLAGS} ${CFLAGS}
1508         CPPFLAGS:                ${OUR_CPPFLAGS} ${CPPFLAGS}
1509         LDFLAGS:                 ${OUR_LDFLAGS} ${LDFLAGS}
1510         PYTHON_CFLAGS:           ${PYTHON_DEVEL_CFLAGS}
1511         PYTHON_LIBS:             ${PYTHON_DEVEL_LIBS}
1512 ])