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