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