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