]> git.ipfire.org Git - thirdparty/systemd.git/blob - configure.ac
bus: rename message "serial" to "cookie"
[thirdparty/systemd.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 AC_INIT([systemd],
23 [208],
24 [http://bugs.freedesktop.org/enter_bug.cgi?product=systemd],
25 [systemd],
26 [http://www.freedesktop.org/wiki/Software/systemd])
27
28 AC_CONFIG_SRCDIR([src/core/main.c])
29 AC_CONFIG_MACRO_DIR([m4])
30 AC_CONFIG_HEADERS([config.h])
31 AC_CONFIG_AUX_DIR([build-aux])
32
33 AC_USE_SYSTEM_EXTENSIONS
34 AC_SYS_LARGEFILE
35 AC_PREFIX_DEFAULT([/usr])
36 AM_MAINTAINER_MODE([enable])
37 AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects check-news])
38 AM_SILENT_RULES([yes])
39 AC_CANONICAL_HOST
40 AC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.])
41 AS_IF([test "x$host_cpu" = "xmips" || test "x$host_cpu" = "xmipsel" ||
42 test "x$host_cpu" = "xmips64" || test "x$host_cpu" = "xmips64el"],
43 [AC_DEFINE(ARCH_MIPS, [], [Whether on mips arch])])
44
45 LT_PREREQ(2.2)
46 LT_INIT([disable-static])
47
48 AS_IF([test "x$enable_static" = "xyes"], [AC_MSG_ERROR([--enable-static is not supported by systemd])])
49 AS_IF([test "x$enable_largefile" = "xno"], [AC_MSG_ERROR([--disable-largefile is not supported by systemd])])
50
51 # i18n stuff for the PolicyKit policy files
52 IT_PROG_INTLTOOL([0.40.0])
53
54 GETTEXT_PACKAGE=systemd
55 AC_SUBST(GETTEXT_PACKAGE)
56
57 AC_PROG_MKDIR_P
58 AC_PROG_LN_S
59 AC_PROG_SED
60 AC_PROG_GREP
61 AC_PROG_AWK
62
63 AC_PROG_CC_C99
64
65 AC_PATH_PROG([M4], [m4])
66 AC_PATH_PROG([XSLTPROC], [xsltproc])
67
68 AC_PATH_PROG([QUOTAON], [quotaon], [/usr/sbin/quotaon])
69 AC_PATH_PROG([QUOTACHECK], [quotacheck], [/usr/sbin/quotacheck])
70
71 AC_PATH_PROG([SETCAP], [setcap], [/usr/sbin/setcap])
72
73 AC_PATH_PROG([KILL], [kill], [/usr/bin/kill])
74
75 AC_PATH_PROG([KMOD], [kmod], [/usr/bin/kmod])
76
77 AC_PATH_PROG([KEXEC], [kexec], [/usr/sbin/kexec])
78
79 # gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line
80 m4_ifdef([GTK_DOC_CHECK], [
81 GTK_DOC_CHECK([1.18],[--flavour no-tmpl])],
82 [AM_CONDITIONAL([ENABLE_GTK_DOC], [false])
83 enable_gtk_doc=no])
84
85 AS_IF([test "x$enable_gtk_doc" = "xyes" -a "x$XSLTPROC" = x], [
86 AC_MSG_ERROR([*** GTK doc requested but xsltproc not found])
87 ])
88
89 m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [
90 GOBJECT_INTROSPECTION_CHECK([1.31.1])
91 ], [
92 AM_CONDITIONAL([HAVE_INTROSPECTION], [false])
93 enable_introspection=no])
94
95 AC_CHECK_TOOL(STRINGS, strings)
96 AC_CHECK_TOOL(GPERF, gperf)
97 if test -z "$GPERF" ; then
98 AC_MSG_ERROR([*** gperf not found])
99 fi
100
101 # ------------------------------------------------------------------------------
102 address_sanitizer_cflags=
103 address_sanitizer_cppflags=
104 address_sanitizer_ldflags=
105 AC_ARG_ENABLE(address-sanitizer, AS_HELP_STRING([--enable-address-sanitizer], [enable -fsanitize=address]))
106 AS_IF([test "x$enable_address_sanitizer" = "xyes"], [
107 CC_CHECK_FLAG_APPEND([with_as_cflags], [CFLAGS], [-fsanitize=address])
108 AS_IF([test -z "$with_as_cflags"],
109 [AC_MSG_ERROR([*** -fsanitize=address is not supported])])
110 address_sanitizer_cflags="$with_as_cflags -fno-omit-frame-pointer -DVALGRIND=1"
111 address_sanitizer_cppflags="-DVALGRIND=1"
112 address_sanitizer_ldflags="-Wc,-fsanitize=address"
113 ])
114
115 CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
116 -pipe \
117 -Wall \
118 -Wextra \
119 -Wno-inline \
120 -Wundef \
121 "-Wformat=2 -Wformat-security -Wformat-nonliteral" \
122 -Wlogical-op \
123 -Wsign-compare \
124 -Wmissing-include-dirs \
125 -Wold-style-definition \
126 -Wpointer-arith \
127 -Winit-self \
128 -Wdeclaration-after-statement \
129 -Wfloat-equal \
130 -Wsuggest-attribute=pure \
131 -Wsuggest-attribute=const \
132 -Wsuggest-attribute=noreturn \
133 -Wmissing-prototypes \
134 -Wstrict-prototypes \
135 -Wredundant-decls \
136 -Wmissing-declarations \
137 -Wmissing-noreturn \
138 -Wshadow \
139 -Wendif-labels \
140 -Wcast-align \
141 -Wstrict-aliasing=2 \
142 -Wwrite-strings \
143 -Wno-long-long \
144 -Wno-overlength-strings \
145 -Wno-unused-parameter \
146 -Wno-missing-field-initializers \
147 -Wno-unused-result \
148 -Werror=overflow \
149 -Wdate-time \
150 -Wnested-externs \
151 -ffast-math \
152 -fno-common \
153 -fdiagnostics-show-option \
154 -fdiagnostics-color \
155 -fno-strict-aliasing \
156 -fvisibility=hidden \
157 -ffunction-sections \
158 -fdata-sections \
159 -fstack-protector \
160 --param=ssp-buffer-size=4])
161 AS_CASE([$CFLAGS], [*-O[[12345\ ]]*],
162 [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
163 -flto])],
164 [AC_MSG_RESULT([skipping -flto, optimization not enabled])])
165 AC_SUBST([OUR_CFLAGS], "$with_cflags $address_sanitizer_cflags")
166
167 AS_CASE([$CFLAGS], [*-O[[12345\ ]]*],
168 [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
169 -Wp,-D_FORTIFY_SOURCE=2])],
170 [AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])])
171 AC_SUBST([OUR_CPPFLAGS], "$with_cppflags $address_sanitizer_cppflags")
172
173 CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
174 -Wl,--as-needed \
175 -Wl,--no-undefined \
176 -Wl,--gc-sections \
177 -Wl,-z,relro \
178 -Wl,-z,now])
179 AC_SUBST([OUR_LDFLAGS], "$with_ldflags $address_sanitizer_ldflags")
180
181 # ------------------------------------------------------------------------------
182 # we use python to build the man page index, and for systemd-python
183 have_python=no
184 AC_ARG_WITH([python],
185 [AS_HELP_STRING([--without-python], [Disable building the man page index and systemd-python (default: test)])])
186
187 AS_IF([test "x$with_python" != "xno"], [
188 AM_PATH_PYTHON(,, [:])
189 AS_IF([test "$PYTHON" != :], [have_python=yes])
190 ])
191 AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
192 AS_IF([test "x$PYTHON_BINARY" = "x"],
193 [AS_IF([test "x$have_python" = "xyes"],
194 [PYTHON_BINARY="$(which "$PYTHON")"],
195 [PYTHON_BINARY=/usr/bin/python])])
196 AC_ARG_VAR(PYTHON_BINARY, [Python binary used to launch installed scripts])
197
198 AS_IF([test "x$have_python" != "xyes" -a "x$enable_python_devel" = "xyes"],
199 [AC_MSG_ERROR([*** python-devel support requires --with-python])])
200
201 have_python_devel=no
202 AC_ARG_ENABLE(python_devel, AS_HELP_STRING([--disable-python-devel], [Do not build python modules]))
203 AS_IF([test "x$have_python" = "xyes" -a "x$enable_python_devel" != "xno"], [
204 PKG_CHECK_MODULES([PYTHON_DEVEL], [python-${PYTHON_VERSION}],
205 [have_python_devel=yes],
206 [PKG_CHECK_MODULES([PYTHON_DEVEL], [python],
207 [have_python_devel=yes],
208 [have_python_devel=no])])
209 AS_IF([test "x$have_python_devel" = xno -a "x$enable_python_devel" = xyes],
210 [AC_MSG_ERROR([*** python-devel support requested but libraries not found])])
211 AC_PATH_PROGS(SPHINX_BUILD, sphinx-build-${PYTHON_VERSION} sphinx-build)
212 ])
213 AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test "$have_python_devel" = "yes"])
214
215 # ------------------------------------------------------------------------------
216
217 AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
218 AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
219 AC_CHECK_HEADERS([linux/btrfs.h], [], [])
220
221 # unconditionally pull-in librt with old glibc versions
222 AC_SEARCH_LIBS([clock_gettime], [rt], [], [])
223
224 save_LIBS="$LIBS"
225 LIBS=
226 AC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])])
227 CAP_LIBS="$LIBS"
228 AC_SUBST(CAP_LIBS)
229
230 LIBS=
231 AC_SEARCH_LIBS([mq_open], [rt], [], [AC_MSG_ERROR([*** POSIX RT library not found])])
232 RT_LIBS="$LIBS"
233 AC_SUBST(RT_LIBS)
234 LIBS="$save_LIBS"
235
236 AC_CHECK_FUNCS([fanotify_init fanotify_mark])
237 AC_CHECK_FUNCS([__secure_getenv secure_getenv])
238 AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at], [], [], [[#include <sys/types.h>
239 #include <unistd.h>
240 #include <sys/mount.h>
241 #include <fcntl.h>]])
242
243 # This makes sure pkg.m4 is available.
244 m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
245
246 # ------------------------------------------------------------------------------
247 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2], have_dbus=yes, have_dbus=no])
248 AS_IF([test "$have_dbus" = "yes"], [ AC_DEFINE(HAVE_DBUS, [1], [Define if dbus-1 is available]) ])
249 AM_CONDITIONAL(HAVE_DBUS, [test "$have_dbus" = "yes"])
250
251 # ------------------------------------------------------------------------------
252 have_coverage=no
253 AC_ARG_ENABLE(coverage, AS_HELP_STRING([--enable-coverage], [enable test coverage]))
254 if test "x$enable_coverage" = "xyes" ; then
255 AC_CHECK_PROG(lcov_found, [lcov], [yes], [no])
256 if test "x$lcov_found" = xno ; then
257 AC_MSG_ERROR([*** lcov support requested but the program was not found])
258 else
259 lcov_version_major="`lcov --version | cut -d ' ' -f 4 | cut -d '.' -f 1`"
260 lcov_version_minor="`lcov --version | cut -d ' ' -f 4 | cut -d '.' -f 2`"
261 if test "$lcov_version_major" -eq 1 -a "$lcov_version_minor" -lt 10; then
262 AC_MSG_ERROR([*** lcov version is too old. 1.10 required])
263 else
264 have_coverage=yes
265 CC_CHECK_FLAGS_APPEND([with_coverage_cflags], [CFLAGS], [\
266 -fprofile-arcs \
267 -ftest-coverage])
268 AC_SUBST([OUR_CFLAGS], "$with_cflags $with_coverage_cflags")
269 fi
270 fi
271 fi
272 AM_CONDITIONAL(ENABLE_COVERAGE, [test "$have_coverage" = "yes"])
273
274 # ------------------------------------------------------------------------------
275 have_kmod=no
276 AC_ARG_ENABLE(kmod, AS_HELP_STRING([--disable-kmod], [disable loadable modules support]))
277 if test "x$enable_kmod" != "xno"; then
278 PKG_CHECK_EXISTS([ libkmod ], have_kmod=yes, have_kmod=no)
279 if test "x$have_kmod" = "xyes"; then
280 PKG_CHECK_MODULES(KMOD, [ libkmod >= 15 ],
281 [AC_DEFINE(HAVE_KMOD, 1, [Define if kmod is available])],
282 AC_MSG_ERROR([*** kmod version >= 15 not found]))
283 fi
284 if test "x$have_kmod" = xno -a "x$enable_kmod" = xyes; then
285 AC_MSG_ERROR([*** kmod support requested, but libraries not found])
286 fi
287 fi
288 AM_CONDITIONAL(HAVE_KMOD, [test "$have_kmod" = "yes"])
289
290 # ------------------------------------------------------------------------------
291 have_blkid=no
292 AC_ARG_ENABLE(blkid, AS_HELP_STRING([--disable-blkid], [disable blkid support]))
293 if test "x$enable_blkid" != "xno"; then
294 PKG_CHECK_MODULES(BLKID, [ blkid >= 2.20 ],
295 [AC_DEFINE(HAVE_BLKID, 1, [Define if blkid is available]) have_blkid=yes], have_blkid=no)
296 if test "x$have_blkid" = xno -a "x$enable_blkid" = xyes; then
297 AC_MSG_ERROR([*** blkid support requested but libraries not found])
298 fi
299 fi
300 AM_CONDITIONAL(HAVE_BLKID, [test "$have_blkid" = "yes"])
301
302 # ------------------------------------------------------------------------------
303 have_ima=yes
304 AC_ARG_ENABLE([ima], AS_HELP_STRING([--disable-ima],[Disable optional IMA support]),
305 [case "${enableval}" in
306 yes) have_ima=yes ;;
307 no) have_ima=no ;;
308 *) AC_MSG_ERROR(bad value ${enableval} for --disable-ima) ;;
309 esac],
310 [have_ima=yes])
311
312 if test "x${have_ima}" != xno ; then
313 AC_DEFINE(HAVE_IMA, 1, [Define if IMA is available])
314 fi
315
316 # ------------------------------------------------------------------------------
317 have_chkconfig=yes
318 AC_ARG_ENABLE([chkconfig], AS_HELP_STRING([--disable-chkconfig],[Disable optional chkconfig support]),
319 [case "${enableval}" in
320 yes) have_chkconfig=yes ;;
321 no) have_chkconfig=no ;;
322 *) AC_MSG_ERROR(bad value ${enableval} for --disable-chkconfig) ;;
323 esac],
324 [AC_PATH_PROG(CHKCONFIG, chkconfig)
325 if test -z "$CHKCONFIG"; then
326 have_chkconfig=no
327 else
328 have_chkconfig=yes
329 fi])
330
331 if test "x${have_chkconfig}" != xno ; then
332 AC_DEFINE(HAVE_CHKCONFIG, 1, [Define if CHKCONFIG is available])
333 fi
334
335 # ------------------------------------------------------------------------------
336 have_selinux=no
337 AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
338 if test "x$enable_selinux" != "xno"; then
339 PKG_CHECK_MODULES([SELINUX], [libselinux >= 2.1.9],
340 [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available]) have_selinux=yes], have_selinux=no)
341 if test "x$have_selinux" = xno -a "x$enable_selinux" = xyes; then
342 AC_MSG_ERROR([*** SELinux support requested but libraries not found])
343 fi
344 fi
345 AM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"])
346
347 AC_ARG_WITH(debug-shell,
348 AS_HELP_STRING([--with-debug-shell=PATH],
349 [Path to debug shell binary]),
350 [SUSHELL="$withval"],[
351 AS_IF([test "x${have_selinux}" != "xno"], [SUSHELL="/sbin/sushell"] , [SUSHELL="/bin/sh"])])
352
353 AC_SUBST(SUSHELL)
354
355 AC_ARG_WITH([debug-tty],
356 AS_HELP_STRING([--with-debug-tty=PATH],
357 [Specify the tty device for debug shell]),
358 [DEBUGTTY="$withval"],
359 [DEBUGTTY=/dev/tty9])
360
361 AC_SUBST(DEBUGTTY)
362
363 # ------------------------------------------------------------------------------
364 have_xz=no
365 AC_ARG_ENABLE(xz, AS_HELP_STRING([--disable-xz], [Disable optional XZ support]))
366 if test "x$enable_xz" != "xno"; then
367 PKG_CHECK_MODULES(XZ, [ liblzma ],
368 [AC_DEFINE(HAVE_XZ, 1, [Define if XZ is available]) have_xz=yes], have_xz=no)
369 if test "x$have_xz" = xno -a "x$enable_xz" = xyes; then
370 AC_MSG_ERROR([*** Xz support requested but libraries not found])
371 fi
372 fi
373 AM_CONDITIONAL(HAVE_XZ, [test "$have_xz" = "yes"])
374
375 # ------------------------------------------------------------------------------
376 AC_ARG_ENABLE([tcpwrap],
377 AS_HELP_STRING([--disable-tcpwrap],[Disable optional TCP wrappers support]),
378 [case "${enableval}" in
379 yes) have_tcpwrap=yes ;;
380 no) have_tcpwrap=no ;;
381 *) AC_MSG_ERROR(bad value ${enableval} for --disable-tcpwrap) ;;
382 esac],
383 [have_tcpwrap=auto])
384
385 if test "x${have_tcpwrap}" != xno ; then
386 ACX_LIBWRAP
387 if test "x${LIBWRAP_LIBS}" = x ; then
388 if test "x$have_tcpwrap" = xyes ; then
389 AC_MSG_ERROR([*** TCP wrappers support not found.])
390 fi
391 have_tcpwrap=no
392 else
393 have_tcpwrap=yes
394 fi
395 else
396 LIBWRAP_LIBS=
397 fi
398 AC_SUBST(LIBWRAP_LIBS)
399
400 # ------------------------------------------------------------------------------
401 AC_ARG_ENABLE([pam],
402 AS_HELP_STRING([--disable-pam],[Disable optional PAM support]),
403 [case "${enableval}" in
404 yes) have_pam=yes ;;
405 no) have_pam=no ;;
406 *) AC_MSG_ERROR(bad value ${enableval} for --disable-pam) ;;
407 esac],
408 [have_pam=auto])
409
410 if test "x${have_pam}" != xno ; then
411 AC_CHECK_HEADERS(
412 [security/pam_modules.h security/pam_modutil.h security/pam_ext.h],
413 [have_pam=yes],
414 [if test "x$have_pam" = xyes ; then
415 AC_MSG_ERROR([*** PAM headers not found.])
416 fi])
417
418 AC_CHECK_LIB(
419 [pam],
420 [pam_syslog],
421 [have_pam=yes],
422 [if test "x$have_pam" = xyes ; then
423 AC_MSG_ERROR([*** libpam not found.])
424 fi])
425
426 if test "x$have_pam" = xyes ; then
427 PAM_LIBS="-lpam -lpam_misc"
428 AC_DEFINE(HAVE_PAM, 1, [PAM available])
429 else
430 have_pam=no
431 fi
432 else
433 PAM_LIBS=
434 fi
435 AC_SUBST(PAM_LIBS)
436 AM_CONDITIONAL([HAVE_PAM], [test "x$have_pam" != xno])
437
438 # ------------------------------------------------------------------------------
439 AC_ARG_ENABLE([acl],
440 AS_HELP_STRING([--disable-acl],[Disable optional ACL support]),
441 [case "${enableval}" in
442 yes) have_acl=yes ;;
443 no) have_acl=no ;;
444 *) AC_MSG_ERROR(bad value ${enableval} for --disable-acl) ;;
445 esac],
446 [have_acl=auto])
447
448 if test "x${have_acl}" != xno ; then
449 AC_CHECK_HEADERS(
450 [sys/acl.h acl/libacl.h],
451 [have_acl=yes],
452 [if test "x$have_acl" = xyes ; then
453 AC_MSG_ERROR([*** ACL headers not found.])
454 fi])
455
456 AC_CHECK_LIB(
457 [acl],
458 [acl_get_file],
459 [have_acl=yes],
460 [if test "x$have_acl" = xyes ; then
461 AC_MSG_ERROR([*** libacl not found.])
462 fi])
463
464 if test "x$have_acl" = xyes ; then
465 ACL_LIBS="-lacl"
466 AC_DEFINE(HAVE_ACL, 1, [ACL available])
467 else
468 have_acl=no
469 fi
470 else
471 ACL_LIBS=
472 fi
473 AC_SUBST(ACL_LIBS)
474 AM_CONDITIONAL([HAVE_ACL], [test "x$have_acl" != xno])
475
476 # ------------------------------------------------------------------------------
477 AC_ARG_ENABLE([xattr],
478 AS_HELP_STRING([--disable-xattr],[Disable optional XATTR support]),
479 [case "${enableval}" in
480 yes) have_xattr=yes ;;
481 no) have_xattr=no ;;
482 *) AC_MSG_ERROR(bad value ${enableval} for --disable-xattr) ;;
483 esac],
484 [have_xattr=auto])
485
486 if test "x${have_xattr}" != xno ; then
487 AC_CHECK_HEADERS(
488 [attr/xattr.h],
489 [have_xattr=yes],
490 [if test "x$have_xattr" = xyes ; then
491 AC_MSG_ERROR([*** XATTR headers not found.])
492 fi])
493
494 AC_CHECK_LIB(
495 [attr],
496 [fsetxattr],
497 [have_xattr=yes],
498 [if test "x$have_xattr" = xyes ; then
499 AC_MSG_ERROR([*** libattr not found.])
500 fi])
501
502 if test "x$have_xattr" = xyes ; then
503 XATTR_LIBS="-lattr"
504 AC_DEFINE(HAVE_XATTR, 1, [XATTR available])
505 else
506 have_xattr=no
507 fi
508 else
509 XATTR_LIBS=
510 fi
511 AC_SUBST(XATTR_LIBS)
512 AM_CONDITIONAL([HAVE_XATTR], [test "x$have_xattr" != xno])
513
514 # ------------------------------------------------------------------------------
515 AC_ARG_ENABLE([smack], AS_HELP_STRING([--disable-smack],[Disable optional SMACK support]),
516 [case "${enableval}" in
517 yes) have_smack=yes ;;
518 no) have_smack=no ;;
519 *) AC_MSG_ERROR(bad value ${enableval} for --disable-smack) ;;
520 esac],
521 [have_smack=auto])
522
523 if test "x${have_xattr}" = xno; then
524 if test "x${have_smack}" = xyes; then
525 AC_MSG_ERROR(SMACK requires xattr support)
526 else
527 have_smack=no
528 fi
529 else
530 if test "x${have_smack}" = xauto; then
531 have_smack=yes
532 fi
533 fi
534
535 AC_ARG_WITH(smack-run-label,
536 AS_HELP_STRING([--with-smack-run-label=STRING],
537 [run systemd --system with a specific SMACK label]),
538 [AC_DEFINE_UNQUOTED(SMACK_RUN_LABEL, ["$withval"], [Run with a smack label])],
539 [])
540
541 if test "x${have_smack}" = xyes ; then
542 AC_DEFINE(HAVE_SMACK, 1, [Define if SMACK is available])
543 fi
544
545 # ------------------------------------------------------------------------------
546 AC_ARG_ENABLE([gcrypt],
547 AS_HELP_STRING([--disable-gcrypt],[Disable optional GCRYPT support]),
548 [case "${enableval}" in
549 yes) have_gcrypt=yes ;;
550 no) have_gcrypt=no ;;
551 *) AC_MSG_ERROR(bad value ${enableval} for --disable-gcrypt) ;;
552 esac],
553 [have_gcrypt=auto])
554
555 if test "x${have_gcrypt}" != xno ; then
556 AM_PATH_LIBGCRYPT(
557 [1.4.5],
558 [have_gcrypt=yes],
559 [if test "x$have_gcrypt" = xyes ; then
560 AC_MSG_ERROR([*** GCRYPT headers not found.])
561 fi])
562
563 if test "x$have_gcrypt" = xyes ; then
564 GCRYPT_LIBS="$LIBGCRYPT_LIBS"
565 GCRYPT_CFLAGS="$LIBGCRYPT_CFLAGS"
566 AC_DEFINE(HAVE_GCRYPT, 1, [GCRYPT available])
567 else
568 have_gcrypt=no
569 fi
570 else
571 GCRYPT_LIBS=
572 GCRYPT_CFLAGS=
573 fi
574 AC_SUBST(GCRYPT_LIBS)
575 AC_SUBST(GCRYPT_CFLAGS)
576 AM_CONDITIONAL([HAVE_GCRYPT], [test "x$have_gcrypt" != xno])
577
578 # ------------------------------------------------------------------------------
579 AC_ARG_ENABLE([audit],
580 AS_HELP_STRING([--disable-audit],[Disable optional AUDIT support]),
581 [case "${enableval}" in
582 yes) have_audit=yes ;;
583 no) have_audit=no ;;
584 *) AC_MSG_ERROR(bad value ${enableval} for --disable-audit) ;;
585 esac],
586 [have_audit=auto])
587
588 if test "x${have_audit}" != xno ; then
589 AC_CHECK_HEADERS(
590 [libaudit.h],
591 [have_audit=yes],
592 [if test "x$have_audit" = xyes ; then
593 AC_MSG_ERROR([*** AUDIT headers not found.])
594 fi])
595
596 AC_CHECK_LIB(
597 [audit],
598 [audit_open],
599 [have_audit=yes],
600 [if test "x$have_audit" = xyes ; then
601 AC_MSG_ERROR([*** libaudit not found.])
602 fi])
603
604 if test "x$have_audit" = xyes ; then
605 AUDIT_LIBS="-laudit"
606 AC_DEFINE(HAVE_AUDIT, 1, [AUDIT available])
607 else
608 have_audit=no
609 fi
610 else
611 AUDIT_LIBS=
612 fi
613 AC_SUBST(AUDIT_LIBS)
614
615 # ------------------------------------------------------------------------------
616 have_libcryptsetup=no
617 AC_ARG_ENABLE(libcryptsetup, AS_HELP_STRING([--disable-libcryptsetup], [disable libcryptsetup tools]))
618 if test "x$enable_libcryptsetup" != "xno"; then
619 PKG_CHECK_MODULES(LIBCRYPTSETUP, [ libcryptsetup >= 1.6.0 ],
620 [AC_DEFINE(HAVE_LIBCRYPTSETUP, 1, [Define if libcryptsetup is available]) have_libcryptsetup=yes], have_libcryptsetup=no)
621 if test "x$have_libcryptsetup" = xno -a "x$enable_libcryptsetup" = xyes; then
622 AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found])
623 fi
624 fi
625 AM_CONDITIONAL(HAVE_LIBCRYPTSETUP, [test "$have_libcryptsetup" = "yes"])
626
627 # ------------------------------------------------------------------------------
628 have_qrencode=no
629 AC_ARG_ENABLE(qrencode, AS_HELP_STRING([--disable-qrencode], [disable qrencode support]))
630 if test "x$enable_qrencode" != "xno"; then
631 PKG_CHECK_MODULES(QRENCODE, [ libqrencode ],
632 [AC_DEFINE(HAVE_QRENCODE, 1, [Define if qrencode is available]) have_qrencode=yes], have_qrencode=no)
633 if test "x$have_qrencode" = xno -a "x$enable_qrencode" = xyes; then
634 AC_MSG_ERROR([*** qrencode support requested but libraries not found])
635 fi
636 fi
637 AM_CONDITIONAL(HAVE_QRENCODE, [test "$have_qrencode" = "yes"])
638
639 # ------------------------------------------------------------------------------
640 have_microhttpd=no
641 AC_ARG_ENABLE(microhttpd, AS_HELP_STRING([--disable-microhttpd], [disable microhttpd support]))
642 if test "x$enable_microhttpd" != "xno"; then
643 PKG_CHECK_MODULES(MICROHTTPD, [libmicrohttpd >= 0.9.5],
644 [AC_DEFINE(HAVE_MICROHTTPD, 1, [Define if microhttpd is available]) have_microhttpd=yes], have_microhttpd=no)
645 if test "x$have_microhttpd" = xno -a "x$enable_microhttpd" = xyes; then
646 AC_MSG_ERROR([*** microhttpd support requested but libraries not found])
647 fi
648 fi
649 AM_CONDITIONAL(HAVE_MICROHTTPD, [test "$have_microhttpd" = "yes"])
650
651 # ------------------------------------------------------------------------------
652 have_binfmt=no
653 AC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool]))
654 if test "x$enable_binfmt" != "xno"; then
655 have_binfmt=yes
656 fi
657 AM_CONDITIONAL(ENABLE_BINFMT, [test "$have_binfmt" = "yes"])
658
659 # ------------------------------------------------------------------------------
660 have_vconsole=no
661 AC_ARG_ENABLE(vconsole, AS_HELP_STRING([--disable-vconsole], [disable vconsole tool]))
662 if test "x$enable_vconsole" != "xno"; then
663 have_vconsole=yes
664 fi
665 AM_CONDITIONAL(ENABLE_VCONSOLE, [test "$have_vconsole" = "yes"])
666
667 # ------------------------------------------------------------------------------
668 have_readahead=no
669 AC_ARG_ENABLE(readahead, AS_HELP_STRING([--disable-readahead], [disable readahead tools]))
670 if test "x$enable_readahead" != "xno"; then
671 have_readahead=yes
672 fi
673 AM_CONDITIONAL(ENABLE_READAHEAD, [test "$have_readahead" = "yes"])
674
675 # ------------------------------------------------------------------------------
676 have_bootchart=no
677 AC_ARG_ENABLE(bootchart, AS_HELP_STRING([--disable-bootchart], [disable bootchart tool]))
678 if test "x$enable_bootchart" != "xno"; then
679 have_bootchart=yes
680 fi
681 AM_CONDITIONAL(ENABLE_BOOTCHART, [test "$have_bootchart" = "yes"])
682
683 # ------------------------------------------------------------------------------
684 have_quotacheck=no
685 AC_ARG_ENABLE(quotacheck, AS_HELP_STRING([--disable-quotacheck], [disable quotacheck tools]))
686 if test "x$enable_quotacheck" != "xno"; then
687 have_quotacheck=yes
688 fi
689 AM_CONDITIONAL(ENABLE_QUOTACHECK, [test "$have_quotacheck" = "yes"])
690
691 # ------------------------------------------------------------------------------
692 have_tmpfiles=no
693 AC_ARG_ENABLE(tmpfiles, AS_HELP_STRING([--disable-tmpfiles], [disable tmpfiles support]))
694 if test "x$enable_tmpfiles" != "xno"; then
695 have_tmpfiles=yes
696 fi
697 AM_CONDITIONAL(ENABLE_TMPFILES, [test "$have_tmpfiles" = "yes"])
698
699 # ------------------------------------------------------------------------------
700 have_randomseed=no
701 AC_ARG_ENABLE(randomseed, AS_HELP_STRING([--disable-randomseed], [disable randomseed tools]))
702 if test "x$enable_randomseed" != "xno"; then
703 have_randomseed=yes
704 fi
705 AM_CONDITIONAL(ENABLE_RANDOMSEED, [test "$have_randomseed" = "yes"])
706
707 # ------------------------------------------------------------------------------
708 have_backlight=no
709 AC_ARG_ENABLE(backlight, AS_HELP_STRING([--disable-backlight], [disable backlight tools]))
710 if test "x$enable_backlight" != "xno"; then
711 have_backlight=yes
712 fi
713 AM_CONDITIONAL(ENABLE_BACKLIGHT, [test "$have_backlight" = "yes"])
714
715 # ------------------------------------------------------------------------------
716 have_rfkill=no
717 AC_ARG_ENABLE(rfkill, AS_HELP_STRING([--disable-rfkill], [disable rfkill tools]))
718 if test "x$enable_rfkill" != "xno"; then
719 have_rfkill=yes
720 fi
721 AM_CONDITIONAL(ENABLE_RFKILL, [test "$have_rfkill" = "yes"])
722
723 # ------------------------------------------------------------------------------
724 have_logind=no
725 AC_ARG_ENABLE(logind, AS_HELP_STRING([--disable-logind], [disable login daemon]))
726 if test "x$enable_logind" != "xno"; then
727 have_logind=yes
728 fi
729 AM_CONDITIONAL(ENABLE_LOGIND, [test "$have_logind" = "yes"])
730 AS_IF([test "$have_logind" = "yes"], [ AC_DEFINE(HAVE_LOGIND, [1], [Logind support available]) ])
731
732 # ------------------------------------------------------------------------------
733 have_machined=no
734 AC_ARG_ENABLE(machined, AS_HELP_STRING([--disable-machined], [disable machine daemon]))
735 if test "x$enable_machined" != "xno"; then
736 have_machined=yes
737 fi
738 AM_CONDITIONAL(ENABLE_MACHINED, [test "$have_machined" = "yes"])
739 AS_IF([test "$have_machined" = "yes"], [ AC_DEFINE(HAVE_MACHINED, [1], [Machined support available]) ])
740
741 # ------------------------------------------------------------------------------
742 have_hostnamed=no
743 AC_ARG_ENABLE(hostnamed, AS_HELP_STRING([--disable-hostnamed], [disable hostname daemon]))
744 if test "x$enable_hostnamed" != "xno"; then
745 have_hostnamed=yes
746 fi
747 AM_CONDITIONAL(ENABLE_HOSTNAMED, [test "$have_hostnamed" = "yes"])
748
749 # ------------------------------------------------------------------------------
750 have_timedated=no
751 AC_ARG_ENABLE(timedated, AS_HELP_STRING([--disable-timedated], [disable timedate daemon]))
752 if test "x$enable_timedated" != "xno"; then
753 have_timedated=yes
754 fi
755 AM_CONDITIONAL(ENABLE_TIMEDATED, [test "$have_timedated" = "yes"])
756
757 # ------------------------------------------------------------------------------
758 have_localed=no
759 AC_ARG_ENABLE(localed, AS_HELP_STRING([--disable-localed], [disable locale daemon]))
760 if test "x$enable_localed" != "xno"; then
761 have_localed=yes
762 fi
763 AM_CONDITIONAL(ENABLE_LOCALED, [test "$have_localed" = "yes"])
764
765 # ------------------------------------------------------------------------------
766 have_coredump=no
767 AC_ARG_ENABLE(coredump, AS_HELP_STRING([--disable-coredump], [disable coredump hook]))
768 if test "x$enable_coredump" != "xno"; then
769 have_coredump=yes
770 fi
771 AM_CONDITIONAL(ENABLE_COREDUMP, [test "$have_coredump" = "yes"])
772
773 # ------------------------------------------------------------------------------
774 have_polkit=no
775 AC_ARG_ENABLE(polkit, AS_HELP_STRING([--disable-polkit], [disable PolicyKit support]))
776 if test "x$enable_polkit" != "xno"; then
777 AC_DEFINE(ENABLE_POLKIT, 1, [Define if PolicyKit support is to be enabled])
778 have_polkit=yes
779 fi
780 AM_CONDITIONAL(ENABLE_POLKIT, [test "x$have_polkit" = "xyes"])
781
782 # ------------------------------------------------------------------------------
783 AC_ARG_ENABLE(networkd, AS_HELP_STRING([--disable-networkd], [disable networkd]))
784 if test "x$enable_networkd" != "xno"; then
785 AC_DEFINE(ENABLE_NETWORKD, 1, [Define if networkd support is to be enabled])
786 have_networkd=yes
787 fi
788 AM_CONDITIONAL(ENABLE_NETWORKD, [test "x$have_networkd" = "xyes"])
789
790 # ------------------------------------------------------------------------------
791 have_efi=no
792 AC_ARG_ENABLE(efi, AS_HELP_STRING([--disable-efi], [disable EFI support]))
793 if test "x$enable_efi" != "xno"; then
794 AC_DEFINE(ENABLE_EFI, 1, [Define if EFI support is to be enabled])
795 have_efi=yes
796 fi
797 AM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"])
798
799 # ------------------------------------------------------------------------------
800 have_multi_seat_x=no
801 AC_ARG_ENABLE(multi_seat_x, AS_HELP_STRING([--disable-multi-seat-x], [do not build multi-seat-x]))
802 if test "x$enable_multi_seat_x" != "xno"; then
803 have_multi_seat_x=yes
804 fi
805 AM_CONDITIONAL(ENABLE_MULTI_SEAT_X, [test "$have_multi_seat_x" = "yes"])
806
807 # ------------------------------------------------------------------------------
808 have_kdbus=no
809 AC_ARG_ENABLE(kdbus, AS_HELP_STRING([--enable-kdbus], [do connect to kdbus by default]))
810 if test "x$enable_kdbus" == "xyes"; then
811 AC_DEFINE(ENABLE_KDBUS, 1, [Define if kdbus support is to be enabled])
812 have_kdbus=yes
813 fi
814 AM_CONDITIONAL(ENABLE_KDBUS, [test "$have_kdbus" = "yes"])
815
816 # ------------------------------------------------------------------------------
817 AC_ARG_WITH(rc-local-script-path-start,
818 AS_HELP_STRING([--with-rc-local-script-path-start=PATH],
819 [Path to /etc/rc.local]),
820 [RC_LOCAL_SCRIPT_PATH_START="$withval"],
821 [RC_LOCAL_SCRIPT_PATH_START="/etc/rc.local"])
822
823 AC_ARG_WITH(rc-local-script-path-stop,
824 AS_HELP_STRING([--with-rc-local-script-path-stop=PATH],
825 [Path to /usr/sbin/halt.local]),
826 [RC_LOCAL_SCRIPT_PATH_STOP="$withval"],
827 [RC_LOCAL_SCRIPT_PATH_STOP="/usr/sbin/halt.local"])
828
829 AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_START, ["$RC_LOCAL_SCRIPT_PATH_START"], [Path of /etc/rc.local script])
830 AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_STOP, ["$RC_LOCAL_SCRIPT_PATH_STOP"], [Path of /usr/sbin/halt.local script])
831
832 AC_SUBST(RC_LOCAL_SCRIPT_PATH_START)
833 AC_SUBST(RC_LOCAL_SCRIPT_PATH_STOP)
834
835 # ------------------------------------------------------------------------------
836 AC_ARG_WITH(kbd-loadkeys,
837 AS_HELP_STRING([--with-kbd-loadkeys=PATH],
838 [Path to loadkeys]),
839 [KBD_LOADKEYS="$withval"],
840 [KBD_LOADKEYS="/usr/bin/loadkeys"])
841
842 AC_ARG_WITH(kbd-setfont,
843 AS_HELP_STRING([--with-kbd-setfont=PATH],
844 [Path to setfont]),
845 [KBD_SETFONT="$withval"],
846 [KBD_SETFONT="/usr/bin/setfont"])
847
848 AC_DEFINE_UNQUOTED(KBD_LOADKEYS, ["$KBD_LOADKEYS"], [Path of loadkeys])
849 AC_DEFINE_UNQUOTED(KBD_SETFONT, ["$KBD_SETFONT"], [Path of setfont])
850
851 AC_SUBST(KBD_LOADKEYS)
852 AC_SUBST(KBD_SETFONT)
853
854 AC_ARG_WITH(telinit,
855 AS_HELP_STRING([--with-telinit=PATH],
856 [Path to telinit]),
857 [TELINIT="$withval"],
858 [TELINIT="/lib/sysvinit/telinit"])
859
860 AC_DEFINE_UNQUOTED(TELINIT, ["$TELINIT"], [Path to telinit])
861
862 AC_SUBST(TELINIT)
863
864 AC_CHECK_HEADERS_ONCE([valgrind/memcheck.h valgrind/valgrind.h])
865
866 # ------------------------------------------------------------------------------
867 have_myhostname=no
868 AC_ARG_ENABLE(myhostname, AS_HELP_STRING([--disable-myhostname], [disable nss-myhostname support]))
869 if test "x$enable_myhostname" != "xno"; then
870 AC_HEADER_STDC
871 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])
872
873 AC_C_CONST
874 AC_TYPE_SIZE_T
875 AC_HEADER_TIME
876
877 AC_FUNC_MALLOC
878 AC_FUNC_SELECT_ARGTYPES
879 AC_CHECK_FUNCS([gethostbyaddr gethostbyname gettimeofday inet_ntoa memset select socket strcspn strdup strerror strncasecmp strcasecmp strspn])
880
881 have_myhostname=yes
882 fi
883 AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"])
884
885 # ------------------------------------------------------------------------------
886 AC_ARG_WITH(firmware-path,
887 AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]],
888 [Firmware search path (default="")]),
889 [], [with_firmware_path=""])
890 OLD_IFS=$IFS
891 IFS=:
892 for i in $with_firmware_path; do
893 if test "x${FIRMWARE_PATH}" = "x"; then
894 FIRMWARE_PATH="\\\"${i}/\\\""
895 else
896 FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\""
897 fi
898 done
899 IFS=$OLD_IFS
900 AC_SUBST(FIRMWARE_PATH)
901 AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ])
902 AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"])
903
904 # ------------------------------------------------------------------------------
905 AC_ARG_ENABLE([gudev],
906 AS_HELP_STRING([--disable-gudev], [disable Gobject libudev support @<:@default=enabled@:>@]),
907 [], [enable_gudev=yes])
908 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]) ])
909 AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"])
910 AS_IF([test "x$enable_gudev" = "xyes"], [ AC_DEFINE(HAVE_GLIB, 1, [Define if glib is available]) ])
911
912 # ------------------------------------------------------------------------------
913 have_manpages=no
914 AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages]))
915 AS_IF([test "x$enable_manpages" != xno], [
916 AS_IF([test "x$enable_manpages" = xyes -a "x$XSLTPROC" = x], [
917 AC_MSG_ERROR([*** Manpages requested but xsltproc not found])
918 ])
919 AS_IF([test "x$XSLTPROC" != x], [have_manpages=yes])
920 ])
921 AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
922
923 # ------------------------------------------------------------------------------
924
925 # Location of the init scripts as mandated by LSB
926 SYSTEM_SYSVINIT_PATH=/etc/init.d
927 SYSTEM_SYSVRCND_PATH=/etc/rc.d
928 M4_DEFINES=
929
930 AC_ARG_WITH([sysvinit-path],
931 [AS_HELP_STRING([--with-sysvinit-path=PATH],
932 [Specify the path to where the SysV init scripts are located])],
933 [SYSTEM_SYSVINIT_PATH="$withval"],
934 [])
935
936 AC_ARG_WITH([sysvrcnd-path],
937 [AS_HELP_STRING([--with-sysvrcnd-path=PATH],
938 [Specify the path to the base directory for the SysV rcN.d directories])],
939 [SYSTEM_SYSVRCND_PATH="$withval"],
940 [])
941
942 if test "x${SYSTEM_SYSVINIT_PATH}" != "x" -a "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
943 AC_DEFINE(HAVE_SYSV_COMPAT, [], [SysV init scripts and rcN.d links are supported.])
944 SYSTEM_SYSV_COMPAT="yes"
945 M4_DEFINES="$M4_DEFINES -DHAVE_SYSV_COMPAT"
946 elif test "x${SYSTEM_SYSVINIT_PATH}" != "x" -o "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
947 AC_MSG_ERROR([*** You need both --with-sysvinit-path=PATH and --with-sysvrcnd-path=PATH to enable SysV compatibility support, or both empty to disable it.])
948 else
949 SYSTEM_SYSV_COMPAT="no"
950 fi
951
952 AC_SUBST(SYSTEM_SYSVINIT_PATH)
953 AC_SUBST(SYSTEM_SYSVRCND_PATH)
954 AC_SUBST(M4_DEFINES)
955
956 AM_CONDITIONAL(HAVE_SYSV_COMPAT, test "$SYSTEM_SYSV_COMPAT" = "yes")
957
958 AC_ARG_WITH([tty-gid],
959 [AS_HELP_STRING([--with-tty-gid=GID],
960 [Specify the numeric GID of the 'tty' group])],
961 [AC_DEFINE_UNQUOTED(TTY_GID, [$withval], [GID of the 'tty' group])],
962 [])
963
964 AC_ARG_WITH([dbuspolicydir],
965 AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
966 [],
967 [with_dbuspolicydir=$($PKG_CONFIG --variable=sysconfdir dbus-1)/dbus-1/system.d])
968
969 AC_ARG_WITH([dbussessionservicedir],
970 AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]),
971 [],
972 [with_dbussessionservicedir=$($PKG_CONFIG --variable=session_bus_services_dir dbus-1)])
973
974 AC_ARG_WITH([dbussystemservicedir],
975 AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]),
976 [],
977 [with_dbussystemservicedir=$(readlink -m $($PKG_CONFIG --variable=session_bus_services_dir dbus-1)/../system-services)])
978
979 AC_ARG_WITH([dbusinterfacedir],
980 AS_HELP_STRING([--with-dbusinterfacedir=DIR], [D-Bus interface directory]),
981 [],
982 [with_dbusinterfacedir=$(readlink -m $($PKG_CONFIG --variable=session_bus_services_dir dbus-1)/../interfaces)])
983
984 AC_ARG_WITH([bashcompletiondir],
985 AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]),
986 [],
987 [AS_IF([$($PKG_CONFIG --exists bash-completion)], [
988 with_bashcompletiondir=$($PKG_CONFIG --variable=completionsdir bash-completion)
989 ] , [
990 with_bashcompletiondir=${datadir}/bash-completion/completions
991 ])])
992
993 AC_ARG_WITH([zshcompletiondir],
994 AS_HELP_STRING([--with-zshcompletiondir=DIR], [Zsh completions directory]),
995 [], [with_zshcompletiondir=${datadir}/zsh/site-functions])
996
997 AC_ARG_WITH([rootprefix],
998 AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
999 [], [with_rootprefix=${ac_default_prefix}])
1000
1001 AC_ARG_WITH([rootlibdir],
1002 AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]),
1003 [],
1004 [with_rootlibdir=${libdir}])
1005
1006 AC_ARG_WITH([pamlibdir],
1007 AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
1008 [],
1009 [with_pamlibdir=${with_rootlibdir}/security])
1010
1011 AC_ARG_WITH([pamconfdir],
1012 AS_HELP_STRING([--with-pamconfdir=DIR], [Directory for PAM configuration]),
1013 [],
1014 [with_pamconfdir=${sysconfdir}/pam.d])
1015
1016 AC_ARG_ENABLE([split-usr],
1017 AS_HELP_STRING([--enable-split-usr], [Assume that /bin, /sbin aren\'t symlinks into /usr]),
1018 [],
1019 [AS_IF([test "x${ac_default_prefix}" != "x${with_rootprefix}"], [
1020 enable_split_usr=yes
1021 ], [
1022 enable_split_usr=no
1023 ])])
1024
1025 AS_IF([test "x${enable_split_usr}" = "xyes"], [
1026 AC_DEFINE(HAVE_SPLIT_USR, 1, [Define if /bin, /sbin aren't symlinks into /usr])
1027 ])
1028
1029 # Work around intltoolize and gtk-doc problems in VPATH builds
1030 AM_CONDITIONAL([ENABLE_GTK_DOC_TESTS], [test "x$0" = "x./configure"],
1031 [Define to do gtk-doc tests])
1032 AS_IF([test "x$0" != "x./configure"], [
1033 AC_SUBST([INTLTOOL_UPDATE], [/bin/true])
1034 ])
1035
1036 AC_ARG_ENABLE(tests,
1037 [AC_HELP_STRING([--disable-tests], [disable tests])],
1038 enable_tests=$enableval, enable_tests=yes)
1039 AM_CONDITIONAL(ENABLE_TESTS, [test x$enable_tests = xyes])
1040
1041 AC_SUBST([dbuspolicydir], [$with_dbuspolicydir])
1042 AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir])
1043 AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
1044 AC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir])
1045 AC_SUBST([bashcompletiondir], [$with_bashcompletiondir])
1046 AC_SUBST([zshcompletiondir], [$with_zshcompletiondir])
1047 AC_SUBST([pamlibdir], [$with_pamlibdir])
1048 AC_SUBST([pamconfdir], [$with_pamconfdir])
1049 AC_SUBST([rootprefix], [$with_rootprefix])
1050 AC_SUBST([rootlibdir], [$with_rootlibdir])
1051
1052 AC_CONFIG_FILES([
1053 Makefile po/Makefile.in
1054 docs/libudev/Makefile
1055 docs/libudev/version.xml
1056 docs/gudev/Makefile
1057 docs/gudev/version.xml
1058 ])
1059
1060 AC_OUTPUT
1061 AC_MSG_RESULT([
1062 $PACKAGE_NAME $VERSION
1063
1064 libcryptsetup: ${have_libcryptsetup}
1065 tcpwrap: ${have_tcpwrap}
1066 PAM: ${have_pam}
1067 AUDIT: ${have_audit}
1068 IMA: ${have_ima}
1069 SELinux: ${have_selinux}
1070 SMACK: ${have_smack}
1071 XZ: ${have_xz}
1072 ACL: ${have_acl}
1073 XATTR: ${have_xattr}
1074 GCRYPT: ${have_gcrypt}
1075 QRENCODE: ${have_qrencode}
1076 MICROHTTPD: ${have_microhttpd}
1077 CHKCONFIG: ${have_chkconfig}
1078 binfmt: ${have_binfmt}
1079 vconsole: ${have_vconsole}
1080 readahead: ${have_readahead}
1081 bootchart: ${have_bootchart}
1082 quotacheck: ${have_quotacheck}
1083 tmpfiles: ${have_tmpfiles}
1084 randomseed: ${have_randomseed}
1085 backlight: ${have_backlight}
1086 rfkill: ${have_rfkill}
1087 logind: ${have_logind}
1088 machined: ${have_machined}
1089 hostnamed: ${have_hostnamed}
1090 timedated: ${have_timedated}
1091 localed: ${have_localed}
1092 coredump: ${have_coredump}
1093 polkit: ${have_polkit}
1094 efi: ${have_efi}
1095 kmod: ${have_kmod}
1096 blkid: ${have_blkid}
1097 nss-myhostname: ${have_myhostname}
1098 gudev: ${enable_gudev}
1099 gintrospection: ${enable_introspection}
1100 multi-seat-x: ${have_multi_seat_x}
1101 kdbus: ${have_kdbus}
1102 Python: ${have_python}
1103 Python Headers: ${have_python_devel}
1104 man pages: ${have_manpages}
1105 gtk-doc: ${enable_gtk_doc}
1106 test coverage: ${have_coverage}
1107 Split /usr: ${enable_split_usr}
1108 SysV compatibility: ${SYSTEM_SYSV_COMPAT}
1109
1110 prefix: ${prefix}
1111 rootprefix: ${with_rootprefix}
1112 sysconf dir: ${sysconfdir}
1113 datarootdir: ${datarootdir}
1114 includedir: ${includedir}
1115 include_prefix: ${INCLUDE_PREFIX}
1116 lib dir: ${libdir}
1117 rootlib dir: ${with_rootlibdir}
1118 SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
1119 SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
1120 Build Python: ${PYTHON}
1121 Installation Python: ${PYTHON_BINARY}
1122 sphinx binary: ${SPHINX_BUILD}
1123 firmware path: ${FIRMWARE_PATH}
1124 PAM modules dir: ${with_pamlibdir}
1125 PAM configuration dir: ${with_pamconfdir}
1126 D-Bus policy dir: ${with_dbuspolicydir}
1127 D-Bus session dir: ${with_dbussessionservicedir}
1128 D-Bus system dir: ${with_dbussystemservicedir}
1129 D-Bus interfaces dir: ${with_dbusinterfacedir}
1130 Bash completions dir: ${with_bashcompletiondir}
1131 Zsh completions dir: ${with_zshcompletiondir}
1132 Extra start script: ${RC_LOCAL_SCRIPT_PATH_START}
1133 Extra stop script: ${RC_LOCAL_SCRIPT_PATH_STOP}
1134 Debug shell: ${SUSHELL} @ ${DEBUGTTY}
1135
1136 CFLAGS: ${OUR_CFLAGS} ${CFLAGS}
1137 CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS}
1138 LDFLAGS: ${OUR_LDFLAGS} ${LDFLAGS}
1139 PYTHON_CFLAGS: ${PYTHON_DEVEL_CFLAGS}
1140 PYTHON_LIBS: ${PYTHON_DEVEL_LIBS}
1141 ])