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