]> git.ipfire.org Git - thirdparty/systemd.git/blame - configure.ac
man: use <literal> not <filename> for suffixes
[thirdparty/systemd.git] / configure.ac
CommitLineData
fb0951b0 1#
47be870b
LP
2# This file is part of systemd.
3#
3e214785
KS
4# Copyright 2010-2012 Lennart Poettering
5# Copyright 2010-2012 Kay Sievers
47be870b
LP
6#
7# systemd is free software; you can redistribute it and/or modify it
5430f7f2
LP
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
47be870b
LP
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
5430f7f2 15# Lesser General Public License for more details.
47be870b 16#
5430f7f2 17# You should have received a copy of the GNU Lesser General Public License
47be870b
LP
18# along with systemd; If not, see <http://www.gnu.org/licenses/>.
19
4e949c11
JJ
20AC_PREREQ([2.64])
21
22AC_INIT([systemd],
00aa832b 23 [205],
4e949c11
JJ
24 [http://bugs.freedesktop.org/enter_bug.cgi?product=systemd],
25 [systemd],
26 [http://www.freedesktop.org/wiki/Software/systemd])
47be870b 27
78a825f2 28AC_CONFIG_SRCDIR([src/core/main.c])
47be870b
LP
29AC_CONFIG_MACRO_DIR([m4])
30AC_CONFIG_HEADERS([config.h])
a80db8bd
JJ
31AC_CONFIG_AUX_DIR([build-aux])
32
4db6d587 33AC_USE_SYSTEM_EXTENSIONS
907dd195 34AC_SYS_LARGEFILE
eb7bbee6 35AC_PREFIX_DEFAULT([/usr])
bbd9b8c2 36AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects check-news])
3e214785 37AM_SILENT_RULES([yes])
47be870b 38AC_CANONICAL_HOST
22be093f 39AC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.])
d59d0a2b 40AS_IF([test "x$host_cpu" = "xmips" || test "x$host_cpu" = "xmipsel" ||
41 test "x$host_cpu" = "xmips64" || test "x$host_cpu" = "xmips64el"],
42 [AC_DEFINE(ARCH_MIPS, [], [Whether on mips arch])])
47be870b 43
3e214785 44LT_PREREQ(2.2)
8666abb4 45LT_INIT([disable-static])
47be870b 46
5e63ce78 47AS_IF([test "x$enable_static" = "xyes"], [AC_MSG_ERROR([--enable-static is not supported by systemd])])
3d585edb 48AS_IF([test "x$enable_largefile" = "xno"], [AC_MSG_ERROR([--disable-largefile is not supported by systemd])])
5e63ce78 49
1c7dde3e
BN
50# i18n stuff for the PolicyKit policy files
51IT_PROG_INTLTOOL([0.40.0])
52
53GETTEXT_PACKAGE=systemd
54AC_SUBST(GETTEXT_PACKAGE)
55
e9da3678
LP
56AC_PROG_MKDIR_P
57AC_PROG_LN_S
58AC_PROG_SED
3ce4fad8 59AC_PROG_GREP
f975e971 60AC_PROG_AWK
e9da3678 61
47be870b
LP
62AC_PROG_CC
63AC_PROG_CC_C99
64AM_PROG_CC_C_O
65AC_PROG_GCC_TRADITIONAL
47be870b 66
3e214785 67AC_PATH_PROG([M4], [m4])
fe1fed02 68AC_PATH_PROG([XSLTPROC], [xsltproc])
92ec4495 69
86b2e20a
LP
70AC_PATH_PROG([QUOTAON], [quotaon], [/usr/sbin/quotaon])
71AC_PATH_PROG([QUOTACHECK], [quotacheck], [/usr/sbin/quotacheck])
b51fc639 72
86b2e20a
LP
73AC_PATH_PROG([SETCAP], [setcap], [/usr/sbin/setcap])
74
c1c02e07 75AC_PATH_PROG([KILL], [kill], [/usr/bin/kill])
96ede260 76
edeb68c5
TG
77AC_PATH_PROG([KMOD], [kmod], [/usr/bin/kmod])
78
80a5cbac 79# gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line
b37250d6
ZJS
80m4_ifdef([GTK_DOC_CHECK], [
81GTK_DOC_CHECK([1.18],[--flavour no-tmpl])],
6581f00f
ZJS
82 [AM_CONDITIONAL([ENABLE_GTK_DOC], [false])
83 enable_gtk_doc=no])
92ec4495 84
fe1fed02
ZJS
85AS_IF([test "x$enable_gtk_doc" = "xyes" -a "x$XSLTPROC" = x], [
86 AC_MSG_ERROR([*** GTK doc requested but xsltproc not found])
87])
88
6e92b23f 89m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [
0eaeca1f 90GOBJECT_INTROSPECTION_CHECK([1.31.1])
d66ee73a
ZJS
91], [
92 AM_CONDITIONAL([HAVE_INTROSPECTION], [false])
93 enable_introspection=no])
3e214785 94
ac714a78
MJ
95AC_CHECK_TOOL(OBJCOPY, objcopy)
96AC_CHECK_TOOL(STRINGS, strings)
97AC_CHECK_TOOL(GPERF, gperf)
b62cfcea
MB
98if test -z "$GPERF" ; then
99 AC_MSG_ERROR([*** gperf not found])
100fi
9a60da28 101
eb2e280f 102CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
be1a67d9 103 -pipe \
d1ab0ca0 104 -Wall \
d1ab0ca0 105 -Wextra \
27765dfc 106 -Wno-inline \
d1ab0ca0 107 -Wundef \
780040dc 108 "-Wformat=2 -Wformat-security -Wformat-nonliteral" \
d1ab0ca0
LP
109 -Wlogical-op \
110 -Wsign-compare \
d1ab0ca0 111 -Wmissing-include-dirs \
d1ab0ca0
LP
112 -Wold-style-definition \
113 -Wpointer-arith \
114 -Winit-self \
115 -Wdeclaration-after-statement \
116 -Wfloat-equal \
117 -Wmissing-prototypes \
118 -Wstrict-prototypes \
119 -Wredundant-decls \
120 -Wmissing-declarations \
121 -Wmissing-noreturn \
122 -Wshadow \
123 -Wendif-labels \
124 -Wcast-align \
125 -Wstrict-aliasing=2 \
126 -Wwrite-strings \
be1a67d9
LP
127 -Wno-long-long \
128 -Wno-overlength-strings \
d1ab0ca0 129 -Wno-unused-parameter \
be1a67d9 130 -Wno-missing-field-initializers \
8745297f 131 -Wno-unused-result \
d200735e 132 -Werror=overflow \
be1a67d9 133 -ffast-math \
d1ab0ca0
LP
134 -fno-common \
135 -fdiagnostics-show-option \
cd306955 136 -fdiagnostics-color=auto \
9b85fc6a
GSB
137 -fno-strict-aliasing \
138 -fvisibility=hidden \
139 -ffunction-sections \
5a45a936 140 -fdata-sections \
c1663b9d
LP
141 -fstack-protector \
142 --param=ssp-buffer-size=4])
5a45a936
LP
143AC_SUBST([OUR_CFLAGS], $with_cflags)
144
7cb20866 145AS_CASE([$CFLAGS], [*-O[[12345g\ ]]*], [
6a179865
ZJS
146 CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
147 -Wp,-D_FORTIFY_SOURCE=2])], [
c937e0d5 148 python_extra_cflags=-Wp,-U_FORTIFY_SOURCE
6a179865 149 AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])])
5a45a936 150AC_SUBST([OUR_CPPFLAGS], $with_cppflags)
9e7adc3a
LDM
151
152CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
9b85fc6a 153 -Wl,--as-needed \
9d2d0fe1 154 -Wl,--no-undefined \
5a45a936
LP
155 -Wl,--gc-sections \
156 -Wl,-z,relro \
157 -Wl,-z,now])
158AC_SUBST([OUR_LDFLAGS], $with_ldflags)
47be870b 159
c937e0d5
ZJS
160# ------------------------------------------------------------------------------
161# we use python to build the man page index, and for systemd-python
162have_python=no
163have_python_devel=no
164
165AC_ARG_WITH([python],
166 [AS_HELP_STRING([--without-python], [Disable building the man page index and systemd-python (default: test)])])
167
168AS_IF([test "x$with_python" != "xno"], [
169 AM_PATH_PYTHON(,, [:])
170 AS_IF([test "$PYTHON" != :], [have_python=yes])
171])
172AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
173AS_IF([test "x$PYTHON_BINARY" = "x"],
174 [AS_IF([test "x$have_python" = "xyes"],
25ee45f9 175 [PYTHON_BINARY="$(which "$PYTHON")"],
c937e0d5
ZJS
176 [PYTHON_BINARY=/usr/bin/python])])
177AC_ARG_VAR(PYTHON_BINARY, [Python binary used to launch installed scripts])
178
179AS_IF([test "x$with_python" != "xno"], [
180 AC_PATH_PROG(PYTHON_CONFIG, python${PYTHON_VERSION}-config)
181 AS_IF([test -n "$PYTHON_CONFIG"], [
182 have_python_devel=yes
25ee45f9
MB
183 PYTHON_CFLAGS="$($PYTHON_CONFIG --cflags) $python_extra_cflags"
184 PYTHON_LIBS="$($PYTHON_CONFIG --ldflags)"
c937e0d5
ZJS
185 AC_SUBST(PYTHON_CFLAGS)
186 AC_SUBST(PYTHON_LIBS)
603c0b7b 187 AC_PATH_PROGS(SPHINX_BUILD, sphinx-build-${PYTHON_VERSION} sphinx-build)
c937e0d5
ZJS
188 ])
189])
190AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test "$have_python_devel" = "yes"])
191
192# ------------------------------------------------------------------------------
193
e1718709 194AC_SEARCH_LIBS([mq_open], [rt], [], [AC_MSG_ERROR([*** POSIX RT library not found])])
afea26ad 195AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
85f19d82
MB
196
197save_LIBS="$LIBS"
198LIBS=
47be870b
LP
199AC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])])
200AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
85f19d82
MB
201CAP_LIBS="$LIBS"
202LIBS="$save_LIBS"
203AC_SUBST(CAP_LIBS)
47be870b 204
9388e99e 205AC_CHECK_FUNCS([fanotify_init fanotify_mark])
4db17f29 206AC_CHECK_FUNCS([__secure_getenv secure_getenv])
9388e99e 207AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at], [], [], [[#include <sys/types.h>
a8348796 208#include <unistd.h>
9388e99e
MO
209#include <sys/mount.h>
210#include <fcntl.h>]])
a8348796 211
b237ef2c 212# This makes sure pkg.m4 is available.
a9b5b032 213m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
d1ab0ca0 214
3e214785 215PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2])
e3043162
TG
216
217# ------------------------------------------------------------------------------
218have_kmod=no
219AC_ARG_ENABLE(kmod, AS_HELP_STRING([--disable-kmod], [disable loadable modules support]))
220if test "x$enable_kmod" != "xno"; then
e2ca86cf
DR
221 PKG_CHECK_EXISTS([ libkmod ], have_kmod=yes, have_kmod=no)
222 if test "x$have_kmod" = "xyes"; then
223 PKG_CHECK_MODULES(KMOD, [ libkmod >= 14 ],
224 [AC_DEFINE(HAVE_KMOD, 1, [Define if kmod is available])],
225 AC_MSG_ERROR([*** kmod version >= 14 not found]))
226 fi
e3043162 227 if test "x$have_kmod" = xno -a "x$enable_kmod" = xyes; then
c4955740 228 AC_MSG_ERROR([*** kmod support requested, but libraries not found])
e3043162
TG
229 fi
230fi
231AM_CONDITIONAL(HAVE_KMOD, [test "$have_kmod" = "yes"])
f553b3b1
AO
232
233# ------------------------------------------------------------------------------
234have_blkid=no
235AC_ARG_ENABLE(blkid, AS_HELP_STRING([--disable-blkid], [disable blkid support]))
236if test "x$enable_blkid" != "xno"; then
237 PKG_CHECK_MODULES(BLKID, [ blkid >= 2.20 ],
238 [AC_DEFINE(HAVE_BLKID, 1, [Define if blkid is available]) have_blkid=yes], have_blkid=no)
239 if test "x$have_blkid" = xno -a "x$enable_blkid" = xyes; then
240 AC_MSG_ERROR([*** blkid support requested but libraries not found])
241 fi
242fi
243AM_CONDITIONAL(HAVE_BLKID, [test "$have_blkid" = "yes"])
728beb28 244
3e214785 245# ------------------------------------------------------------------------------
81611586
RS
246have_ima=yes
247AC_ARG_ENABLE([ima], AS_HELP_STRING([--disable-ima],[Disable optional IMA support]),
248 [case "${enableval}" in
249 yes) have_ima=yes ;;
250 no) have_ima=no ;;
251 *) AC_MSG_ERROR(bad value ${enableval} for --disable-ima) ;;
252 esac],
253 [have_ima=yes])
254
255if test "x${have_ima}" != xno ; then
256 AC_DEFINE(HAVE_IMA, 1, [Define if IMA is available])
257fi
258
77e68fa2
LP
259# ------------------------------------------------------------------------------
260have_chkconfig=yes
261AC_ARG_ENABLE([chkconfig], AS_HELP_STRING([--disable-chkconfig],[Disable optional chkconfig support]),
262 [case "${enableval}" in
263 yes) have_chkconfig=yes ;;
264 no) have_chkconfig=no ;;
265 *) AC_MSG_ERROR(bad value ${enableval} for --disable-chkconfig) ;;
266 esac],
267 [AC_PATH_PROG(CHKCONFIG, chkconfig)
268 if test -z "$CHKCONFIG"; then
269 have_chkconfig=no
270 else
271 have_chkconfig=yes
272 fi])
273
274if test "x${have_chkconfig}" != xno ; then
275 AC_DEFINE(HAVE_CHKCONFIG, 1, [Define if CHKCONFIG is available])
276fi
277
3e214785 278# ------------------------------------------------------------------------------
591622d7
LP
279have_selinux=no
280AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
281if test "x$enable_selinux" != "xno"; then
3f8cc098 282 PKG_CHECK_MODULES([SELINUX], [libselinux >= 2.1.9],
591622d7 283 [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available]) have_selinux=yes], have_selinux=no)
591622d7
LP
284 if test "x$have_selinux" = xno -a "x$enable_selinux" = xyes; then
285 AC_MSG_ERROR([*** SELinux support requested but libraries not found])
286 fi
56cf987f 287fi
591622d7 288AM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"])
45df1f2c
CR
289
290AC_ARG_WITH(debug-shell,
291 AS_HELP_STRING([--with-debug-shell=PATH],
292 [Path to debug shell binary]),
293 [SUSHELL="$withval"],[
294 AS_IF([test "x${have_selinux}" != "xno"], [SUSHELL="/sbin/sushell"] , [SUSHELL="/bin/sh"])])
295
5ec6b15b 296AC_SUBST(SUSHELL)
56cf987f 297
45df1f2c
CR
298AC_ARG_WITH([debug-tty],
299 AS_HELP_STRING([--with-debug-tty=PATH],
300 [Specify the tty device for debug shell]),
301 [DEBUGTTY="$withval"],
302 [DEBUGTTY=/dev/tty9])
303
304AC_SUBST(DEBUGTTY)
305
3e214785 306# ------------------------------------------------------------------------------
807e17f0
LP
307have_xz=no
308AC_ARG_ENABLE(xz, AS_HELP_STRING([--disable-xz], [Disable optional XZ support]))
309if test "x$enable_xz" != "xno"; then
310 PKG_CHECK_MODULES(XZ, [ liblzma ],
311 [AC_DEFINE(HAVE_XZ, 1, [Define if XZ is available]) have_xz=yes], have_xz=no)
807e17f0
LP
312 if test "x$have_xz" = xno -a "x$enable_xz" = xyes; then
313 AC_MSG_ERROR([*** Xz support requested but libraries not found])
314 fi
315fi
316AM_CONDITIONAL(HAVE_XZ, [test "$have_xz" = "yes"])
317
3e214785 318# ------------------------------------------------------------------------------
0213c3f8
LP
319AC_ARG_ENABLE([tcpwrap],
320 AS_HELP_STRING([--disable-tcpwrap],[Disable optional TCP wrappers support]),
321 [case "${enableval}" in
5b6319dc
LP
322 yes) have_tcpwrap=yes ;;
323 no) have_tcpwrap=no ;;
0213c3f8
LP
324 *) AC_MSG_ERROR(bad value ${enableval} for --disable-tcpwrap) ;;
325 esac],
5b6319dc 326 [have_tcpwrap=auto])
0213c3f8 327
5b6319dc 328if test "x${have_tcpwrap}" != xno ; then
0213c3f8
LP
329 ACX_LIBWRAP
330 if test "x${LIBWRAP_LIBS}" = x ; then
5b6319dc
LP
331 if test "x$have_tcpwrap" = xyes ; then
332 AC_MSG_ERROR([*** TCP wrappers support not found.])
0213c3f8 333 fi
812cce32 334 have_tcpwrap=no
0213c3f8 335 else
5b6319dc 336 have_tcpwrap=yes
0213c3f8
LP
337 fi
338else
5b6319dc 339 LIBWRAP_LIBS=
0213c3f8 340fi
0213c3f8
LP
341AC_SUBST(LIBWRAP_LIBS)
342
3e214785 343# ------------------------------------------------------------------------------
5b6319dc
LP
344AC_ARG_ENABLE([pam],
345 AS_HELP_STRING([--disable-pam],[Disable optional PAM support]),
346 [case "${enableval}" in
347 yes) have_pam=yes ;;
348 no) have_pam=no ;;
349 *) AC_MSG_ERROR(bad value ${enableval} for --disable-pam) ;;
350 esac],
351 [have_pam=auto])
352
353if test "x${have_pam}" != xno ; then
354 AC_CHECK_HEADERS(
355 [security/pam_modules.h security/pam_modutil.h security/pam_ext.h],
356 [have_pam=yes],
357 [if test "x$have_pam" = xyes ; then
358 AC_MSG_ERROR([*** PAM headers not found.])
359 fi])
360
361 AC_CHECK_LIB(
362 [pam],
363 [pam_syslog],
364 [have_pam=yes],
365 [if test "x$have_pam" = xyes ; then
366 AC_MSG_ERROR([*** libpam not found.])
367 fi])
368
369 if test "x$have_pam" = xyes ; then
370 PAM_LIBS="-lpam -lpam_misc"
371 AC_DEFINE(HAVE_PAM, 1, [PAM available])
812cce32
LP
372 else
373 have_pam=no
5b6319dc
LP
374 fi
375else
376 PAM_LIBS=
377fi
378AC_SUBST(PAM_LIBS)
379AM_CONDITIONAL([HAVE_PAM], [test "x$have_pam" != xno])
380
3e214785 381# ------------------------------------------------------------------------------
5eda94dd
LP
382AC_ARG_ENABLE([acl],
383 AS_HELP_STRING([--disable-acl],[Disable optional ACL support]),
384 [case "${enableval}" in
385 yes) have_acl=yes ;;
386 no) have_acl=no ;;
387 *) AC_MSG_ERROR(bad value ${enableval} for --disable-acl) ;;
388 esac],
389 [have_acl=auto])
390
391if test "x${have_acl}" != xno ; then
392 AC_CHECK_HEADERS(
393 [sys/acl.h acl/libacl.h],
394 [have_acl=yes],
395 [if test "x$have_acl" = xyes ; then
396 AC_MSG_ERROR([*** ACL headers not found.])
397 fi])
398
399 AC_CHECK_LIB(
400 [acl],
401 [acl_get_file],
402 [have_acl=yes],
403 [if test "x$have_acl" = xyes ; then
404 AC_MSG_ERROR([*** libacl not found.])
405 fi])
406
407 if test "x$have_acl" = xyes ; then
408 ACL_LIBS="-lacl"
409 AC_DEFINE(HAVE_ACL, 1, [ACL available])
410 else
411 have_acl=no
412 fi
413else
414 ACL_LIBS=
415fi
416AC_SUBST(ACL_LIBS)
417AM_CONDITIONAL([HAVE_ACL], [test "x$have_acl" != xno])
418
fb0951b0
LP
419# ------------------------------------------------------------------------------
420AC_ARG_ENABLE([xattr],
421 AS_HELP_STRING([--disable-xattr],[Disable optional XATTR support]),
422 [case "${enableval}" in
423 yes) have_xattr=yes ;;
424 no) have_xattr=no ;;
425 *) AC_MSG_ERROR(bad value ${enableval} for --disable-xattr) ;;
426 esac],
427 [have_xattr=auto])
428
429if test "x${have_xattr}" != xno ; then
430 AC_CHECK_HEADERS(
431 [attr/xattr.h],
432 [have_xattr=yes],
433 [if test "x$have_xattr" = xyes ; then
434 AC_MSG_ERROR([*** XATTR headers not found.])
435 fi])
436
437 AC_CHECK_LIB(
438 [attr],
439 [fsetxattr],
440 [have_xattr=yes],
441 [if test "x$have_xattr" = xyes ; then
442 AC_MSG_ERROR([*** libattr not found.])
443 fi])
444
445 if test "x$have_xattr" = xyes ; then
446 XATTR_LIBS="-lattr"
447 AC_DEFINE(HAVE_XATTR, 1, [XATTR available])
448 else
449 have_xattr=no
450 fi
451else
452 XATTR_LIBS=
453fi
454AC_SUBST(XATTR_LIBS)
455AM_CONDITIONAL([HAVE_XATTR], [test "x$have_xattr" != xno])
456
2b3e18de
KL
457# ------------------------------------------------------------------------------
458AC_ARG_ENABLE([smack], AS_HELP_STRING([--disable-smack],[Disable optional SMACK support]),
459 [case "${enableval}" in
460 yes) have_smack=yes ;;
461 no) have_smack=no ;;
462 *) AC_MSG_ERROR(bad value ${enableval} for --disable-smack) ;;
463 esac],
464 [have_smack=auto])
465
466if test "x${have_xattr}" = xno; then
467 if test "x${have_smack}" = xyes; then
468 AC_MSG_ERROR(SMACK requires xattr support)
469 else
470 have_smack=no
471 fi
472else
473 if test "x${have_smack}" = xauto; then
474 have_smack=yes
475 fi
476fi
477
478if test "x${have_smack}" = xyes ; then
479 AC_DEFINE(HAVE_SMACK, 1, [Define if SMACK is available])
480fi
481
7560fffc 482# ------------------------------------------------------------------------------
feb12d3e 483AC_ARG_ENABLE([gcrypt],
7560fffc
LP
484 AS_HELP_STRING([--disable-gcrypt],[Disable optional GCRYPT support]),
485 [case "${enableval}" in
486 yes) have_gcrypt=yes ;;
487 no) have_gcrypt=no ;;
488 *) AC_MSG_ERROR(bad value ${enableval} for --disable-gcrypt) ;;
489 esac],
490 [have_gcrypt=auto])
491
492if test "x${have_gcrypt}" != xno ; then
493 AM_PATH_LIBGCRYPT(
494 [1.4.5],
495 [have_gcrypt=yes],
496 [if test "x$have_gcrypt" = xyes ; then
497 AC_MSG_ERROR([*** GCRYPT headers not found.])
498 fi])
499
500 if test "x$have_gcrypt" = xyes ; then
501 GCRYPT_LIBS="$LIBGCRYPT_LIBS"
502 GCRYPT_CFLAGS="$LIBGCRYPT_CFLAGS"
503 AC_DEFINE(HAVE_GCRYPT, 1, [GCRYPT available])
504 else
505 have_gcrypt=no
506 fi
507else
508 GCRYPT_LIBS=
509 GCRYPT_CFLAGS=
510fi
511AC_SUBST(GCRYPT_LIBS)
512AC_SUBST(GCRYPT_CFLAGS)
513AM_CONDITIONAL([HAVE_GCRYPT], [test "x$have_gcrypt" != xno])
514
3e214785 515# ------------------------------------------------------------------------------
4927fcae
LP
516AC_ARG_ENABLE([audit],
517 AS_HELP_STRING([--disable-audit],[Disable optional AUDIT support]),
518 [case "${enableval}" in
519 yes) have_audit=yes ;;
520 no) have_audit=no ;;
521 *) AC_MSG_ERROR(bad value ${enableval} for --disable-audit) ;;
522 esac],
523 [have_audit=auto])
524
525if test "x${have_audit}" != xno ; then
526 AC_CHECK_HEADERS(
527 [libaudit.h],
528 [have_audit=yes],
529 [if test "x$have_audit" = xyes ; then
530 AC_MSG_ERROR([*** AUDIT headers not found.])
531 fi])
532
533 AC_CHECK_LIB(
534 [audit],
535 [audit_open],
536 [have_audit=yes],
537 [if test "x$have_audit" = xyes ; then
538 AC_MSG_ERROR([*** libaudit not found.])
539 fi])
540
541 if test "x$have_audit" = xyes ; then
542 AUDIT_LIBS="-laudit"
543 AC_DEFINE(HAVE_AUDIT, 1, [AUDIT available])
544 else
545 have_audit=no
546 fi
547else
548 AUDIT_LIBS=
549fi
550AC_SUBST(AUDIT_LIBS)
551
3e214785 552# ------------------------------------------------------------------------------
7f4e0805
LP
553have_libcryptsetup=no
554AC_ARG_ENABLE(libcryptsetup, AS_HELP_STRING([--disable-libcryptsetup], [disable libcryptsetup tools]))
555if test "x$enable_libcryptsetup" != "xno"; then
880a599e 556 PKG_CHECK_MODULES(LIBCRYPTSETUP, [ libcryptsetup >= 1.4.2 ],
7f4e0805 557 [AC_DEFINE(HAVE_LIBCRYPTSETUP, 1, [Define if libcryptsetup is available]) have_libcryptsetup=yes], have_libcryptsetup=no)
7f4e0805 558 if test "x$have_libcryptsetup" = xno -a "x$enable_libcryptsetup" = xyes; then
591622d7 559 AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found])
7f4e0805
LP
560 fi
561fi
562AM_CONDITIONAL(HAVE_LIBCRYPTSETUP, [test "$have_libcryptsetup" = "yes"])
563
f6a971bc
LP
564# ------------------------------------------------------------------------------
565have_qrencode=no
566AC_ARG_ENABLE(qrencode, AS_HELP_STRING([--disable-qrencode], [disable qrencode support]))
567if test "x$enable_qrencode" != "xno"; then
568 PKG_CHECK_MODULES(QRENCODE, [ libqrencode ],
569 [AC_DEFINE(HAVE_QRENCODE, 1, [Define if qrencode is available]) have_qrencode=yes], have_qrencode=no)
570 if test "x$have_qrencode" = xno -a "x$enable_qrencode" = xyes; then
571 AC_MSG_ERROR([*** qrencode support requested but libraries not found])
572 fi
573fi
574AM_CONDITIONAL(HAVE_QRENCODE, [test "$have_qrencode" = "yes"])
575
7b17a7d7
LP
576# ------------------------------------------------------------------------------
577have_microhttpd=no
578AC_ARG_ENABLE(microhttpd, AS_HELP_STRING([--disable-microhttpd], [disable microhttpd support]))
579if test "x$enable_microhttpd" != "xno"; then
59bb9d9a 580 PKG_CHECK_MODULES(MICROHTTPD, [libmicrohttpd >= 0.9.5],
7b17a7d7
LP
581 [AC_DEFINE(HAVE_MICROHTTPD, 1, [Define if microhttpd is available]) have_microhttpd=yes], have_microhttpd=no)
582 if test "x$have_microhttpd" = xno -a "x$enable_microhttpd" = xyes; then
583 AC_MSG_ERROR([*** microhttpd support requested but libraries not found])
584 fi
585fi
586AM_CONDITIONAL(HAVE_MICROHTTPD, [test "$have_microhttpd" = "yes"])
587
3e214785 588# ------------------------------------------------------------------------------
27669061
MV
589have_binfmt=no
590AC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool]))
591if test "x$enable_binfmt" != "xno"; then
be31376e 592 have_binfmt=yes
27669061
MV
593fi
594AM_CONDITIONAL(ENABLE_BINFMT, [test "$have_binfmt" = "yes"])
595
3e214785 596# ------------------------------------------------------------------------------
e5e83e83
LP
597have_vconsole=no
598AC_ARG_ENABLE(vconsole, AS_HELP_STRING([--disable-vconsole], [disable vconsole tool]))
599if test "x$enable_vconsole" != "xno"; then
be31376e 600 have_vconsole=yes
e5e83e83
LP
601fi
602AM_CONDITIONAL(ENABLE_VCONSOLE, [test "$have_vconsole" = "yes"])
603
3e214785 604# ------------------------------------------------------------------------------
e5e83e83
LP
605have_readahead=no
606AC_ARG_ENABLE(readahead, AS_HELP_STRING([--disable-readahead], [disable readahead tools]))
607if test "x$enable_readahead" != "xno"; then
be31376e 608 have_readahead=yes
e5e83e83
LP
609fi
610AM_CONDITIONAL(ENABLE_READAHEAD, [test "$have_readahead" = "yes"])
611
83fdc450
AK
612# ------------------------------------------------------------------------------
613have_bootchart=no
614AC_ARG_ENABLE(bootchart, AS_HELP_STRING([--disable-bootchart], [disable bootchart tool]))
615if test "x$enable_bootchart" != "xno"; then
616 have_bootchart=yes
617fi
618AM_CONDITIONAL(ENABLE_BOOTCHART, [test "$have_bootchart" = "yes"])
619
3e214785 620# ------------------------------------------------------------------------------
4de85612
LP
621have_quotacheck=no
622AC_ARG_ENABLE(quotacheck, AS_HELP_STRING([--disable-quotacheck], [disable quotacheck tools]))
623if test "x$enable_quotacheck" != "xno"; then
be31376e 624 have_quotacheck=yes
4de85612
LP
625fi
626AM_CONDITIONAL(ENABLE_QUOTACHECK, [test "$have_quotacheck" = "yes"])
627
6351163b
UTL
628# ------------------------------------------------------------------------------
629have_tmpfiles=no
630AC_ARG_ENABLE(tmpfiles, AS_HELP_STRING([--disable-tmpfiles], [disable tmpfiles support]))
631if test "x$enable_tmpfiles" != "xno"; then
632 have_tmpfiles=yes
633fi
634AM_CONDITIONAL(ENABLE_TMPFILES, [test "$have_tmpfiles" = "yes"])
635
3e214785 636# ------------------------------------------------------------------------------
4de85612
LP
637have_randomseed=no
638AC_ARG_ENABLE(randomseed, AS_HELP_STRING([--disable-randomseed], [disable randomseed tools]))
639if test "x$enable_randomseed" != "xno"; then
be31376e 640 have_randomseed=yes
4de85612
LP
641fi
642AM_CONDITIONAL(ENABLE_RANDOMSEED, [test "$have_randomseed" = "yes"])
643
3e214785 644# ------------------------------------------------------------------------------
2a018e83
KS
645have_logind=no
646AC_ARG_ENABLE(logind, AS_HELP_STRING([--disable-logind], [disable login daemon]))
647if test "x$enable_logind" != "xno"; then
be31376e 648 have_logind=yes
2a018e83
KS
649fi
650AM_CONDITIONAL(ENABLE_LOGIND, [test "$have_logind" = "yes"])
4c80c73c 651AS_IF([test "$have_logind" = "yes"], [ AC_DEFINE(HAVE_LOGIND, [1], [Logind support available]) ])
2a018e83 652
1ee306e1
LP
653# ------------------------------------------------------------------------------
654have_machined=no
655AC_ARG_ENABLE(machined, AS_HELP_STRING([--disable-machined], [disable machine daemon]))
656if test "x$enable_machined" != "xno"; then
657 have_machined=yes
658fi
659AM_CONDITIONAL(ENABLE_MACHINED, [test "$have_machined" = "yes"])
660AS_IF([test "$have_machined" = "yes"], [ AC_DEFINE(HAVE_MACHINED, [1], [Machined support available]) ])
661
3e214785 662# ------------------------------------------------------------------------------
b2e9fb99
MV
663have_hostnamed=no
664AC_ARG_ENABLE(hostnamed, AS_HELP_STRING([--disable-hostnamed], [disable hostname daemon]))
665if test "x$enable_hostnamed" != "xno"; then
be31376e 666 have_hostnamed=yes
b2e9fb99
MV
667fi
668AM_CONDITIONAL(ENABLE_HOSTNAMED, [test "$have_hostnamed" = "yes"])
669
3e214785 670# ------------------------------------------------------------------------------
f47cd184
MV
671have_timedated=no
672AC_ARG_ENABLE(timedated, AS_HELP_STRING([--disable-timedated], [disable timedate daemon]))
673if test "x$enable_timedated" != "xno"; then
be31376e 674 have_timedated=yes
f47cd184
MV
675fi
676AM_CONDITIONAL(ENABLE_TIMEDATED, [test "$have_timedated" = "yes"])
677
3e214785 678# ------------------------------------------------------------------------------
4cd1eaa5
MV
679have_localed=no
680AC_ARG_ENABLE(localed, AS_HELP_STRING([--disable-localed], [disable locale daemon]))
681if test "x$enable_localed" != "xno"; then
be31376e 682 have_localed=yes
4cd1eaa5
MV
683fi
684AM_CONDITIONAL(ENABLE_LOCALED, [test "$have_localed" = "yes"])
685
3e214785 686# ------------------------------------------------------------------------------
f5e04665
LP
687have_coredump=no
688AC_ARG_ENABLE(coredump, AS_HELP_STRING([--disable-coredump], [disable coredump hook]))
689if test "x$enable_coredump" != "xno"; then
be31376e 690 have_coredump=yes
f5e04665
LP
691fi
692AM_CONDITIONAL(ENABLE_COREDUMP, [test "$have_coredump" = "yes"])
693
46ba8aae
LP
694# ------------------------------------------------------------------------------
695have_polkit=no
696AC_ARG_ENABLE(polkit, AS_HELP_STRING([--disable-polkit], [disable PolicyKit support]))
697if test "x$enable_polkit" != "xno"; then
698 AC_DEFINE(ENABLE_POLKIT, 1, [Define if PolicyKit support is to be enabled])
699 have_polkit=yes
700fi
701AM_CONDITIONAL(ENABLE_POLKIT, [test "x$have_polkit" = "xyes"])
702
b872e9a0
LP
703# ------------------------------------------------------------------------------
704have_efi=no
705AC_ARG_ENABLE(efi, AS_HELP_STRING([--disable-efi], [disable EFI support]))
706if test "x$enable_efi" != "xno"; then
707 AC_DEFINE(ENABLE_EFI, 1, [Define if EFI support is to be enabled])
708 have_efi=yes
709fi
710AM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"])
711
b1c4ca25
LP
712# ------------------------------------------------------------------------------
713AC_ARG_WITH(rc-local-script-path-start,
714 AS_HELP_STRING([--with-rc-local-script-path-start=PATH],
715 [Path to /etc/rc.local]),
716 [RC_LOCAL_SCRIPT_PATH_START="$withval"],
717 [RC_LOCAL_SCRIPT_PATH_START="/etc/rc.local"])
718
719AC_ARG_WITH(rc-local-script-path-stop,
720 AS_HELP_STRING([--with-rc-local-script-path-stop=PATH],
bc270841 721 [Path to /usr/sbin/halt.local]),
b1c4ca25 722 [RC_LOCAL_SCRIPT_PATH_STOP="$withval"],
bc270841 723 [RC_LOCAL_SCRIPT_PATH_STOP="/usr/sbin/halt.local"])
b1c4ca25
LP
724
725AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_START, ["$RC_LOCAL_SCRIPT_PATH_START"], [Path of /etc/rc.local script])
bc270841 726AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_STOP, ["$RC_LOCAL_SCRIPT_PATH_STOP"], [Path of /usr/sbin/halt.local script])
b1c4ca25
LP
727
728AC_SUBST(RC_LOCAL_SCRIPT_PATH_START)
729AC_SUBST(RC_LOCAL_SCRIPT_PATH_STOP)
730
a382332e
LP
731# ------------------------------------------------------------------------------
732AC_ARG_WITH(kbd-loadkeys,
733 AS_HELP_STRING([--with-kbd-loadkeys=PATH],
734 [Path to loadkeys]),
735 [KBD_LOADKEYS="$withval"],
736 [KBD_LOADKEYS="/usr/bin/loadkeys"])
737
738AC_ARG_WITH(kbd-setfont,
739 AS_HELP_STRING([--with-kbd-setfont=PATH],
740 [Path to setfont]),
741 [KBD_SETFONT="$withval"],
742 [KBD_SETFONT="/usr/bin/setfont"])
743
744AC_DEFINE_UNQUOTED(KBD_LOADKEYS, ["$KBD_LOADKEYS"], [Path of loadkeys])
745AC_DEFINE_UNQUOTED(KBD_SETFONT, ["$KBD_SETFONT"], [Path of setfont])
746
747AC_SUBST(KBD_LOADKEYS)
748AC_SUBST(KBD_SETFONT)
749
4ad61fd1
CR
750AC_ARG_WITH(telinit,
751 AS_HELP_STRING([--with-telinit=PATH],
752 [Path to telinit]),
753 [TELINIT="$withval"],
754 [TELINIT="/lib/upstart/telinit"])
755
756AC_DEFINE_UNQUOTED(TELINIT, ["$TELINIT"], [Path to telinit])
757
758AC_SUBST(TELINIT)
759
7211f918
LP
760AC_CHECK_HEADERS_ONCE([valgrind/memcheck.h])
761
d562955e
TG
762# ------------------------------------------------------------------------------
763have_myhostname=no
f8c5a581 764AC_ARG_ENABLE(myhostname, AS_HELP_STRING([--disable-myhostname], [disable nss-myhostname support]))
d562955e
TG
765if test "x$enable_myhostname" != "xno"; then
766 AC_HEADER_STDC
767 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])
768
769 AC_C_CONST
770 AC_TYPE_SIZE_T
771 AC_HEADER_TIME
772
773 AC_FUNC_MALLOC
774 AC_FUNC_SELECT_ARGTYPES
775 AC_CHECK_FUNCS([gethostbyaddr gethostbyname gettimeofday inet_ntoa memset select socket strcspn strdup strerror strncasecmp strcasecmp strspn])
776
777 have_myhostname=yes
778fi
779AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"])
780
3e214785
KS
781# ------------------------------------------------------------------------------
782AC_ARG_WITH(firmware-path,
783 AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]],
a3bd8447
TG
784 [Firmware search path (default="")]),
785 [], [with_firmware_path=""])
3e214785
KS
786OLD_IFS=$IFS
787IFS=:
788for i in $with_firmware_path; do
789 if test "x${FIRMWARE_PATH}" = "x"; then
790 FIRMWARE_PATH="\\\"${i}/\\\""
791 else
792 FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\""
793 fi
794done
795IFS=$OLD_IFS
a3bd8447 796AC_SUBST(FIRMWARE_PATH)
d8d4bee7 797AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ])
a3bd8447 798AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"])
3e214785
KS
799
800# ------------------------------------------------------------------------------
801AC_ARG_ENABLE([gudev],
802 AS_HELP_STRING([--disable-gudev], [disable Gobject libudev support @<:@default=enabled@:>@]),
803 [], [enable_gudev=yes])
de1c301e 804AS_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]) ])
3e214785 805AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"])
de1c301e
LP
806AS_IF([test "x$enable_gudev" = "xyes"], [ AC_DEFINE(HAVE_GLIB, 1, [Define if glib is available]) ])
807
3e214785
KS
808# ------------------------------------------------------------------------------
809AC_ARG_ENABLE([keymap],
810 AS_HELP_STRING([--disable-keymap], [disable keymap fixup support @<:@default=enabled@:>@]),
811 [], [enable_keymap=yes])
812AS_IF([test "x$enable_keymap" = "xyes"], [
813 AC_PATH_PROG([GPERF], [gperf])
814 if test -z "$GPERF"; then
815 AC_MSG_ERROR([gperf is needed])
816 fi
817
818 AC_CHECK_HEADER([linux/input.h], [:], AC_MSG_ERROR([kernel headers not found]))
819 AC_SUBST([INCLUDE_PREFIX], [$(echo '#include <linux/input.h>' | eval $ac_cpp -E - | sed -n '/linux\/input.h/ {s:.*"\(.*\)/linux/input.h".*:\1:; p; q}')])
820])
821AM_CONDITIONAL([ENABLE_KEYMAP], [test "x$enable_keymap" = "xyes"])
822
823# ------------------------------------------------------------------------------
75db9a77 824have_manpages=no
4c2b0e4e 825AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages]))
fe1fed02
ZJS
826AS_IF([test "x$enable_manpages" != xno], [
827 AS_IF([test "x$enable_manpages" = xyes -a "x$XSLTPROC" = x], [
828 AC_MSG_ERROR([*** Manpages requested but xsltproc not found])
829 ])
830 AS_IF([test "x$XSLTPROC" != x], [have_manpages=yes])
831])
832AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
75db9a77 833
3e214785 834# ------------------------------------------------------------------------------
d1ab0ca0 835
34eff652
LP
836# Location of the init scripts as mandated by LSB
837SYSTEM_SYSVINIT_PATH=/etc/init.d
f1dd0c3f 838SYSTEM_SYSVRCND_PATH=/etc/rc.d
f975e971 839M4_DEFINES=
12e84679 840
136337ff 841AC_ARG_WITH([sysvinit-path],
be31376e 842 [AS_HELP_STRING([--with-sysvinit-path=PATH],
bc270841 843 [Specify the path to where the SysV init scripts are located])],
be31376e
KS
844 [SYSTEM_SYSVINIT_PATH="$withval"],
845 [])
136337ff 846
dee4c244
LP
847AC_ARG_WITH([sysvrcnd-path],
848 [AS_HELP_STRING([--with-sysvrcnd-path=PATH],
bc270841 849 [Specify the path to the base directory for the SysV rcN.d directories])],
136337ff
TFH
850 [SYSTEM_SYSVRCND_PATH="$withval"],
851 [])
852
07459bb6
FF
853if test "x${SYSTEM_SYSVINIT_PATH}" != "x" -a "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
854 AC_DEFINE(HAVE_SYSV_COMPAT, [], [SysV init scripts and rcN.d links are supported.])
855 SYSTEM_SYSV_COMPAT="yes"
f975e971 856 M4_DEFINES="$M4_DEFINES -DHAVE_SYSV_COMPAT"
07459bb6 857elif test "x${SYSTEM_SYSVINIT_PATH}" != "x" -o "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
dee4c244 858 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.])
07459bb6
FF
859else
860 SYSTEM_SYSV_COMPAT="no"
861fi
862
bc270841
LP
863AC_SUBST(SYSTEM_SYSVINIT_PATH)
864AC_SUBST(SYSTEM_SYSVRCND_PATH)
865AC_SUBST(M4_DEFINES)
866
867AM_CONDITIONAL(HAVE_SYSV_COMPAT, test "$SYSTEM_SYSV_COMPAT" = "yes")
868
bef2733f 869AC_ARG_WITH([tty-gid],
a05ea46d 870 [AS_HELP_STRING([--with-tty-gid=GID],
bef2733f
LP
871 [Specify the numeric GID of the 'tty' group])],
872 [AC_DEFINE_UNQUOTED(TTY_GID, [$withval], [GID of the 'tty' group])],
873 [])
874
d2d12cd1
LP
875AC_ARG_WITH([dbuspolicydir],
876 AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
877 [],
25ee45f9 878 [with_dbuspolicydir=$($PKG_CONFIG --variable=sysconfdir dbus-1)/dbus-1/system.d])
d122948d 879
d2d12cd1
LP
880AC_ARG_WITH([dbussessionservicedir],
881 AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]),
882 [],
25ee45f9 883 [with_dbussessionservicedir=$($PKG_CONFIG --variable=session_bus_services_dir dbus-1)])
d122948d 884
d2d12cd1
LP
885AC_ARG_WITH([dbussystemservicedir],
886 AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]),
887 [],
03c14914 888 [with_dbussystemservicedir=$(readlink -m $($PKG_CONFIG --variable=session_bus_services_dir dbus-1)/../system-services)])
d122948d 889
d2d12cd1
LP
890AC_ARG_WITH([dbusinterfacedir],
891 AS_HELP_STRING([--with-dbusinterfacedir=DIR], [D-Bus interface directory]),
892 [],
03c14914 893 [with_dbusinterfacedir=$(readlink -m $($PKG_CONFIG --variable=session_bus_services_dir dbus-1)/../interfaces)])
d122948d 894
db059f1b
MB
895AC_ARG_WITH([bashcompletiondir],
896 AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]),
897 [],
25ee45f9
MB
898 [AS_IF([$($PKG_CONFIG --exists bash-completion)], [
899 with_bashcompletiondir=$($PKG_CONFIG --variable=completionsdir bash-completion)
db059f1b
MB
900 ] , [
901 with_bashcompletiondir=${datadir}/bash-completion/completions
902 ])])
903
b8079ae1
KS
904AC_ARG_WITH([rootprefix],
905 AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
39ad55a9 906 [], [with_rootprefix=${ac_default_prefix}])
d2d12cd1 907
ae446765
KS
908AC_ARG_WITH([rootlibdir],
909 AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]),
910 [],
911 [with_rootlibdir=${libdir}])
912
9d3203b4 913AC_ARG_WITH([pamlibdir],
b0cca7d8 914 AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
9d3203b4
KS
915 [],
916 [with_pamlibdir=${with_rootlibdir}/security])
917
bc9bdbba
MG
918AC_ARG_ENABLE([split-usr],
919 AS_HELP_STRING([--enable-split-usr], [Assume that /bin, /sbin aren\'t symlinks into /usr]),
920 [],
921 [AS_IF([test "x${ac_default_prefix}" != "x${with_rootprefix}"], [
922 enable_split_usr=yes
923 ], [
924 enable_split_usr=no
925 ])])
926
927AS_IF([test "x${enable_split_usr}" = "xyes"], [
2c6db6fb 928 AC_DEFINE(HAVE_SPLIT_USR, 1, [Define if /bin, /sbin aren't symlinks into /usr])
bc9bdbba 929])
2c6db6fb 930
6fc00209
ZJS
931# Work around intltoolize and gtk-doc problems in VPATH builds
932AM_CONDITIONAL([ENABLE_GTK_DOC_TESTS], [test "x$0" = "x./configure"],
933 [Define to do gtk-doc tests])
934AS_IF([test "x$0" != "x./configure"], [
935 AC_SUBST([INTLTOOL_UPDATE], [/bin/true])
936])
937
cee22bd3
HGB
938AC_ARG_ENABLE(tests,
939 [AC_HELP_STRING([--disable-tests], [disable tests])],
940 enable_tests=$enableval, enable_tests=yes)
941AM_CONDITIONAL(ENABLE_TESTS, [test x$enable_tests = xyes])
942
d2d12cd1
LP
943AC_SUBST([dbuspolicydir], [$with_dbuspolicydir])
944AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir])
945AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
946AC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir])
db059f1b 947AC_SUBST([bashcompletiondir], [$with_bashcompletiondir])
8c6db833 948AC_SUBST([pamlibdir], [$with_pamlibdir])
b8079ae1 949AC_SUBST([rootprefix], [$with_rootprefix])
ae446765 950AC_SUBST([rootlibdir], [$with_rootlibdir])
8c4a3079 951
3e214785
KS
952AC_CONFIG_FILES([
953 Makefile po/Makefile.in
bb061708
KS
954 docs/libudev/Makefile
955 docs/libudev/version.xml
956 docs/gudev/Makefile
957 docs/gudev/version.xml
3e214785
KS
958])
959
a45a909f 960AC_OUTPUT
ae446765 961AC_MSG_RESULT([
0571e011
LP
962 $PACKAGE_NAME $VERSION
963
7f4e0805 964 libcryptsetup: ${have_libcryptsetup}
5b6319dc
LP
965 tcpwrap: ${have_tcpwrap}
966 PAM: ${have_pam}
12716238 967 AUDIT: ${have_audit}
81611586 968 IMA: ${have_ima}
12716238 969 SELinux: ${have_selinux}
2b3e18de 970 SMACK: ${have_smack}
807e17f0 971 XZ: ${have_xz}
5eda94dd 972 ACL: ${have_acl}
fb0951b0 973 XATTR: ${have_xattr}
7560fffc 974 GCRYPT: ${have_gcrypt}
f6a971bc 975 QRENCODE: ${have_qrencode}
7b17a7d7 976 MICROHTTPD: ${have_microhttpd}
77e68fa2 977 CHKCONFIG: ${have_chkconfig}
27669061 978 binfmt: ${have_binfmt}
e5e83e83
LP
979 vconsole: ${have_vconsole}
980 readahead: ${have_readahead}
83fdc450 981 bootchart: ${have_bootchart}
4de85612 982 quotacheck: ${have_quotacheck}
6351163b 983 tmpfiles: ${have_tmpfiles}
4de85612 984 randomseed: ${have_randomseed}
2a018e83 985 logind: ${have_logind}
1ee306e1 986 machined: ${have_machined}
b2e9fb99 987 hostnamed: ${have_hostnamed}
f47cd184 988 timedated: ${have_timedated}
4cd1eaa5 989 localed: ${have_localed}
f5e04665 990 coredump: ${have_coredump}
46ba8aae 991 polkit: ${have_polkit}
b872e9a0 992 efi: ${have_efi}
e3043162 993 kmod: ${have_kmod}
f553b3b1 994 blkid: ${have_blkid}
d562955e 995 nss-myhostname: ${have_myhostname}
3e214785
KS
996 gudev: ${enable_gudev}
997 gintrospection: ${enable_introspection}
998 keymap: ${enable_keymap}
8d7e170a
LP
999 Python: ${have_python}
1000 Python Headers: ${have_python_devel}
2f4da3e6
ZJS
1001 man pages: ${have_manpages}
1002 gtk-doc: ${enable_gtk_doc}
1003 Split /usr: ${enable_split_usr}
1004 SysV compatibility: ${SYSTEM_SYSV_COMPAT}
3e214785 1005
8c4a3079 1006 prefix: ${prefix}
b8079ae1 1007 rootprefix: ${with_rootprefix}
3e214785
KS
1008 sysconf dir: ${sysconfdir}
1009 datarootdir: ${datarootdir}
1010 includedir: ${includedir}
1011 include_prefix: ${INCLUDE_PREFIX}
ae446765
KS
1012 lib dir: ${libdir}
1013 rootlib dir: ${with_rootlibdir}
2f4da3e6
ZJS
1014 SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
1015 SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
1016 Build Python: ${PYTHON}
1017 Installation Python: ${PYTHON_BINARY}
1018 firmware path: ${FIRMWARE_PATH}
2c6db6fb 1019 PAM modules dir: ${with_pamlibdir}
2c6db6fb
LP
1020 D-Bus policy dir: ${with_dbuspolicydir}
1021 D-Bus session dir: ${with_dbussessionservicedir}
1022 D-Bus system dir: ${with_dbussystemservicedir}
1023 D-Bus interfaces dir: ${with_dbusinterfacedir}
db059f1b 1024 Bash completions dir: ${with_bashcompletiondir}
b1c4ca25
LP
1025 Extra start script: ${RC_LOCAL_SCRIPT_PATH_START}
1026 Extra stop script: ${RC_LOCAL_SCRIPT_PATH_STOP}
45df1f2c 1027 Debug shell: ${SUSHELL} @ ${DEBUGTTY}
66be6554 1028
5a45a936 1029 CFLAGS: ${OUR_CFLAGS} ${CFLAGS}
1f048a6b 1030 CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS}
5a45a936 1031 LDFLAGS: ${OUR_LDFLAGS} ${LDFLAGS}
568c7e02
ZJS
1032 PYTHON_CFLAGS: ${PYTHON_CFLAGS}
1033 PYTHON_LIBS: ${PYTHON_LIBS}
ae446765 1034])