]> git.ipfire.org Git - thirdparty/systemd.git/blob - configure.ac
logind: introduce ActivateSessionOnSeat()
[thirdparty/systemd.git] / configure.ac
1 # This file is part of systemd.
2 #
3 # Copyright 2010 Lennart Poettering
4 #
5 # systemd is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 #
10 # systemd is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with systemd; If not, see <http://www.gnu.org/licenses/>.
17
18 AC_PREREQ(2.63)
19
20 AC_INIT([systemd],[40],[systemd-devel@lists.freedesktop.org])
21 AC_CONFIG_SRCDIR([src/main.c])
22 AC_CONFIG_MACRO_DIR([m4])
23 AC_CONFIG_HEADERS([config.h])
24 AC_USE_SYSTEM_EXTENSIONS
25 AC_SYS_LARGEFILE
26 AC_PREFIX_DEFAULT([/usr])
27 AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects check-news])
28
29 AC_SUBST(PACKAGE_URL, [http://www.freedesktop.org/wiki/Software/systemd])
30
31 AC_CANONICAL_HOST
32 AC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.])
33 AS_IF([test "x$host_cpu" = "xmips" || test "x$host_cpu" = "xmipsel" ||
34 test "x$host_cpu" = "xmips64" || test "x$host_cpu" = "xmips64el"],
35 [AC_DEFINE(ARCH_MIPS, [], [Whether on mips arch])])
36
37 AM_SILENT_RULES([yes])
38
39 # i18n stuff for the PolicyKit policy files
40 IT_PROG_INTLTOOL([0.40.0])
41
42 GETTEXT_PACKAGE=systemd
43 AC_SUBST(GETTEXT_PACKAGE)
44
45 AC_PROG_MKDIR_P
46 AC_PROG_LN_S
47 AC_PROG_SED
48 AC_PROG_AWK
49
50 AC_PROG_CC
51 AC_PROG_CC_C99
52 AM_PROG_CC_C_O
53 AC_PROG_GCC_TRADITIONAL
54
55 AC_CHECK_TOOL(OBJCOPY, objcopy)
56 AC_CHECK_TOOL(STRINGS, strings)
57 AC_CHECK_TOOL(GPERF, gperf)
58 if test -z "$GPERF" ; then
59 AC_MSG_ERROR([*** gperf not found])
60 fi
61
62 CC_CHECK_CFLAGS_APPEND([ \
63 -pipe \
64 -Wall \
65 -W \
66 -Wextra \
67 -Wno-inline \
68 -Wvla \
69 -Wundef \
70 -Wformat=2 \
71 -Wlogical-op \
72 -Wsign-compare \
73 -Wformat-security \
74 -Wmissing-include-dirs \
75 -Wformat-nonliteral \
76 -Wold-style-definition \
77 -Wpointer-arith \
78 -Winit-self \
79 -Wdeclaration-after-statement \
80 -Wfloat-equal \
81 -Wmissing-prototypes \
82 -Wstrict-prototypes \
83 -Wredundant-decls \
84 -Wmissing-declarations \
85 -Wmissing-noreturn \
86 -Wshadow \
87 -Wendif-labels \
88 -Wcast-align \
89 -Wstrict-aliasing=2 \
90 -Wwrite-strings \
91 -Wno-long-long \
92 -Wno-overlength-strings \
93 -Wno-unused-parameter \
94 -Wno-missing-field-initializers \
95 -Wno-unused-result \
96 -Werror=overflow \
97 -Wp,-D_FORTIFY_SOURCE=2 \
98 -ffast-math \
99 -fno-common \
100 -fdiagnostics-show-option \
101 -fno-strict-aliasing \
102 -fvisibility=hidden \
103 -ffunction-sections \
104 -fdata-sections \
105 -Wl,--as-needed \
106 -Wl,--gc-sections])
107
108 LT_PREREQ(2.2)
109 LT_INIT
110
111 AC_SEARCH_LIBS([clock_gettime], [rt], [], [AC_MSG_ERROR([*** POSIX RT library not found])])
112 AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
113
114 save_LIBS="$LIBS"
115 LIBS=
116 AC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])])
117 AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
118 CAP_LIBS="$LIBS"
119 LIBS="$save_LIBS"
120 AC_SUBST(CAP_LIBS)
121
122 # This makes sure pkg.m4 is available.
123 m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
124
125 PKG_CHECK_MODULES(UDEV, [ libudev >= 172 ])
126 AC_SUBST(UDEV_CFLAGS)
127 AC_SUBST(UDEV_LIBS)
128
129 PKG_CHECK_MODULES(DBUS, [ dbus-1 >= 1.3.2 ])
130 AC_SUBST(DBUS_CFLAGS)
131 AC_SUBST(DBUS_LIBS)
132
133 have_selinux=no
134 AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
135 if test "x$enable_selinux" != "xno"; then
136 PKG_CHECK_MODULES(SELINUX, [ libselinux ],
137 [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available]) have_selinux=yes], have_selinux=no)
138 AC_SUBST(SELINUX_CFLAGS)
139 AC_SUBST(SELINUX_LIBS)
140 if test "x$have_selinux" = xno -a "x$enable_selinux" = xyes; then
141 AC_MSG_ERROR([*** SELinux support requested but libraries not found])
142 fi
143 fi
144 AM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"])
145
146 have_xz=no
147 AC_ARG_ENABLE(xz, AS_HELP_STRING([--disable-xz], [Disable optional XZ support]))
148 if test "x$enable_xz" != "xno"; then
149 PKG_CHECK_MODULES(XZ, [ liblzma ],
150 [AC_DEFINE(HAVE_XZ, 1, [Define if XZ is available]) have_xz=yes], have_xz=no)
151 AC_SUBST(XZ_CFLAGS)
152 AC_SUBST(XZ_LIBS)
153 if test "x$have_xz" = xno -a "x$enable_xz" = xyes; then
154 AC_MSG_ERROR([*** Xz support requested but libraries not found])
155 fi
156 fi
157 AM_CONDITIONAL(HAVE_XZ, [test "$have_xz" = "yes"])
158
159 AC_ARG_ENABLE([tcpwrap],
160 AS_HELP_STRING([--disable-tcpwrap],[Disable optional TCP wrappers support]),
161 [case "${enableval}" in
162 yes) have_tcpwrap=yes ;;
163 no) have_tcpwrap=no ;;
164 *) AC_MSG_ERROR(bad value ${enableval} for --disable-tcpwrap) ;;
165 esac],
166 [have_tcpwrap=auto])
167
168 if test "x${have_tcpwrap}" != xno ; then
169 ACX_LIBWRAP
170 if test "x${LIBWRAP_LIBS}" = x ; then
171 if test "x$have_tcpwrap" = xyes ; then
172 AC_MSG_ERROR([*** TCP wrappers support not found.])
173 fi
174 have_tcpwrap=no
175 else
176 have_tcpwrap=yes
177 fi
178 else
179 LIBWRAP_LIBS=
180 fi
181 AC_SUBST(LIBWRAP_LIBS)
182
183 AC_ARG_ENABLE([pam],
184 AS_HELP_STRING([--disable-pam],[Disable optional PAM support]),
185 [case "${enableval}" in
186 yes) have_pam=yes ;;
187 no) have_pam=no ;;
188 *) AC_MSG_ERROR(bad value ${enableval} for --disable-pam) ;;
189 esac],
190 [have_pam=auto])
191
192 if test "x${have_pam}" != xno ; then
193 AC_CHECK_HEADERS(
194 [security/pam_modules.h security/pam_modutil.h security/pam_ext.h],
195 [have_pam=yes],
196 [if test "x$have_pam" = xyes ; then
197 AC_MSG_ERROR([*** PAM headers not found.])
198 fi])
199
200 AC_CHECK_LIB(
201 [pam],
202 [pam_syslog],
203 [have_pam=yes],
204 [if test "x$have_pam" = xyes ; then
205 AC_MSG_ERROR([*** libpam not found.])
206 fi])
207
208 if test "x$have_pam" = xyes ; then
209 PAM_LIBS="-lpam -lpam_misc"
210 AC_DEFINE(HAVE_PAM, 1, [PAM available])
211 else
212 have_pam=no
213 fi
214 else
215 PAM_LIBS=
216 fi
217 AC_SUBST(PAM_LIBS)
218 AM_CONDITIONAL([HAVE_PAM], [test "x$have_pam" != xno])
219
220 AC_ARG_ENABLE([acl],
221 AS_HELP_STRING([--disable-acl],[Disable optional ACL support]),
222 [case "${enableval}" in
223 yes) have_acl=yes ;;
224 no) have_acl=no ;;
225 *) AC_MSG_ERROR(bad value ${enableval} for --disable-acl) ;;
226 esac],
227 [have_acl=auto])
228
229 if test "x${have_acl}" != xno ; then
230 AC_CHECK_HEADERS(
231 [sys/acl.h acl/libacl.h],
232 [have_acl=yes],
233 [if test "x$have_acl" = xyes ; then
234 AC_MSG_ERROR([*** ACL headers not found.])
235 fi])
236
237 AC_CHECK_LIB(
238 [acl],
239 [acl_get_file],
240 [have_acl=yes],
241 [if test "x$have_acl" = xyes ; then
242 AC_MSG_ERROR([*** libacl not found.])
243 fi])
244
245 if test "x$have_acl" = xyes ; then
246 ACL_LIBS="-lacl"
247 AC_DEFINE(HAVE_ACL, 1, [ACL available])
248 else
249 have_acl=no
250 fi
251 else
252 ACL_LIBS=
253 fi
254 AC_SUBST(ACL_LIBS)
255 AM_CONDITIONAL([HAVE_ACL], [test "x$have_acl" != xno])
256
257 AC_ARG_ENABLE([audit],
258 AS_HELP_STRING([--disable-audit],[Disable optional AUDIT support]),
259 [case "${enableval}" in
260 yes) have_audit=yes ;;
261 no) have_audit=no ;;
262 *) AC_MSG_ERROR(bad value ${enableval} for --disable-audit) ;;
263 esac],
264 [have_audit=auto])
265
266 if test "x${have_audit}" != xno ; then
267 AC_CHECK_HEADERS(
268 [libaudit.h],
269 [have_audit=yes],
270 [if test "x$have_audit" = xyes ; then
271 AC_MSG_ERROR([*** AUDIT headers not found.])
272 fi])
273
274 AC_CHECK_LIB(
275 [audit],
276 [audit_open],
277 [have_audit=yes],
278 [if test "x$have_audit" = xyes ; then
279 AC_MSG_ERROR([*** libaudit not found.])
280 fi])
281
282 if test "x$have_audit" = xyes ; then
283 AUDIT_LIBS="-laudit"
284 AC_DEFINE(HAVE_AUDIT, 1, [AUDIT available])
285 else
286 have_audit=no
287 fi
288 else
289 AUDIT_LIBS=
290 fi
291 AC_SUBST(AUDIT_LIBS)
292
293 have_libcryptsetup=no
294 AC_ARG_ENABLE(libcryptsetup, AS_HELP_STRING([--disable-libcryptsetup], [disable libcryptsetup tools]))
295 if test "x$enable_libcryptsetup" != "xno"; then
296 PKG_CHECK_MODULES(LIBCRYPTSETUP, [ libcryptsetup ],
297 [AC_DEFINE(HAVE_LIBCRYPTSETUP, 1, [Define if libcryptsetup is available]) have_libcryptsetup=yes], have_libcryptsetup=no)
298 AC_SUBST(LIBCRYPTSETUP_CFLAGS)
299 AC_SUBST(LIBCRYPTSETUP_LIBS)
300 if test "x$have_libcryptsetup" = xno -a "x$enable_libcryptsetup" = xyes; then
301 AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found])
302 fi
303 fi
304 AM_CONDITIONAL(HAVE_LIBCRYPTSETUP, [test "$have_libcryptsetup" = "yes"])
305
306 have_binfmt=no
307 AC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool]))
308 if test "x$enable_binfmt" != "xno"; then
309 have_binfmt=yes
310 fi
311 AM_CONDITIONAL(ENABLE_BINFMT, [test "$have_binfmt" = "yes"])
312
313 have_vconsole=no
314 AC_ARG_ENABLE(vconsole, AS_HELP_STRING([--disable-vconsole], [disable vconsole tool]))
315 if test "x$enable_vconsole" != "xno"; then
316 have_vconsole=yes
317 fi
318 AM_CONDITIONAL(ENABLE_VCONSOLE, [test "$have_vconsole" = "yes"])
319
320 have_readahead=no
321 AC_ARG_ENABLE(readahead, AS_HELP_STRING([--disable-readahead], [disable readahead tools]))
322 if test "x$enable_readahead" != "xno"; then
323 have_readahead=yes
324 fi
325 AM_CONDITIONAL(ENABLE_READAHEAD, [test "$have_readahead" = "yes"])
326
327 have_quotacheck=no
328 AC_ARG_ENABLE(quotacheck, AS_HELP_STRING([--disable-quotacheck], [disable quotacheck tools]))
329 if test "x$enable_quotacheck" != "xno"; then
330 have_quotacheck=yes
331 fi
332 AM_CONDITIONAL(ENABLE_QUOTACHECK, [test "$have_quotacheck" = "yes"])
333
334 have_randomseed=no
335 AC_ARG_ENABLE(randomseed, AS_HELP_STRING([--disable-randomseed], [disable randomseed tools]))
336 if test "x$enable_randomseed" != "xno"; then
337 have_randomseed=yes
338 fi
339 AM_CONDITIONAL(ENABLE_RANDOMSEED, [test "$have_randomseed" = "yes"])
340
341 have_logind=no
342 AC_ARG_ENABLE(logind, AS_HELP_STRING([--disable-logind], [disable login daemon]))
343 if test "x$enable_logind" != "xno"; then
344 have_logind=yes
345 fi
346 AM_CONDITIONAL(ENABLE_LOGIND, [test "$have_logind" = "yes"])
347
348 have_hostnamed=no
349 AC_ARG_ENABLE(hostnamed, AS_HELP_STRING([--disable-hostnamed], [disable hostname daemon]))
350 if test "x$enable_hostnamed" != "xno"; then
351 have_hostnamed=yes
352 fi
353 AM_CONDITIONAL(ENABLE_HOSTNAMED, [test "$have_hostnamed" = "yes"])
354
355 have_timedated=no
356 AC_ARG_ENABLE(timedated, AS_HELP_STRING([--disable-timedated], [disable timedate daemon]))
357 if test "x$enable_timedated" != "xno"; then
358 have_timedated=yes
359 fi
360 AM_CONDITIONAL(ENABLE_TIMEDATED, [test "$have_timedated" = "yes"])
361
362 have_localed=no
363 AC_ARG_ENABLE(localed, AS_HELP_STRING([--disable-localed], [disable locale daemon]))
364 if test "x$enable_localed" != "xno"; then
365 have_localed=yes
366 fi
367 AM_CONDITIONAL(ENABLE_LOCALED, [test "$have_localed" = "yes"])
368
369 have_coredump=no
370 AC_ARG_ENABLE(coredump, AS_HELP_STRING([--disable-coredump], [disable coredump hook]))
371 if test "x$enable_coredump" != "xno"; then
372 have_coredump=yes
373 fi
374 AM_CONDITIONAL(ENABLE_COREDUMP, [test "$have_coredump" = "yes"])
375
376 have_gtk=no
377 AC_ARG_ENABLE(gtk, AS_HELP_STRING([--disable-gtk], [disable GTK tools]))
378 if test "x$enable_gtk" != "xno"; then
379 PKG_CHECK_MODULES(GTK, [ gtk+-2.0 glib-2.0 > 2.26 gio-unix-2.0 gee-1.0],
380 [AC_DEFINE(HAVE_GTK, 1, [Define if GTK is available]) have_gtk=yes], have_gtk=no)
381 AC_SUBST(GTK_CFLAGS)
382 AC_SUBST(GTK_LIBS)
383 if test "x$have_gtk" = xno -a "x$enable_gtk" = xyes; then
384 AC_MSG_ERROR([*** gtk support requested but libraries not found])
385 fi
386 fi
387 AM_CONDITIONAL(HAVE_GTK, [test "$have_gtk" = "yes"])
388
389 if test "$have_gtk" = "yes"; then
390 PKG_CHECK_MODULES(LIBNOTIFY, [ libnotify ])
391 AC_SUBST(LIBNOTIFY_CFLAGS)
392 AC_SUBST(LIBNOTIFY_LIBS)
393 fi
394
395 AM_PROG_VALAC([0.10])
396 AC_SUBST(VAPIDIR)
397 AM_CONDITIONAL(HAVE_VALAC, test x"$VALAC" != x)
398
399 AC_PATH_PROG([XSLTPROC], [xsltproc])
400 AM_CONDITIONAL(HAVE_XSLTPROC, test x"$XSLTPROC" != x)
401
402 AC_PATH_PROG([M4], [m4])
403
404 AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of fedora, suse, debian, ubuntu, arch, gentoo, slackware, altlinux or other]))
405 if test "z$with_distro" = "z"; then
406 if test "$cross_compiling" = yes; then
407 AC_MSG_WARN([Target distribution cannot be reliably detected when cross-compiling. You should specify it with --with-distro (see $0 --help for recognized distros)])
408 else
409 test -f "/etc/redhat-release" && with_distro="fedora"
410 test -f "/etc/SuSE-release" && with_distro="suse"
411 test -f "/etc/debian_version" && with_distro="debian"
412 test -f "/etc/arch-release" && with_distro="arch"
413 test -f "/etc/gentoo-release" && with_distro="gentoo"
414 test -f "/etc/slackware-version" && with_distro="slackware"
415 test -f "/etc/frugalware-release" && with_distro="frugalware"
416 test -f "/etc/altlinux-release" && with_distro="altlinux"
417 test -f "/etc/mandriva-release" && with_distro="mandriva"
418 test -f "/etc/meego-release" && with_distro="meego"
419 test -f "/etc/angstrom-version" && with_distro="angstrom"
420 test -f "/etc/mageia-release" && with_distro="mageia"
421 if test "x`lsb_release -is 2>/dev/null`" = "xUbuntu"; then
422 with_distro="ubuntu"
423 fi
424 fi
425 if test "z$with_distro" = "z"; then
426 with_distro=`uname -s`
427 fi
428 fi
429 with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' `
430 AC_DEFINE_UNQUOTED(DISTRIBUTION, ["${with_distro}"], [Target Distribution])
431
432 # Location of the init scripts as mandated by LSB
433 SYSTEM_SYSVINIT_PATH=/etc/init.d
434 SYSTEM_SYSVRCND_PATH=/etc/rc.d
435
436 M4_DEFINES=
437 have_plymouth=no
438
439 case $with_distro in
440 fedora)
441 SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
442 AC_DEFINE(TARGET_FEDORA, [], [Target is Fedora/RHEL])
443 M4_DEFINES=-DTARGET_FEDORA=1
444 have_plymouth=yes
445 ;;
446 suse)
447 SYSTEM_SYSVRCND_PATH=/etc/init.d
448 AC_DEFINE(TARGET_SUSE, [], [Target is openSUSE/SLE])
449 M4_DEFINES=-DTARGET_SUSE=1
450 have_plymouth=yes
451 ;;
452 debian)
453 SYSTEM_SYSVRCND_PATH=/etc
454 AC_DEFINE(TARGET_DEBIAN, [], [Target is Debian])
455 M4_DEFINES=-DTARGET_DEBIAN=1
456 ;;
457 ubuntu)
458 SYSTEM_SYSVRCND_PATH=/etc
459 AC_DEFINE(TARGET_UBUNTU, [], [Target is Ubuntu])
460 M4_DEFINES=-DTARGET_UBUNTU=1
461 ;;
462 arch)
463 SYSTEM_SYSVINIT_PATH=/etc/rc.d
464 SYSTEM_SYSVRCND_PATH=/etc
465 AC_DEFINE(TARGET_ARCH, [], [Target is ArchLinux])
466 M4_DEFINES=-DTARGET_ARCH=1
467 ;;
468 gentoo)
469 SYSTEM_SYSVINIT_PATH=
470 SYSTEM_SYSVRCND_PATH=
471 AC_DEFINE(TARGET_GENTOO, [], [Target is Gentoo])
472 M4_DEFINES=-DTARGET_GENTOO=1
473 ;;
474 slackware)
475 SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
476 AC_DEFINE(TARGET_SLACKWARE, [], [Target is Slackware])
477 M4_DEFINES=-DTARGET_SLACKWARE=1
478 ;;
479 frugalware)
480 SYSTEM_SYSVINIT_PATH=/etc/rc.d
481 AC_DEFINE(TARGET_FRUGALWARE, [], [Target is Frugalware])
482 M4_DEFINES=-DTARGET_FRUGALWARE=1
483 have_plymouth=yes
484 ;;
485 altlinux)
486 SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
487 AC_DEFINE(TARGET_ALTLINUX, [], [Target is ALTLinux])
488 M4_DEFINES=-DTARGET_ALTLINUX=1
489 have_plymouth=yes
490 ;;
491 mandriva)
492 SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
493 AC_DEFINE(TARGET_MANDRIVA, [], [Target is Mandriva])
494 M4_DEFINES=-DTARGET_MANDRIVA=1
495 have_plymouth=yes
496 ;;
497 meego)
498 SYSTEM_SYSVINIT_PATH=
499 SYSTEM_SYSVRCND_PATH=
500 AC_DEFINE(TARGET_MEEGO, [], [Target is MeeGo])
501 M4_DEFINES=-DTARGET_MEEGO=1
502 ;;
503 angstrom)
504 SYSTEM_SYSVRCND_PATH=/etc
505 AC_DEFINE(TARGET_ANGSTROM, [], [Target is Ångström])
506 M4_DEFINES=-DTARGET_ANGSTROM=1
507 ;;
508 mageia)
509 SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
510 AC_DEFINE(TARGET_MAGEIA, [], [Target is Mageia])
511 M4_DISTRO_FLAG=-DTARGET_MAGEIA=1
512 have_plymouth=yes
513 ;;
514 other)
515 ;;
516 *)
517 AC_MSG_ERROR([Your distribution (${with_distro}) is not yet supported, SysV init scripts could not be found! (patches welcome); you can specify --with-distro=other to skip this check])
518 ;;
519 esac
520
521 AC_ARG_WITH([sysvinit-path],
522 [AS_HELP_STRING([--with-sysvinit-path=PATH],
523 [Specify the path to where the SysV init scripts are located @<:@default=based on distro@:>@])],
524 [SYSTEM_SYSVINIT_PATH="$withval"],
525 [])
526
527 AC_ARG_WITH([sysvrcd-path],
528 [AS_HELP_STRING([--with-sysvrcd-path=PATH],
529 [Specify the path to the base directory for the SysV rcN.d directories @<:@default=based on distro@:>@])],
530 [SYSTEM_SYSVRCND_PATH="$withval"],
531 [])
532
533 AC_SUBST(SYSTEM_SYSVINIT_PATH)
534 AC_SUBST(SYSTEM_SYSVRCND_PATH)
535 AC_SUBST(M4_DEFINES)
536
537 if test "x${SYSTEM_SYSVINIT_PATH}" != "x" -a "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
538 AC_DEFINE(HAVE_SYSV_COMPAT, [], [SysV init scripts and rcN.d links are supported.])
539 SYSTEM_SYSV_COMPAT="yes"
540 M4_DEFINES="$M4_DEFINES -DHAVE_SYSV_COMPAT"
541 elif test "x${SYSTEM_SYSVINIT_PATH}" != "x" -o "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
542 AC_MSG_ERROR([*** You need both --with-sysvinit-path=PATH and --with-sysvrcd-path=PATH to enable SysV compatibility support, or both empty to disable it.])
543 else
544 SYSTEM_SYSV_COMPAT="no"
545 fi
546
547 AC_ARG_WITH([tty-gid],
548 [AS_HELP_STRING([--with-tty-gid=GID],
549 [Specify the numeric GID of the 'tty' group])],
550 [AC_DEFINE_UNQUOTED(TTY_GID, [$withval], [GID of the 'tty' group])],
551 [])
552
553 AC_ARG_ENABLE(plymouth, AS_HELP_STRING([--enable-plymouth], [enable plymouth support]))
554 if test -n "$enable_plymouth"; then
555 have_plymouth="$enable_plymouth"
556 fi
557
558 AM_CONDITIONAL(TARGET_FEDORA, test x"$with_distro" = xfedora)
559 AM_CONDITIONAL(TARGET_SUSE, test x"$with_distro" = xsuse)
560 AM_CONDITIONAL(TARGET_DEBIAN, test x"$with_distro" = xdebian)
561 AM_CONDITIONAL(TARGET_UBUNTU, test x"$with_distro" = xubuntu)
562 AM_CONDITIONAL(TARGET_DEBIAN_OR_UBUNTU, test x"$with_distro" = xdebian -o x"$with_distro" = xubuntu)
563 AM_CONDITIONAL(TARGET_ARCH, test x"$with_distro" = xarch)
564 AM_CONDITIONAL(TARGET_GENTOO, test x"$with_distro" = xgentoo)
565 AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware)
566 AM_CONDITIONAL(TARGET_FRUGALWARE, test x"$with_distro" = xfrugalware)
567 AM_CONDITIONAL(TARGET_ALTLINUX, test x"$with_distro" = xaltlinux)
568 AM_CONDITIONAL(TARGET_MANDRIVA, test x"$with_distro" = xmandriva)
569 AM_CONDITIONAL(TARGET_MEEGO, test x"$with_distro" = xmeego)
570 AM_CONDITIONAL(TARGET_ANGSTROM, test x"$with_distro" = xangstrom)
571 AM_CONDITIONAL(TARGET_MAGEIA, test x"$with_distro" = xmageia)
572
573 AM_CONDITIONAL(HAVE_PLYMOUTH, test "$have_plymouth" = "yes")
574 AM_CONDITIONAL(HAVE_SYSV_COMPAT, test "$SYSTEM_SYSV_COMPAT" = "yes")
575
576 AC_ARG_WITH([dbuspolicydir],
577 AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
578 [],
579 [with_dbuspolicydir=`pkg-config --variable=sysconfdir dbus-1`/dbus-1/system.d])
580
581 AC_ARG_WITH([dbussessionservicedir],
582 AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]),
583 [],
584 [with_dbussessionservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`])
585
586 AC_ARG_WITH([dbussystemservicedir],
587 AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]),
588 [],
589 [with_dbussystemservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../system-services])
590
591 AC_ARG_WITH([dbusinterfacedir],
592 AS_HELP_STRING([--with-dbusinterfacedir=DIR], [D-Bus interface directory]),
593 [],
594 [with_dbusinterfacedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../interfaces])
595
596 AC_ARG_WITH([udevrulesdir],
597 AS_HELP_STRING([--with-udevrulesdir=DIR], [Directory for udev rules]),
598 [],
599 [with_udevrulesdir=`pkg-config --variable=udevdir udev`/rules.d])
600
601 AC_ARG_WITH([rootprefix],
602 AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
603 [], [with_rootprefix=${ac_default_prefix}])
604
605 AC_ARG_WITH([rootlibdir],
606 AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]),
607 [],
608 [with_rootlibdir=${libdir}])
609
610 AC_ARG_WITH([pamlibdir],
611 AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
612 [],
613 [with_pamlibdir=${with_rootlibdir}/security])
614
615 have_split_usr=no
616 if test "x${ac_default_prefix}" != "x${with_rootprefix}" ; then
617 AC_DEFINE(HAVE_SPLIT_USR, 1, [Define if /bin, /sbin aren't symlinks into /usr])
618 have_split_usr=yes
619 fi
620
621 AC_SUBST([dbuspolicydir], [$with_dbuspolicydir])
622 AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir])
623 AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
624 AC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir])
625 AC_SUBST([udevrulesdir], [$with_udevrulesdir])
626 AC_SUBST([pamlibdir], [$with_pamlibdir])
627 AC_SUBST([rootprefix], [$with_rootprefix])
628 AC_SUBST([rootlibdir], [$with_rootlibdir])
629
630 AC_CONFIG_FILES([Makefile po/Makefile.in])
631 AC_OUTPUT
632 AC_MSG_RESULT([
633 $PACKAGE_NAME $VERSION
634
635 Distribution: ${with_distro}
636 SysV compatibility: ${SYSTEM_SYSV_COMPAT}
637 SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
638 SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
639 Gtk: ${have_gtk}
640 libcryptsetup: ${have_libcryptsetup}
641 tcpwrap: ${have_tcpwrap}
642 PAM: ${have_pam}
643 AUDIT: ${have_audit}
644 SELinux: ${have_selinux}
645 XZ: ${have_xz}
646 ACL: ${have_acl}
647 binfmt: ${have_binfmt}
648 vconsole: ${have_vconsole}
649 readahead: ${have_readahead}
650 quotacheck: ${have_quotacheck}
651 randomseed: ${have_randomseed}
652 logind: ${have_logind}
653 hostnamed: ${have_hostnamed}
654 timedated: ${have_timedated}
655 localed: ${have_localed}
656 coredump: ${have_coredump}
657 plymouth: ${have_plymouth}
658 prefix: ${prefix}
659 rootprefix: ${with_rootprefix}
660 libexec dir: ${libexecdir}
661 lib dir: ${libdir}
662 rootlib dir: ${with_rootlibdir}
663 PAM modules dir: ${with_pamlibdir}
664 udev rules dir: ${with_udevrulesdir}
665 D-Bus policy dir: ${with_dbuspolicydir}
666 D-Bus session dir: ${with_dbussessionservicedir}
667 D-Bus system dir: ${with_dbussystemservicedir}
668 D-Bus interfaces dir: ${with_dbusinterfacedir}
669 Split /usr: ${have_split_usr}
670 ])