chiark / gitweb /
service: add StartLimitInterval/StartLimitBurst/StartLimitAction
[elogind.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],[41],[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 PKG_CHECK_MODULES(DBUS, [ dbus-1 >= 1.3.2 ])
127 PKG_CHECK_MODULES(KMOD, [ libkmod >= 5 ])
128
129 have_selinux=no
130 AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
131 if test "x$enable_selinux" != "xno"; then
132         PKG_CHECK_MODULES(SELINUX, [ libselinux ],
133                 [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available]) have_selinux=yes], have_selinux=no)
134         if test "x$have_selinux" = xno -a "x$enable_selinux" = xyes; then
135                 AC_MSG_ERROR([*** SELinux support requested but libraries not found])
136         fi
137 fi
138 AM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"])
139
140 have_xz=no
141 AC_ARG_ENABLE(xz, AS_HELP_STRING([--disable-xz], [Disable optional XZ support]))
142 if test "x$enable_xz" != "xno"; then
143         PKG_CHECK_MODULES(XZ, [ liblzma ],
144                 [AC_DEFINE(HAVE_XZ, 1, [Define if XZ is available]) have_xz=yes], have_xz=no)
145         if test "x$have_xz" = xno -a "x$enable_xz" = xyes; then
146                 AC_MSG_ERROR([*** Xz support requested but libraries not found])
147         fi
148 fi
149 AM_CONDITIONAL(HAVE_XZ, [test "$have_xz" = "yes"])
150
151 AC_ARG_ENABLE([tcpwrap],
152         AS_HELP_STRING([--disable-tcpwrap],[Disable optional TCP wrappers support]),
153                 [case "${enableval}" in
154                         yes) have_tcpwrap=yes ;;
155                         no) have_tcpwrap=no ;;
156                         *) AC_MSG_ERROR(bad value ${enableval} for --disable-tcpwrap) ;;
157                 esac],
158                 [have_tcpwrap=auto])
159
160 if test "x${have_tcpwrap}" != xno ; then
161         ACX_LIBWRAP
162         if test "x${LIBWRAP_LIBS}" = x ; then
163                 if test "x$have_tcpwrap" = xyes ; then
164                         AC_MSG_ERROR([*** TCP wrappers support not found.])
165                 fi
166                 have_tcpwrap=no
167         else
168                 have_tcpwrap=yes
169         fi
170 else
171         LIBWRAP_LIBS=
172 fi
173 AC_SUBST(LIBWRAP_LIBS)
174
175 AC_ARG_ENABLE([pam],
176         AS_HELP_STRING([--disable-pam],[Disable optional PAM support]),
177                 [case "${enableval}" in
178                         yes) have_pam=yes ;;
179                         no) have_pam=no ;;
180                         *) AC_MSG_ERROR(bad value ${enableval} for --disable-pam) ;;
181                 esac],
182                 [have_pam=auto])
183
184 if test "x${have_pam}" != xno ; then
185         AC_CHECK_HEADERS(
186                 [security/pam_modules.h security/pam_modutil.h security/pam_ext.h],
187                 [have_pam=yes],
188                 [if test "x$have_pam" = xyes ; then
189                         AC_MSG_ERROR([*** PAM headers not found.])
190                 fi])
191
192         AC_CHECK_LIB(
193                 [pam],
194                 [pam_syslog],
195                 [have_pam=yes],
196                 [if test "x$have_pam" = xyes ; then
197                         AC_MSG_ERROR([*** libpam not found.])
198                 fi])
199
200         if test "x$have_pam" = xyes ; then
201                 PAM_LIBS="-lpam -lpam_misc"
202                 AC_DEFINE(HAVE_PAM, 1, [PAM available])
203         else
204                 have_pam=no
205         fi
206 else
207         PAM_LIBS=
208 fi
209 AC_SUBST(PAM_LIBS)
210 AM_CONDITIONAL([HAVE_PAM], [test "x$have_pam" != xno])
211
212 AC_ARG_ENABLE([acl],
213         AS_HELP_STRING([--disable-acl],[Disable optional ACL support]),
214                 [case "${enableval}" in
215                         yes) have_acl=yes ;;
216                         no) have_acl=no ;;
217                         *) AC_MSG_ERROR(bad value ${enableval} for --disable-acl) ;;
218                 esac],
219                 [have_acl=auto])
220
221 if test "x${have_acl}" != xno ; then
222         AC_CHECK_HEADERS(
223                 [sys/acl.h acl/libacl.h],
224                 [have_acl=yes],
225                 [if test "x$have_acl" = xyes ; then
226                         AC_MSG_ERROR([*** ACL headers not found.])
227                 fi])
228
229         AC_CHECK_LIB(
230                 [acl],
231                 [acl_get_file],
232                 [have_acl=yes],
233                 [if test "x$have_acl" = xyes ; then
234                         AC_MSG_ERROR([*** libacl not found.])
235                 fi])
236
237         if test "x$have_acl" = xyes ; then
238                 ACL_LIBS="-lacl"
239                 AC_DEFINE(HAVE_ACL, 1, [ACL available])
240         else
241                 have_acl=no
242         fi
243 else
244         ACL_LIBS=
245 fi
246 AC_SUBST(ACL_LIBS)
247 AM_CONDITIONAL([HAVE_ACL], [test "x$have_acl" != xno])
248
249 AC_ARG_ENABLE([audit],
250         AS_HELP_STRING([--disable-audit],[Disable optional AUDIT support]),
251                 [case "${enableval}" in
252                         yes) have_audit=yes ;;
253                         no) have_audit=no ;;
254                         *) AC_MSG_ERROR(bad value ${enableval} for --disable-audit) ;;
255                 esac],
256                 [have_audit=auto])
257
258 if test "x${have_audit}" != xno ; then
259         AC_CHECK_HEADERS(
260                 [libaudit.h],
261                 [have_audit=yes],
262                 [if test "x$have_audit" = xyes ; then
263                         AC_MSG_ERROR([*** AUDIT headers not found.])
264                 fi])
265
266         AC_CHECK_LIB(
267                 [audit],
268                 [audit_open],
269                 [have_audit=yes],
270                 [if test "x$have_audit" = xyes ; then
271                         AC_MSG_ERROR([*** libaudit not found.])
272                 fi])
273
274         if test "x$have_audit" = xyes ; then
275                 AUDIT_LIBS="-laudit"
276                 AC_DEFINE(HAVE_AUDIT, 1, [AUDIT available])
277         else
278                 have_audit=no
279         fi
280 else
281         AUDIT_LIBS=
282 fi
283 AC_SUBST(AUDIT_LIBS)
284
285 have_libcryptsetup=no
286 AC_ARG_ENABLE(libcryptsetup, AS_HELP_STRING([--disable-libcryptsetup], [disable libcryptsetup tools]))
287 if test "x$enable_libcryptsetup" != "xno"; then
288         PKG_CHECK_MODULES(LIBCRYPTSETUP, [ libcryptsetup ],
289                 [AC_DEFINE(HAVE_LIBCRYPTSETUP, 1, [Define if libcryptsetup is available]) have_libcryptsetup=yes], have_libcryptsetup=no)
290         if test "x$have_libcryptsetup" = xno -a "x$enable_libcryptsetup" = xyes; then
291                 AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found])
292         fi
293 fi
294 AM_CONDITIONAL(HAVE_LIBCRYPTSETUP, [test "$have_libcryptsetup" = "yes"])
295
296 have_binfmt=no
297 AC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool]))
298 if test "x$enable_binfmt" != "xno"; then
299         have_binfmt=yes
300 fi
301 AM_CONDITIONAL(ENABLE_BINFMT, [test "$have_binfmt" = "yes"])
302
303 have_vconsole=no
304 AC_ARG_ENABLE(vconsole, AS_HELP_STRING([--disable-vconsole], [disable vconsole tool]))
305 if test "x$enable_vconsole" != "xno"; then
306         have_vconsole=yes
307 fi
308 AM_CONDITIONAL(ENABLE_VCONSOLE, [test "$have_vconsole" = "yes"])
309
310 have_readahead=no
311 AC_ARG_ENABLE(readahead, AS_HELP_STRING([--disable-readahead], [disable readahead tools]))
312 if test "x$enable_readahead" != "xno"; then
313         have_readahead=yes
314 fi
315 AM_CONDITIONAL(ENABLE_READAHEAD, [test "$have_readahead" = "yes"])
316
317 have_quotacheck=no
318 AC_ARG_ENABLE(quotacheck, AS_HELP_STRING([--disable-quotacheck], [disable quotacheck tools]))
319 if test "x$enable_quotacheck" != "xno"; then
320         have_quotacheck=yes
321 fi
322 AM_CONDITIONAL(ENABLE_QUOTACHECK, [test "$have_quotacheck" = "yes"])
323
324 have_randomseed=no
325 AC_ARG_ENABLE(randomseed, AS_HELP_STRING([--disable-randomseed], [disable randomseed tools]))
326 if test "x$enable_randomseed" != "xno"; then
327         have_randomseed=yes
328 fi
329 AM_CONDITIONAL(ENABLE_RANDOMSEED, [test "$have_randomseed" = "yes"])
330
331 have_logind=no
332 AC_ARG_ENABLE(logind, AS_HELP_STRING([--disable-logind], [disable login daemon]))
333 if test "x$enable_logind" != "xno"; then
334         have_logind=yes
335 fi
336 AM_CONDITIONAL(ENABLE_LOGIND, [test "$have_logind" = "yes"])
337
338 have_hostnamed=no
339 AC_ARG_ENABLE(hostnamed, AS_HELP_STRING([--disable-hostnamed], [disable hostname daemon]))
340 if test "x$enable_hostnamed" != "xno"; then
341         have_hostnamed=yes
342 fi
343 AM_CONDITIONAL(ENABLE_HOSTNAMED, [test "$have_hostnamed" = "yes"])
344
345 have_timedated=no
346 AC_ARG_ENABLE(timedated, AS_HELP_STRING([--disable-timedated], [disable timedate daemon]))
347 if test "x$enable_timedated" != "xno"; then
348         have_timedated=yes
349 fi
350 AM_CONDITIONAL(ENABLE_TIMEDATED, [test "$have_timedated" = "yes"])
351
352 have_localed=no
353 AC_ARG_ENABLE(localed, AS_HELP_STRING([--disable-localed], [disable locale daemon]))
354 if test "x$enable_localed" != "xno"; then
355         have_localed=yes
356 fi
357 AM_CONDITIONAL(ENABLE_LOCALED, [test "$have_localed" = "yes"])
358
359 have_coredump=no
360 AC_ARG_ENABLE(coredump, AS_HELP_STRING([--disable-coredump], [disable coredump hook]))
361 if test "x$enable_coredump" != "xno"; then
362         have_coredump=yes
363 fi
364 AM_CONDITIONAL(ENABLE_COREDUMP, [test "$have_coredump" = "yes"])
365
366 have_gtk=no
367 AC_ARG_ENABLE(gtk, AS_HELP_STRING([--disable-gtk], [disable GTK tools]))
368 if test "x$enable_gtk" != "xno"; then
369         PKG_CHECK_MODULES(GTK, [ gtk+-2.0 glib-2.0 > 2.26 gio-unix-2.0 gee-1.0],
370                 [AC_DEFINE(HAVE_GTK, 1, [Define if GTK is available]) have_gtk=yes], have_gtk=no)
371         if test "x$have_gtk" = xno -a "x$enable_gtk" = xyes; then
372                 AC_MSG_ERROR([*** gtk support requested but libraries not found])
373         fi
374 fi
375 AM_CONDITIONAL(HAVE_GTK, [test "$have_gtk" = "yes"])
376
377 if test "$have_gtk" = "yes"; then
378         PKG_CHECK_MODULES(LIBNOTIFY, [ libnotify ])
379 fi
380
381 AM_PROG_VALAC([0.10])
382 AC_SUBST(VAPIDIR)
383 AM_CONDITIONAL(HAVE_VALAC, test x"$VALAC" != x)
384
385 AC_PATH_PROG([XSLTPROC], [xsltproc])
386 AM_CONDITIONAL(HAVE_XSLTPROC, test x"$XSLTPROC" != x)
387
388 AC_PATH_PROG([M4], [m4])
389
390 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]))
391 if test "z$with_distro" = "z"; then
392         if test "$cross_compiling" = yes; then
393                 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)])
394         else
395                 test -f "/etc/redhat-release" && with_distro="fedora"
396                 test -f "/etc/SuSE-release" && with_distro="suse"
397                 test -f "/etc/debian_version" &&  with_distro="debian"
398                 test -f "/etc/arch-release" && with_distro="arch"
399                 test -f "/etc/gentoo-release" && with_distro="gentoo"
400                 test -f "/etc/slackware-version" && with_distro="slackware"
401                 test -f "/etc/frugalware-release" && with_distro="frugalware"
402                 test -f "/etc/altlinux-release" && with_distro="altlinux"
403                 test -f "/etc/mandriva-release" && with_distro="mandriva"
404                 test -f "/etc/meego-release" && with_distro="meego"
405                 test -f "/etc/angstrom-version" && with_distro="angstrom"
406                 test -f "/etc/mageia-release" && with_distro="mageia"
407                 if test "x`lsb_release -is 2>/dev/null`" = "xUbuntu"; then
408                         with_distro="ubuntu"
409                 fi
410         fi
411         if test "z$with_distro" = "z"; then
412                 with_distro=`uname -s`
413         fi
414 fi
415 with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' `
416 AC_DEFINE_UNQUOTED(DISTRIBUTION, ["${with_distro}"], [Target Distribution])
417
418 # Location of the init scripts as mandated by LSB
419 SYSTEM_SYSVINIT_PATH=/etc/init.d
420 SYSTEM_SYSVRCND_PATH=/etc/rc.d
421
422 M4_DEFINES=
423 have_plymouth=no
424
425 case $with_distro in
426         fedora)
427                 SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
428                 AC_DEFINE(TARGET_FEDORA, [], [Target is Fedora/RHEL])
429                 M4_DEFINES=-DTARGET_FEDORA=1
430                 have_plymouth=yes
431                 ;;
432         suse)
433                 SYSTEM_SYSVRCND_PATH=/etc/init.d
434                 AC_DEFINE(TARGET_SUSE, [], [Target is openSUSE/SLE])
435                 M4_DEFINES=-DTARGET_SUSE=1
436                 have_plymouth=yes
437                 ;;
438         debian)
439                 SYSTEM_SYSVRCND_PATH=/etc
440                 AC_DEFINE(TARGET_DEBIAN, [], [Target is Debian])
441                 M4_DEFINES=-DTARGET_DEBIAN=1
442                 ;;
443         ubuntu)
444                 SYSTEM_SYSVRCND_PATH=/etc
445                 AC_DEFINE(TARGET_UBUNTU, [], [Target is Ubuntu])
446                 M4_DEFINES=-DTARGET_UBUNTU=1
447                 ;;
448         arch)
449                 SYSTEM_SYSVINIT_PATH=/etc/rc.d
450                 SYSTEM_SYSVRCND_PATH=/etc
451                 AC_DEFINE(TARGET_ARCH, [], [Target is ArchLinux])
452                 M4_DEFINES=-DTARGET_ARCH=1
453                 ;;
454         gentoo)
455                 SYSTEM_SYSVINIT_PATH=
456                 SYSTEM_SYSVRCND_PATH=
457                 AC_DEFINE(TARGET_GENTOO, [], [Target is Gentoo])
458                 M4_DEFINES=-DTARGET_GENTOO=1
459                 ;;
460         slackware)
461                 SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
462                 AC_DEFINE(TARGET_SLACKWARE, [], [Target is Slackware])
463                 M4_DEFINES=-DTARGET_SLACKWARE=1
464                 ;;
465         frugalware)
466                 SYSTEM_SYSVINIT_PATH=/etc/rc.d
467                 AC_DEFINE(TARGET_FRUGALWARE, [], [Target is Frugalware])
468                 M4_DEFINES=-DTARGET_FRUGALWARE=1
469                 have_plymouth=yes
470                 ;;
471         altlinux)
472                 SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
473                 AC_DEFINE(TARGET_ALTLINUX, [], [Target is ALTLinux])
474                 M4_DEFINES=-DTARGET_ALTLINUX=1
475                 have_plymouth=yes
476                 ;;
477         mandriva)
478                 SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
479                 AC_DEFINE(TARGET_MANDRIVA, [], [Target is Mandriva])
480                 M4_DEFINES=-DTARGET_MANDRIVA=1
481                 have_plymouth=yes
482                 ;;
483         meego)
484                 SYSTEM_SYSVINIT_PATH=
485                 SYSTEM_SYSVRCND_PATH=
486                 AC_DEFINE(TARGET_MEEGO, [], [Target is MeeGo])
487                 M4_DEFINES=-DTARGET_MEEGO=1
488                 ;;
489         angstrom)
490                 SYSTEM_SYSVRCND_PATH=/etc
491                 AC_DEFINE(TARGET_ANGSTROM, [], [Target is Ångström])
492                 M4_DEFINES=-DTARGET_ANGSTROM=1
493                 ;;
494         mageia)
495                 SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
496                 AC_DEFINE(TARGET_MAGEIA, [], [Target is Mageia])
497                 M4_DISTRO_FLAG=-DTARGET_MAGEIA=1
498                 have_plymouth=yes
499                 ;;
500         other)
501                 ;;
502         *)
503                 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])
504                 ;;
505 esac
506
507 AC_ARG_WITH([sysvinit-path],
508         [AS_HELP_STRING([--with-sysvinit-path=PATH],
509                 [Specify the path to where the SysV init scripts are located @<:@default=based on distro@:>@])],
510         [SYSTEM_SYSVINIT_PATH="$withval"],
511         [])
512
513 AC_ARG_WITH([sysvrcd-path],
514         [AS_HELP_STRING([--with-sysvrcd-path=PATH],
515                 [Specify the path to the base directory for the SysV rcN.d directories @<:@default=based on distro@:>@])],
516         [SYSTEM_SYSVRCND_PATH="$withval"],
517         [])
518
519 AC_SUBST(SYSTEM_SYSVINIT_PATH)
520 AC_SUBST(SYSTEM_SYSVRCND_PATH)
521 AC_SUBST(M4_DEFINES)
522
523 if test "x${SYSTEM_SYSVINIT_PATH}" != "x" -a "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
524         AC_DEFINE(HAVE_SYSV_COMPAT, [], [SysV init scripts and rcN.d links are supported.])
525         SYSTEM_SYSV_COMPAT="yes"
526         M4_DEFINES="$M4_DEFINES -DHAVE_SYSV_COMPAT"
527 elif test "x${SYSTEM_SYSVINIT_PATH}" != "x" -o "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
528         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.])
529 else
530         SYSTEM_SYSV_COMPAT="no"
531 fi
532
533 AC_ARG_WITH([tty-gid],
534         [AS_HELP_STRING([--with-tty-gid=GID],
535                 [Specify the numeric GID of the 'tty' group])],
536         [AC_DEFINE_UNQUOTED(TTY_GID, [$withval], [GID of the 'tty' group])],
537         [])
538
539 AC_ARG_ENABLE(plymouth, AS_HELP_STRING([--enable-plymouth], [enable plymouth support]))
540 if test -n "$enable_plymouth"; then
541         have_plymouth="$enable_plymouth"
542 fi
543
544 AM_CONDITIONAL(TARGET_FEDORA, test x"$with_distro" = xfedora)
545 AM_CONDITIONAL(TARGET_SUSE, test x"$with_distro" = xsuse)
546 AM_CONDITIONAL(TARGET_DEBIAN, test x"$with_distro" = xdebian)
547 AM_CONDITIONAL(TARGET_UBUNTU, test x"$with_distro" = xubuntu)
548 AM_CONDITIONAL(TARGET_DEBIAN_OR_UBUNTU, test x"$with_distro" = xdebian -o x"$with_distro" = xubuntu)
549 AM_CONDITIONAL(TARGET_ARCH, test x"$with_distro" = xarch)
550 AM_CONDITIONAL(TARGET_GENTOO, test x"$with_distro" = xgentoo)
551 AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware)
552 AM_CONDITIONAL(TARGET_FRUGALWARE, test x"$with_distro" = xfrugalware)
553 AM_CONDITIONAL(TARGET_ALTLINUX, test x"$with_distro" = xaltlinux)
554 AM_CONDITIONAL(TARGET_MANDRIVA, test x"$with_distro" = xmandriva)
555 AM_CONDITIONAL(TARGET_MEEGO, test x"$with_distro" = xmeego)
556 AM_CONDITIONAL(TARGET_ANGSTROM, test x"$with_distro" = xangstrom)
557 AM_CONDITIONAL(TARGET_MAGEIA, test x"$with_distro" = xmageia)
558
559 AM_CONDITIONAL(HAVE_PLYMOUTH, test "$have_plymouth" = "yes")
560 AM_CONDITIONAL(HAVE_SYSV_COMPAT, test "$SYSTEM_SYSV_COMPAT" = "yes")
561
562 AC_ARG_WITH([dbuspolicydir],
563         AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
564         [],
565         [with_dbuspolicydir=`pkg-config --variable=sysconfdir dbus-1`/dbus-1/system.d])
566
567 AC_ARG_WITH([dbussessionservicedir],
568         AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]),
569         [],
570         [with_dbussessionservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`])
571
572 AC_ARG_WITH([dbussystemservicedir],
573         AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]),
574         [],
575         [with_dbussystemservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../system-services])
576
577 AC_ARG_WITH([dbusinterfacedir],
578         AS_HELP_STRING([--with-dbusinterfacedir=DIR], [D-Bus interface directory]),
579         [],
580         [with_dbusinterfacedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../interfaces])
581
582 AC_ARG_WITH([udevrulesdir],
583         AS_HELP_STRING([--with-udevrulesdir=DIR], [Directory for udev rules]),
584         [],
585         [with_udevrulesdir=`pkg-config --variable=udevdir udev`/rules.d])
586
587 AC_ARG_WITH([rootprefix],
588         AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
589         [], [with_rootprefix=${ac_default_prefix}])
590
591 AC_ARG_WITH([rootlibdir],
592         AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]),
593         [],
594         [with_rootlibdir=${libdir}])
595
596 AC_ARG_WITH([pamlibdir],
597         AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
598         [],
599         [with_pamlibdir=${with_rootlibdir}/security])
600
601 have_split_usr=no
602 if test "x${ac_default_prefix}" != "x${with_rootprefix}" ; then
603         AC_DEFINE(HAVE_SPLIT_USR, 1, [Define if /bin, /sbin aren't symlinks into /usr])
604         have_split_usr=yes
605 fi
606
607 AC_SUBST([dbuspolicydir], [$with_dbuspolicydir])
608 AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir])
609 AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
610 AC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir])
611 AC_SUBST([udevrulesdir], [$with_udevrulesdir])
612 AC_SUBST([pamlibdir], [$with_pamlibdir])
613 AC_SUBST([rootprefix], [$with_rootprefix])
614 AC_SUBST([rootlibdir], [$with_rootlibdir])
615
616 AC_CONFIG_FILES([Makefile po/Makefile.in])
617 AC_OUTPUT
618 AC_MSG_RESULT([
619         $PACKAGE_NAME $VERSION
620
621         Distribution:            ${with_distro}
622         SysV compatibility:      ${SYSTEM_SYSV_COMPAT}
623         SysV init scripts:       ${SYSTEM_SYSVINIT_PATH}
624         SysV rc?.d directories:  ${SYSTEM_SYSVRCND_PATH}
625         Gtk:                     ${have_gtk}
626         libcryptsetup:           ${have_libcryptsetup}
627         tcpwrap:                 ${have_tcpwrap}
628         PAM:                     ${have_pam}
629         AUDIT:                   ${have_audit}
630         SELinux:                 ${have_selinux}
631         XZ:                      ${have_xz}
632         ACL:                     ${have_acl}
633         binfmt:                  ${have_binfmt}
634         vconsole:                ${have_vconsole}
635         readahead:               ${have_readahead}
636         quotacheck:              ${have_quotacheck}
637         randomseed:              ${have_randomseed}
638         logind:                  ${have_logind}
639         hostnamed:               ${have_hostnamed}
640         timedated:               ${have_timedated}
641         localed:                 ${have_localed}
642         coredump:                ${have_coredump}
643         plymouth:                ${have_plymouth}
644         prefix:                  ${prefix}
645         rootprefix:              ${with_rootprefix}
646         libexec dir:             ${libexecdir}
647         lib dir:                 ${libdir}
648         rootlib dir:             ${with_rootlibdir}
649         PAM modules dir:         ${with_pamlibdir}
650         udev rules dir:          ${with_udevrulesdir}
651         D-Bus policy dir:        ${with_dbuspolicydir}
652         D-Bus session dir:       ${with_dbussessionservicedir}
653         D-Bus system dir:        ${with_dbussystemservicedir}
654         D-Bus interfaces dir:    ${with_dbusinterfacedir}
655         Split /usr:              ${have_split_usr}
656 ])