]> git.ipfire.org Git - thirdparty/systemd.git/blame - configure.ac
bus: make sure introspection can be generated correctly with NULL method signatures
[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
272 PKG_CHECK_MODULES(KMOD, [ libkmod >= 14 ],
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
3e214785 707# ------------------------------------------------------------------------------
2a018e83
KS
708have_logind=no
709AC_ARG_ENABLE(logind, AS_HELP_STRING([--disable-logind], [disable login daemon]))
710if test "x$enable_logind" != "xno"; then
be31376e 711 have_logind=yes
2a018e83
KS
712fi
713AM_CONDITIONAL(ENABLE_LOGIND, [test "$have_logind" = "yes"])
4c80c73c 714AS_IF([test "$have_logind" = "yes"], [ AC_DEFINE(HAVE_LOGIND, [1], [Logind support available]) ])
2a018e83 715
1ee306e1
LP
716# ------------------------------------------------------------------------------
717have_machined=no
718AC_ARG_ENABLE(machined, AS_HELP_STRING([--disable-machined], [disable machine daemon]))
719if test "x$enable_machined" != "xno"; then
720 have_machined=yes
721fi
722AM_CONDITIONAL(ENABLE_MACHINED, [test "$have_machined" = "yes"])
723AS_IF([test "$have_machined" = "yes"], [ AC_DEFINE(HAVE_MACHINED, [1], [Machined support available]) ])
724
3e214785 725# ------------------------------------------------------------------------------
b2e9fb99
MV
726have_hostnamed=no
727AC_ARG_ENABLE(hostnamed, AS_HELP_STRING([--disable-hostnamed], [disable hostname daemon]))
728if test "x$enable_hostnamed" != "xno"; then
be31376e 729 have_hostnamed=yes
b2e9fb99
MV
730fi
731AM_CONDITIONAL(ENABLE_HOSTNAMED, [test "$have_hostnamed" = "yes"])
732
3e214785 733# ------------------------------------------------------------------------------
f47cd184
MV
734have_timedated=no
735AC_ARG_ENABLE(timedated, AS_HELP_STRING([--disable-timedated], [disable timedate daemon]))
736if test "x$enable_timedated" != "xno"; then
be31376e 737 have_timedated=yes
f47cd184
MV
738fi
739AM_CONDITIONAL(ENABLE_TIMEDATED, [test "$have_timedated" = "yes"])
740
3e214785 741# ------------------------------------------------------------------------------
4cd1eaa5
MV
742have_localed=no
743AC_ARG_ENABLE(localed, AS_HELP_STRING([--disable-localed], [disable locale daemon]))
744if test "x$enable_localed" != "xno"; then
be31376e 745 have_localed=yes
4cd1eaa5
MV
746fi
747AM_CONDITIONAL(ENABLE_LOCALED, [test "$have_localed" = "yes"])
748
3e214785 749# ------------------------------------------------------------------------------
f5e04665
LP
750have_coredump=no
751AC_ARG_ENABLE(coredump, AS_HELP_STRING([--disable-coredump], [disable coredump hook]))
752if test "x$enable_coredump" != "xno"; then
be31376e 753 have_coredump=yes
f5e04665
LP
754fi
755AM_CONDITIONAL(ENABLE_COREDUMP, [test "$have_coredump" = "yes"])
756
46ba8aae
LP
757# ------------------------------------------------------------------------------
758have_polkit=no
759AC_ARG_ENABLE(polkit, AS_HELP_STRING([--disable-polkit], [disable PolicyKit support]))
760if test "x$enable_polkit" != "xno"; then
761 AC_DEFINE(ENABLE_POLKIT, 1, [Define if PolicyKit support is to be enabled])
762 have_polkit=yes
763fi
764AM_CONDITIONAL(ENABLE_POLKIT, [test "x$have_polkit" = "xyes"])
765
b872e9a0
LP
766# ------------------------------------------------------------------------------
767have_efi=no
768AC_ARG_ENABLE(efi, AS_HELP_STRING([--disable-efi], [disable EFI support]))
769if test "x$enable_efi" != "xno"; then
770 AC_DEFINE(ENABLE_EFI, 1, [Define if EFI support is to be enabled])
771 have_efi=yes
772fi
773AM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"])
774
b1c4ca25
LP
775# ------------------------------------------------------------------------------
776AC_ARG_WITH(rc-local-script-path-start,
777 AS_HELP_STRING([--with-rc-local-script-path-start=PATH],
778 [Path to /etc/rc.local]),
779 [RC_LOCAL_SCRIPT_PATH_START="$withval"],
780 [RC_LOCAL_SCRIPT_PATH_START="/etc/rc.local"])
781
782AC_ARG_WITH(rc-local-script-path-stop,
783 AS_HELP_STRING([--with-rc-local-script-path-stop=PATH],
bc270841 784 [Path to /usr/sbin/halt.local]),
b1c4ca25 785 [RC_LOCAL_SCRIPT_PATH_STOP="$withval"],
bc270841 786 [RC_LOCAL_SCRIPT_PATH_STOP="/usr/sbin/halt.local"])
b1c4ca25
LP
787
788AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_START, ["$RC_LOCAL_SCRIPT_PATH_START"], [Path of /etc/rc.local script])
bc270841 789AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_STOP, ["$RC_LOCAL_SCRIPT_PATH_STOP"], [Path of /usr/sbin/halt.local script])
b1c4ca25
LP
790
791AC_SUBST(RC_LOCAL_SCRIPT_PATH_START)
792AC_SUBST(RC_LOCAL_SCRIPT_PATH_STOP)
793
a382332e
LP
794# ------------------------------------------------------------------------------
795AC_ARG_WITH(kbd-loadkeys,
796 AS_HELP_STRING([--with-kbd-loadkeys=PATH],
797 [Path to loadkeys]),
798 [KBD_LOADKEYS="$withval"],
799 [KBD_LOADKEYS="/usr/bin/loadkeys"])
800
801AC_ARG_WITH(kbd-setfont,
802 AS_HELP_STRING([--with-kbd-setfont=PATH],
803 [Path to setfont]),
804 [KBD_SETFONT="$withval"],
805 [KBD_SETFONT="/usr/bin/setfont"])
806
807AC_DEFINE_UNQUOTED(KBD_LOADKEYS, ["$KBD_LOADKEYS"], [Path of loadkeys])
808AC_DEFINE_UNQUOTED(KBD_SETFONT, ["$KBD_SETFONT"], [Path of setfont])
809
810AC_SUBST(KBD_LOADKEYS)
811AC_SUBST(KBD_SETFONT)
812
4ad61fd1
CR
813AC_ARG_WITH(telinit,
814 AS_HELP_STRING([--with-telinit=PATH],
815 [Path to telinit]),
816 [TELINIT="$withval"],
abaaabf4 817 [TELINIT="/lib/sysvinit/telinit"])
4ad61fd1
CR
818
819AC_DEFINE_UNQUOTED(TELINIT, ["$TELINIT"], [Path to telinit])
820
821AC_SUBST(TELINIT)
822
7211f918
LP
823AC_CHECK_HEADERS_ONCE([valgrind/memcheck.h])
824
d562955e
TG
825# ------------------------------------------------------------------------------
826have_myhostname=no
f8c5a581 827AC_ARG_ENABLE(myhostname, AS_HELP_STRING([--disable-myhostname], [disable nss-myhostname support]))
d562955e
TG
828if test "x$enable_myhostname" != "xno"; then
829 AC_HEADER_STDC
a3b6fafe 830 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
831
832 AC_C_CONST
833 AC_TYPE_SIZE_T
834 AC_HEADER_TIME
835
836 AC_FUNC_MALLOC
837 AC_FUNC_SELECT_ARGTYPES
838 AC_CHECK_FUNCS([gethostbyaddr gethostbyname gettimeofday inet_ntoa memset select socket strcspn strdup strerror strncasecmp strcasecmp strspn])
839
840 have_myhostname=yes
841fi
842AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"])
843
3e214785
KS
844# ------------------------------------------------------------------------------
845AC_ARG_WITH(firmware-path,
846 AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]],
a3bd8447
TG
847 [Firmware search path (default="")]),
848 [], [with_firmware_path=""])
3e214785
KS
849OLD_IFS=$IFS
850IFS=:
851for i in $with_firmware_path; do
852 if test "x${FIRMWARE_PATH}" = "x"; then
853 FIRMWARE_PATH="\\\"${i}/\\\""
854 else
855 FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\""
856 fi
857done
858IFS=$OLD_IFS
a3bd8447 859AC_SUBST(FIRMWARE_PATH)
d8d4bee7 860AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ])
a3bd8447 861AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"])
3e214785
KS
862
863# ------------------------------------------------------------------------------
864AC_ARG_ENABLE([gudev],
865 AS_HELP_STRING([--disable-gudev], [disable Gobject libudev support @<:@default=enabled@:>@]),
866 [], [enable_gudev=yes])
de1c301e 867AS_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 868AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"])
de1c301e
LP
869AS_IF([test "x$enable_gudev" = "xyes"], [ AC_DEFINE(HAVE_GLIB, 1, [Define if glib is available]) ])
870
3e214785 871# ------------------------------------------------------------------------------
75db9a77 872have_manpages=no
4c2b0e4e 873AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages]))
fe1fed02
ZJS
874AS_IF([test "x$enable_manpages" != xno], [
875 AS_IF([test "x$enable_manpages" = xyes -a "x$XSLTPROC" = x], [
876 AC_MSG_ERROR([*** Manpages requested but xsltproc not found])
877 ])
878 AS_IF([test "x$XSLTPROC" != x], [have_manpages=yes])
879])
880AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
75db9a77 881
3e214785 882# ------------------------------------------------------------------------------
d1ab0ca0 883
34eff652
LP
884# Location of the init scripts as mandated by LSB
885SYSTEM_SYSVINIT_PATH=/etc/init.d
f1dd0c3f 886SYSTEM_SYSVRCND_PATH=/etc/rc.d
f975e971 887M4_DEFINES=
12e84679 888
136337ff 889AC_ARG_WITH([sysvinit-path],
be31376e 890 [AS_HELP_STRING([--with-sysvinit-path=PATH],
bc270841 891 [Specify the path to where the SysV init scripts are located])],
be31376e
KS
892 [SYSTEM_SYSVINIT_PATH="$withval"],
893 [])
136337ff 894
dee4c244
LP
895AC_ARG_WITH([sysvrcnd-path],
896 [AS_HELP_STRING([--with-sysvrcnd-path=PATH],
bc270841 897 [Specify the path to the base directory for the SysV rcN.d directories])],
136337ff
TFH
898 [SYSTEM_SYSVRCND_PATH="$withval"],
899 [])
900
07459bb6
FF
901if test "x${SYSTEM_SYSVINIT_PATH}" != "x" -a "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
902 AC_DEFINE(HAVE_SYSV_COMPAT, [], [SysV init scripts and rcN.d links are supported.])
903 SYSTEM_SYSV_COMPAT="yes"
f975e971 904 M4_DEFINES="$M4_DEFINES -DHAVE_SYSV_COMPAT"
07459bb6 905elif test "x${SYSTEM_SYSVINIT_PATH}" != "x" -o "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
dee4c244 906 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
907else
908 SYSTEM_SYSV_COMPAT="no"
909fi
910
bc270841
LP
911AC_SUBST(SYSTEM_SYSVINIT_PATH)
912AC_SUBST(SYSTEM_SYSVRCND_PATH)
913AC_SUBST(M4_DEFINES)
914
915AM_CONDITIONAL(HAVE_SYSV_COMPAT, test "$SYSTEM_SYSV_COMPAT" = "yes")
916
bef2733f 917AC_ARG_WITH([tty-gid],
a05ea46d 918 [AS_HELP_STRING([--with-tty-gid=GID],
bef2733f
LP
919 [Specify the numeric GID of the 'tty' group])],
920 [AC_DEFINE_UNQUOTED(TTY_GID, [$withval], [GID of the 'tty' group])],
921 [])
922
d2d12cd1
LP
923AC_ARG_WITH([dbuspolicydir],
924 AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
925 [],
25ee45f9 926 [with_dbuspolicydir=$($PKG_CONFIG --variable=sysconfdir dbus-1)/dbus-1/system.d])
d122948d 927
d2d12cd1
LP
928AC_ARG_WITH([dbussessionservicedir],
929 AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]),
930 [],
25ee45f9 931 [with_dbussessionservicedir=$($PKG_CONFIG --variable=session_bus_services_dir dbus-1)])
d122948d 932
d2d12cd1
LP
933AC_ARG_WITH([dbussystemservicedir],
934 AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]),
935 [],
03c14914 936 [with_dbussystemservicedir=$(readlink -m $($PKG_CONFIG --variable=session_bus_services_dir dbus-1)/../system-services)])
d122948d 937
d2d12cd1
LP
938AC_ARG_WITH([dbusinterfacedir],
939 AS_HELP_STRING([--with-dbusinterfacedir=DIR], [D-Bus interface directory]),
940 [],
03c14914 941 [with_dbusinterfacedir=$(readlink -m $($PKG_CONFIG --variable=session_bus_services_dir dbus-1)/../interfaces)])
d122948d 942
db059f1b
MB
943AC_ARG_WITH([bashcompletiondir],
944 AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]),
945 [],
25ee45f9
MB
946 [AS_IF([$($PKG_CONFIG --exists bash-completion)], [
947 with_bashcompletiondir=$($PKG_CONFIG --variable=completionsdir bash-completion)
db059f1b
MB
948 ] , [
949 with_bashcompletiondir=${datadir}/bash-completion/completions
950 ])])
951
4f87c47b
WG
952AC_ARG_WITH([zshcompletiondir],
953 AS_HELP_STRING([--with-zshcompletiondir=DIR], [Zsh completions directory]),
954 [], [with_zshcompletiondir=${datadir}/zsh/site-functions])
955
b8079ae1
KS
956AC_ARG_WITH([rootprefix],
957 AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
39ad55a9 958 [], [with_rootprefix=${ac_default_prefix}])
d2d12cd1 959
ae446765
KS
960AC_ARG_WITH([rootlibdir],
961 AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]),
962 [],
963 [with_rootlibdir=${libdir}])
964
9d3203b4 965AC_ARG_WITH([pamlibdir],
b0cca7d8 966 AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
9d3203b4
KS
967 [],
968 [with_pamlibdir=${with_rootlibdir}/security])
969
5c390a4a
ZJS
970AC_ARG_WITH([pamconfdir],
971 AS_HELP_STRING([--with-pamconfdir=DIR], [Directory for PAM configuration]),
972 [],
973 [with_pamconfdir=${sysconfdir}/pam.d])
974
bc9bdbba
MG
975AC_ARG_ENABLE([split-usr],
976 AS_HELP_STRING([--enable-split-usr], [Assume that /bin, /sbin aren\'t symlinks into /usr]),
977 [],
978 [AS_IF([test "x${ac_default_prefix}" != "x${with_rootprefix}"], [
979 enable_split_usr=yes
980 ], [
981 enable_split_usr=no
982 ])])
983
984AS_IF([test "x${enable_split_usr}" = "xyes"], [
2c6db6fb 985 AC_DEFINE(HAVE_SPLIT_USR, 1, [Define if /bin, /sbin aren't symlinks into /usr])
bc9bdbba 986])
2c6db6fb 987
6fc00209
ZJS
988# Work around intltoolize and gtk-doc problems in VPATH builds
989AM_CONDITIONAL([ENABLE_GTK_DOC_TESTS], [test "x$0" = "x./configure"],
990 [Define to do gtk-doc tests])
991AS_IF([test "x$0" != "x./configure"], [
992 AC_SUBST([INTLTOOL_UPDATE], [/bin/true])
993])
994
cee22bd3
HGB
995AC_ARG_ENABLE(tests,
996 [AC_HELP_STRING([--disable-tests], [disable tests])],
997 enable_tests=$enableval, enable_tests=yes)
998AM_CONDITIONAL(ENABLE_TESTS, [test x$enable_tests = xyes])
999
d2d12cd1
LP
1000AC_SUBST([dbuspolicydir], [$with_dbuspolicydir])
1001AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir])
1002AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
1003AC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir])
db059f1b 1004AC_SUBST([bashcompletiondir], [$with_bashcompletiondir])
4f87c47b 1005AC_SUBST([zshcompletiondir], [$with_zshcompletiondir])
8c6db833 1006AC_SUBST([pamlibdir], [$with_pamlibdir])
5c390a4a 1007AC_SUBST([pamconfdir], [$with_pamconfdir])
b8079ae1 1008AC_SUBST([rootprefix], [$with_rootprefix])
ae446765 1009AC_SUBST([rootlibdir], [$with_rootlibdir])
8c4a3079 1010
3e214785
KS
1011AC_CONFIG_FILES([
1012 Makefile po/Makefile.in
bb061708
KS
1013 docs/libudev/Makefile
1014 docs/libudev/version.xml
1015 docs/gudev/Makefile
1016 docs/gudev/version.xml
3e214785
KS
1017])
1018
a45a909f 1019AC_OUTPUT
ae446765 1020AC_MSG_RESULT([
0571e011
LP
1021 $PACKAGE_NAME $VERSION
1022
7f4e0805 1023 libcryptsetup: ${have_libcryptsetup}
5b6319dc
LP
1024 tcpwrap: ${have_tcpwrap}
1025 PAM: ${have_pam}
12716238 1026 AUDIT: ${have_audit}
81611586 1027 IMA: ${have_ima}
12716238 1028 SELinux: ${have_selinux}
2b3e18de 1029 SMACK: ${have_smack}
807e17f0 1030 XZ: ${have_xz}
5eda94dd 1031 ACL: ${have_acl}
fb0951b0 1032 XATTR: ${have_xattr}
7560fffc 1033 GCRYPT: ${have_gcrypt}
f6a971bc 1034 QRENCODE: ${have_qrencode}
7b17a7d7 1035 MICROHTTPD: ${have_microhttpd}
77e68fa2 1036 CHKCONFIG: ${have_chkconfig}
27669061 1037 binfmt: ${have_binfmt}
e5e83e83
LP
1038 vconsole: ${have_vconsole}
1039 readahead: ${have_readahead}
83fdc450 1040 bootchart: ${have_bootchart}
4de85612 1041 quotacheck: ${have_quotacheck}
6351163b 1042 tmpfiles: ${have_tmpfiles}
4de85612 1043 randomseed: ${have_randomseed}
3731acf1 1044 backlight: ${have_backlight}
2a018e83 1045 logind: ${have_logind}
1ee306e1 1046 machined: ${have_machined}
b2e9fb99 1047 hostnamed: ${have_hostnamed}
f47cd184 1048 timedated: ${have_timedated}
4cd1eaa5 1049 localed: ${have_localed}
f5e04665 1050 coredump: ${have_coredump}
46ba8aae 1051 polkit: ${have_polkit}
b872e9a0 1052 efi: ${have_efi}
e3043162 1053 kmod: ${have_kmod}
f553b3b1 1054 blkid: ${have_blkid}
d562955e 1055 nss-myhostname: ${have_myhostname}
3e214785
KS
1056 gudev: ${enable_gudev}
1057 gintrospection: ${enable_introspection}
8d7e170a
LP
1058 Python: ${have_python}
1059 Python Headers: ${have_python_devel}
2f4da3e6
ZJS
1060 man pages: ${have_manpages}
1061 gtk-doc: ${enable_gtk_doc}
6aea6d10 1062 test coverage: ${have_coverage}
2f4da3e6
ZJS
1063 Split /usr: ${enable_split_usr}
1064 SysV compatibility: ${SYSTEM_SYSV_COMPAT}
3e214785 1065
8c4a3079 1066 prefix: ${prefix}
b8079ae1 1067 rootprefix: ${with_rootprefix}
3e214785
KS
1068 sysconf dir: ${sysconfdir}
1069 datarootdir: ${datarootdir}
1070 includedir: ${includedir}
1071 include_prefix: ${INCLUDE_PREFIX}
ae446765
KS
1072 lib dir: ${libdir}
1073 rootlib dir: ${with_rootlibdir}
2f4da3e6
ZJS
1074 SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
1075 SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
1076 Build Python: ${PYTHON}
1077 Installation Python: ${PYTHON_BINARY}
f2ec0646 1078 sphinx binary: ${SPHINX_BUILD}
2f4da3e6 1079 firmware path: ${FIRMWARE_PATH}
2c6db6fb 1080 PAM modules dir: ${with_pamlibdir}
5c390a4a 1081 PAM configuration dir: ${with_pamconfdir}
2c6db6fb
LP
1082 D-Bus policy dir: ${with_dbuspolicydir}
1083 D-Bus session dir: ${with_dbussessionservicedir}
1084 D-Bus system dir: ${with_dbussystemservicedir}
1085 D-Bus interfaces dir: ${with_dbusinterfacedir}
db059f1b 1086 Bash completions dir: ${with_bashcompletiondir}
4f87c47b 1087 Zsh completions dir: ${with_zshcompletiondir}
b1c4ca25
LP
1088 Extra start script: ${RC_LOCAL_SCRIPT_PATH_START}
1089 Extra stop script: ${RC_LOCAL_SCRIPT_PATH_STOP}
45df1f2c 1090 Debug shell: ${SUSHELL} @ ${DEBUGTTY}
66be6554 1091
5a45a936 1092 CFLAGS: ${OUR_CFLAGS} ${CFLAGS}
1f048a6b 1093 CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS}
5a45a936 1094 LDFLAGS: ${OUR_LDFLAGS} ${LDFLAGS}
a6c0b31d
ZJS
1095 PYTHON_CFLAGS: ${PYTHON_DEVEL_CFLAGS}
1096 PYTHON_LIBS: ${PYTHON_DEVEL_LIBS}
ae446765 1097])