chiark / gitweb /
acl: properly handle if devices are tagged as uaccess but do not have a device node
[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],[33],[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
27 AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax subdir-objects dist-bzip2])
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 AC_CHECK_PROG([STOW], [stow], [yes], [no])
40
41 AS_IF([test "x$STOW" = "xyes" && test -d /usr/local/stow], [
42         AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])
43         ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
44 ])
45
46 # i18n stuff for the PolicyKit policy files
47 IT_PROG_INTLTOOL([0.40.0])
48
49 GETTEXT_PACKAGE=systemd
50 AC_SUBST(GETTEXT_PACKAGE)
51
52 AC_PROG_MKDIR_P
53 AC_PROG_LN_S
54 AC_PROG_SED
55 AC_PROG_AWK
56
57 AC_PROG_CC
58 AC_PROG_CC_C99
59 AM_PROG_CC_C_O
60 AC_PROG_GCC_TRADITIONAL
61
62 AC_CHECK_TOOL(OBJCOPY, objcopy)
63 AC_CHECK_TOOL(STRINGS, strings)
64 AC_CHECK_TOOL(GPERF, gperf)
65 if test -z "$GPERF" ; then
66         AC_MSG_ERROR([*** gperf not found])
67 fi
68
69 CC_CHECK_CFLAGS_APPEND([ \
70         -pipe \
71         -Wall \
72         -W \
73         -Wextra \
74         -Wno-inline \
75         -Wvla \
76         -Wundef \
77         -Wformat=2 \
78         -Wlogical-op \
79         -Wsign-compare \
80         -Wformat-security \
81         -Wmissing-include-dirs \
82         -Wformat-nonliteral \
83         -Wold-style-definition \
84         -Wpointer-arith \
85         -Winit-self \
86         -Wdeclaration-after-statement \
87         -Wfloat-equal \
88         -Wmissing-prototypes \
89         -Wstrict-prototypes \
90         -Wredundant-decls \
91         -Wmissing-declarations \
92         -Wmissing-noreturn \
93         -Wshadow \
94         -Wendif-labels \
95         -Wcast-align \
96         -Wstrict-aliasing=2 \
97         -Wwrite-strings \
98         -Wno-long-long \
99         -Wno-overlength-strings \
100         -Wno-unused-parameter \
101         -Wno-missing-field-initializers \
102         -Wno-unused-result \
103         -Wp,-D_FORTIFY_SOURCE=2 \
104         -ffast-math \
105         -fno-common \
106         -fdiagnostics-show-option \
107         -fno-strict-aliasing \
108         -fvisibility=hidden \
109         -ffunction-sections \
110         -fdata-sections \
111         -Wl,--as-needed \
112         -Wl,--gc-sections])
113
114 LT_PREREQ(2.2)
115 LT_INIT
116
117 AC_SEARCH_LIBS([clock_gettime], [rt], [], [AC_MSG_ERROR([*** POSIX RT library not found])])
118 AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
119
120 save_LIBS="$LIBS"
121 LIBS=
122 AC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])])
123 AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
124 CAP_LIBS="$LIBS"
125 LIBS="$save_LIBS"
126 AC_SUBST(CAP_LIBS)
127
128 # This makes sure pkg.m4 is available.
129 m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
130
131 PKG_CHECK_MODULES(UDEV, [ libudev >= 172 ])
132 AC_SUBST(UDEV_CFLAGS)
133 AC_SUBST(UDEV_LIBS)
134
135 PKG_CHECK_MODULES(DBUS, [ dbus-1 >= 1.3.2 ])
136 AC_SUBST(DBUS_CFLAGS)
137 AC_SUBST(DBUS_LIBS)
138
139 have_selinux=no
140 AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
141 if test "x$enable_selinux" != "xno"; then
142         PKG_CHECK_MODULES(SELINUX, [ libselinux ],
143                 [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available]) have_selinux=yes], have_selinux=no)
144         AC_SUBST(SELINUX_CFLAGS)
145         AC_SUBST(SELINUX_LIBS)
146         if test "x$have_selinux" = xno -a "x$enable_selinux" = xyes; then
147                 AC_MSG_ERROR([*** SELinux support requested but libraries not found])
148         fi
149 fi
150 AM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"])
151
152 AC_ARG_ENABLE([tcpwrap],
153         AS_HELP_STRING([--disable-tcpwrap],[Disable optional TCP wrappers support]),
154                 [case "${enableval}" in
155                         yes) have_tcpwrap=yes ;;
156                         no) have_tcpwrap=no ;;
157                         *) AC_MSG_ERROR(bad value ${enableval} for --disable-tcpwrap) ;;
158                 esac],
159                 [have_tcpwrap=auto])
160
161 if test "x${have_tcpwrap}" != xno ; then
162         ACX_LIBWRAP
163         if test "x${LIBWRAP_LIBS}" = x ; then
164                 if test "x$have_tcpwrap" = xyes ; then
165                         AC_MSG_ERROR([*** TCP wrappers support not found.])
166                 fi
167                 have_tcpwrap=no
168         else
169                 have_tcpwrap=yes
170         fi
171 else
172         LIBWRAP_LIBS=
173 fi
174 AC_SUBST(LIBWRAP_LIBS)
175
176 AC_ARG_ENABLE([pam],
177         AS_HELP_STRING([--disable-pam],[Disable optional PAM support]),
178                 [case "${enableval}" in
179                         yes) have_pam=yes ;;
180                         no) have_pam=no ;;
181                         *) AC_MSG_ERROR(bad value ${enableval} for --disable-pam) ;;
182                 esac],
183                 [have_pam=auto])
184
185 if test "x${have_pam}" != xno ; then
186         AC_CHECK_HEADERS(
187                 [security/pam_modules.h security/pam_modutil.h security/pam_ext.h],
188                 [have_pam=yes],
189                 [if test "x$have_pam" = xyes ; then
190                         AC_MSG_ERROR([*** PAM headers not found.])
191                 fi])
192
193         AC_CHECK_LIB(
194                 [pam],
195                 [pam_syslog],
196                 [have_pam=yes],
197                 [if test "x$have_pam" = xyes ; then
198                         AC_MSG_ERROR([*** libpam not found.])
199                 fi])
200
201         if test "x$have_pam" = xyes ; then
202                 PAM_LIBS="-lpam -lpam_misc"
203                 AC_DEFINE(HAVE_PAM, 1, [PAM available])
204         else
205                 have_pam=no
206         fi
207 else
208         PAM_LIBS=
209 fi
210 AC_SUBST(PAM_LIBS)
211 AM_CONDITIONAL([HAVE_PAM], [test "x$have_pam" != xno])
212
213 AC_ARG_ENABLE([acl],
214         AS_HELP_STRING([--disable-acl],[Disable optional ACL support]),
215                 [case "${enableval}" in
216                         yes) have_acl=yes ;;
217                         no) have_acl=no ;;
218                         *) AC_MSG_ERROR(bad value ${enableval} for --disable-acl) ;;
219                 esac],
220                 [have_acl=auto])
221
222 if test "x${have_acl}" != xno ; then
223         AC_CHECK_HEADERS(
224                 [sys/acl.h acl/libacl.h],
225                 [have_acl=yes],
226                 [if test "x$have_acl" = xyes ; then
227                         AC_MSG_ERROR([*** ACL headers not found.])
228                 fi])
229
230         AC_CHECK_LIB(
231                 [acl],
232                 [acl_get_file],
233                 [have_acl=yes],
234                 [if test "x$have_acl" = xyes ; then
235                         AC_MSG_ERROR([*** libacl not found.])
236                 fi])
237
238         if test "x$have_acl" = xyes ; then
239                 ACL_LIBS="-lacl"
240                 AC_DEFINE(HAVE_ACL, 1, [ACL available])
241         else
242                 have_acl=no
243         fi
244 else
245         ACL_LIBS=
246 fi
247 AC_SUBST(ACL_LIBS)
248 AM_CONDITIONAL([HAVE_ACL], [test "x$have_acl" != xno])
249
250 AC_ARG_ENABLE([audit],
251         AS_HELP_STRING([--disable-audit],[Disable optional AUDIT support]),
252                 [case "${enableval}" in
253                         yes) have_audit=yes ;;
254                         no) have_audit=no ;;
255                         *) AC_MSG_ERROR(bad value ${enableval} for --disable-audit) ;;
256                 esac],
257                 [have_audit=auto])
258
259 if test "x${have_audit}" != xno ; then
260         AC_CHECK_HEADERS(
261                 [libaudit.h],
262                 [have_audit=yes],
263                 [if test "x$have_audit" = xyes ; then
264                         AC_MSG_ERROR([*** AUDIT headers not found.])
265                 fi])
266
267         AC_CHECK_LIB(
268                 [audit],
269                 [audit_open],
270                 [have_audit=yes],
271                 [if test "x$have_audit" = xyes ; then
272                         AC_MSG_ERROR([*** libaudit not found.])
273                 fi])
274
275         if test "x$have_audit" = xyes ; then
276                 AUDIT_LIBS="-laudit"
277                 AC_DEFINE(HAVE_AUDIT, 1, [AUDIT available])
278         else
279                 have_audit=no
280         fi
281 else
282         AUDIT_LIBS=
283 fi
284 AC_SUBST(AUDIT_LIBS)
285
286 have_libcryptsetup=no
287 AC_ARG_ENABLE(libcryptsetup, AS_HELP_STRING([--disable-libcryptsetup], [disable libcryptsetup tools]))
288 if test "x$enable_libcryptsetup" != "xno"; then
289         PKG_CHECK_MODULES(LIBCRYPTSETUP, [ libcryptsetup ],
290                 [AC_DEFINE(HAVE_LIBCRYPTSETUP, 1, [Define if libcryptsetup is available]) have_libcryptsetup=yes], have_libcryptsetup=no)
291         AC_SUBST(LIBCRYPTSETUP_CFLAGS)
292         AC_SUBST(LIBCRYPTSETUP_LIBS)
293         if test "x$have_libcryptsetup" = xno -a "x$enable_libcryptsetup" = xyes; then
294                 AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found])
295         fi
296 fi
297 AM_CONDITIONAL(HAVE_LIBCRYPTSETUP, [test "$have_libcryptsetup" = "yes"])
298
299 have_binfmt=no
300 AC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool]))
301 if test "x$enable_binfmt" != "xno"; then
302         have_binfmt=yes
303 fi
304 AM_CONDITIONAL(ENABLE_BINFMT, [test "$have_binfmt" = "yes"])
305
306 have_hostnamed=no
307 AC_ARG_ENABLE(hostnamed, AS_HELP_STRING([--disable-hostnamed], [disable hostname daemon]))
308 if test "x$enable_hostnamed" != "xno"; then
309         have_hostnamed=yes
310 fi
311 AM_CONDITIONAL(ENABLE_HOSTNAMED, [test "$have_hostnamed" = "yes"])
312
313 have_timedated=no
314 AC_ARG_ENABLE(timedated, AS_HELP_STRING([--disable-timedated], [disable timedate daemon]))
315 if test "x$enable_timedated" != "xno"; then
316         have_timedated=yes
317 fi
318 AM_CONDITIONAL(ENABLE_TIMEDATED, [test "$have_timedated" = "yes"])
319
320 have_localed=no
321 AC_ARG_ENABLE(localed, AS_HELP_STRING([--disable-localed], [disable locale daemon]))
322 if test "x$enable_localed" != "xno"; then
323         have_localed=yes
324 fi
325 AM_CONDITIONAL(ENABLE_LOCALED, [test "$have_localed" = "yes"])
326
327 have_gtk=no
328 AC_ARG_ENABLE(gtk, AS_HELP_STRING([--disable-gtk], [disable GTK tools]))
329 if test "x$enable_gtk" != "xno"; then
330         PKG_CHECK_MODULES(GTK, [ gtk+-2.0 glib-2.0 > 2.26 gio-unix-2.0 ],
331                 [AC_DEFINE(HAVE_GTK, 1, [Define if GTK is available]) have_gtk=yes], have_gtk=no)
332         AC_SUBST(GTK_CFLAGS)
333         AC_SUBST(GTK_LIBS)
334         if test "x$have_gtk" = xno -a "x$enable_gtk" = xyes; then
335                 AC_MSG_ERROR([*** gtk support requested but libraries not found])
336         fi
337 fi
338 AM_CONDITIONAL(HAVE_GTK, [test "$have_gtk" = "yes"])
339
340 if test "$have_gtk" = "yes"; then
341         PKG_CHECK_MODULES(LIBNOTIFY, [ libnotify ])
342         PKG_CHECK_EXISTS([ libnotify >= 0.7.0 ], [ libnotify07=yes ])
343
344         AC_SUBST(LIBNOTIFY_CFLAGS)
345         AC_SUBST(LIBNOTIFY_LIBS)
346 fi
347 AM_CONDITIONAL(LIBNOTIFY07, [ test "$libnotify07" = "yes" ])
348
349 AM_PROG_VALAC([0.10])
350 AC_SUBST(VAPIDIR)
351 AM_CONDITIONAL(HAVE_VALAC, test x"$VALAC" != x)
352
353 AC_PATH_PROG([XSLTPROC], [xsltproc])
354 AM_CONDITIONAL(HAVE_XSLTPROC, test x"$XSLTPROC" != x)
355
356 AC_PATH_PROG([M4], [m4])
357
358 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]))
359 if test "z$with_distro" = "z"; then
360         if test "$cross_compiling" = yes; then
361                 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)])
362         else
363                 test -f "/etc/redhat-release" && with_distro="fedora"
364                 test -f "/etc/SuSE-release" && with_distro="suse"
365                 test -f "/etc/debian_version" &&  with_distro="debian"
366                 test -f "/etc/arch-release" && with_distro="arch"
367                 test -f "/etc/gentoo-release" && with_distro="gentoo"
368                 test -f "/etc/slackware-version" && with_distro="slackware"
369                 test -f "/etc/frugalware-release" && with_distro="frugalware"
370                 test -f "/etc/altlinux-release" && with_distro="altlinux"
371                 test -f "/etc/mandriva-release" && with_distro="mandriva"
372                 test -f "/etc/meego-release" && with_distro="meego"
373                 test -f "/etc/angstrom-version" && with_distro="angstrom"
374                 if test "x`lsb_release -is 2>/dev/null`" = "xUbuntu"; then
375                         with_distro="ubuntu"
376                 fi
377         fi
378         if test "z$with_distro" = "z"; then
379                 with_distro=`uname -s`
380         fi
381 fi
382 with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' `
383 AC_DEFINE_UNQUOTED(DISTRIBUTION, ["${with_distro}"], [Target Distribution])
384
385 # Location of the init scripts as mandated by LSB
386 SYSTEM_SYSVINIT_PATH=/etc/init.d
387 SYSTEM_SYSVRCND_PATH=/etc/rc.d
388
389 M4_DEFINES=
390 have_plymouth=no
391
392 case $with_distro in
393         fedora)
394                 SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
395                 AC_DEFINE(TARGET_FEDORA, [], [Target is Fedora/RHEL])
396                 M4_DEFINES=-DTARGET_FEDORA=1
397                 have_plymouth=yes
398                 ;;
399         suse)
400                 SYSTEM_SYSVRCND_PATH=/etc/init.d
401                 AC_DEFINE(TARGET_SUSE, [], [Target is openSUSE/SLE])
402                 M4_DEFINES=-DTARGET_SUSE=1
403                 have_plymouth=yes
404                 ;;
405         debian)
406                 SYSTEM_SYSVRCND_PATH=/etc
407                 AC_DEFINE(TARGET_DEBIAN, [], [Target is Debian])
408                 M4_DEFINES=-DTARGET_DEBIAN=1
409                 ;;
410         ubuntu)
411                 SYSTEM_SYSVRCND_PATH=/etc
412                 AC_DEFINE(TARGET_UBUNTU, [], [Target is Ubuntu])
413                 M4_DEFINES=-DTARGET_UBUNTU=1
414                 ;;
415         arch)
416                 SYSTEM_SYSVINIT_PATH=/etc/rc.d
417                 SYSTEM_SYSVRCND_PATH=/etc
418                 AC_DEFINE(TARGET_ARCH, [], [Target is ArchLinux])
419                 M4_DEFINES=-DTARGET_ARCH=1
420                 ;;
421         gentoo)
422                 SYSTEM_SYSVINIT_PATH=
423                 SYSTEM_SYSVRCND_PATH=
424                 AC_DEFINE(TARGET_GENTOO, [], [Target is Gentoo])
425                 M4_DEFINES=-DTARGET_GENTOO=1
426                 ;;
427         slackware)
428                 SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
429                 AC_DEFINE(TARGET_SLACKWARE, [], [Target is Slackware])
430                 M4_DEFINES=-DTARGET_SLACKWARE=1
431                 ;;
432         frugalware)
433                 SYSTEM_SYSVINIT_PATH=/etc/rc.d
434                 AC_DEFINE(TARGET_FRUGALWARE, [], [Target is Frugalware])
435                 M4_DEFINES=-DTARGET_FRUGALWARE=1
436                 have_plymouth=yes
437                 ;;
438         altlinux)
439                 SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
440                 AC_DEFINE(TARGET_ALTLINUX, [], [Target is ALTLinux])
441                 M4_DEFINES=-DTARGET_ALTLINUX=1
442                 have_plymouth=yes
443                 ;;
444         mandriva)
445                 SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
446                 AC_DEFINE(TARGET_MANDRIVA, [], [Target is Mandriva])
447                 M4_DEFINES=-DTARGET_MANDRIVA=1
448                 have_plymouth=yes
449                 ;;
450         meego)
451                 SYSTEM_SYSVINIT_PATH=
452                 SYSTEM_SYSVRCND_PATH=
453                 AC_DEFINE(TARGET_MEEGO, [], [Target is MeeGo])
454                 M4_DEFINES=-DTARGET_MEEGO=1
455                 ;;
456         angstrom)
457                 SYSTEM_SYSVRCND_PATH=/etc
458                 AC_DEFINE(TARGET_ANGSTROM, [], [Target is Ångström])
459                 M4_DEFINES=-DTARGET_ANGSTROM=1
460                 ;;
461         other)
462                 ;;
463         *)
464                 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])
465                 ;;
466 esac
467
468 AC_ARG_WITH([sysvinit-path],
469         [AS_HELP_STRING([--with-sysvinit-path=PATH],
470                 [Specify the path to where the SysV init scripts are located @<:@default=based on distro@:>@])],
471         [SYSTEM_SYSVINIT_PATH="$withval"],
472         [])
473
474 AC_ARG_WITH([sysvrcd-path],
475         [AS_HELP_STRING([--with-sysvrcd-path=PATH],
476                 [Specify the path to the base directory for the SysV rcN.d directories @<:@default=based on distro@:>@])],
477         [SYSTEM_SYSVRCND_PATH="$withval"],
478         [])
479
480 AC_SUBST(SYSTEM_SYSVINIT_PATH)
481 AC_SUBST(SYSTEM_SYSVRCND_PATH)
482 AC_SUBST(M4_DEFINES)
483
484 if test "x${SYSTEM_SYSVINIT_PATH}" != "x" -a "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
485         AC_DEFINE(HAVE_SYSV_COMPAT, [], [SysV init scripts and rcN.d links are supported.])
486         SYSTEM_SYSV_COMPAT="yes"
487         M4_DEFINES="$M4_DEFINES -DHAVE_SYSV_COMPAT"
488 elif test "x${SYSTEM_SYSVINIT_PATH}" != "x" -o "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
489         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.])
490 else
491         SYSTEM_SYSV_COMPAT="no"
492 fi
493
494 AC_ARG_WITH([tty-gid],
495         [AS_HELP_STRING([--with-tty-gid=GID],
496                 [Specify the numeric GID of the 'tty' group])],
497         [AC_DEFINE_UNQUOTED(TTY_GID, [$withval], [GID of the 'tty' group])],
498         [])
499
500 AC_ARG_ENABLE(plymouth, AS_HELP_STRING([--enable-plymouth], [enable plymouth support]))
501 if test -n "$enable_plymouth"; then
502         have_plymouth="$enable_plymouth"
503 fi
504
505 AM_CONDITIONAL(TARGET_FEDORA, test x"$with_distro" = xfedora)
506 AM_CONDITIONAL(TARGET_SUSE, test x"$with_distro" = xsuse)
507 AM_CONDITIONAL(TARGET_DEBIAN, test x"$with_distro" = xdebian)
508 AM_CONDITIONAL(TARGET_UBUNTU, test x"$with_distro" = xubuntu)
509 AM_CONDITIONAL(TARGET_DEBIAN_OR_UBUNTU, test x"$with_distro" = xdebian -o x"$with_distro" = xubuntu)
510 AM_CONDITIONAL(TARGET_ARCH, test x"$with_distro" = xarch)
511 AM_CONDITIONAL(TARGET_GENTOO, test x"$with_distro" = xgentoo)
512 AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware)
513 AM_CONDITIONAL(TARGET_FRUGALWARE, test x"$with_distro" = xfrugalware)
514 AM_CONDITIONAL(TARGET_ALTLINUX, test x"$with_distro" = xaltlinux)
515 AM_CONDITIONAL(TARGET_MANDRIVA, test x"$with_distro" = xmandriva)
516 AM_CONDITIONAL(TARGET_MEEGO, test x"$with_distro" = xmeego)
517 AM_CONDITIONAL(TARGET_ANGSTROM, test x"$with_distro" = xangstrom)
518
519 AM_CONDITIONAL(HAVE_PLYMOUTH, test "$have_plymouth" = "yes")
520 AM_CONDITIONAL(HAVE_SYSV_COMPAT, test "$SYSTEM_SYSV_COMPAT" = "yes")
521
522 AC_ARG_WITH([dbuspolicydir],
523         AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
524         [],
525         [with_dbuspolicydir=`pkg-config --variable=sysconfdir dbus-1`/dbus-1/system.d])
526
527 AC_ARG_WITH([dbussessionservicedir],
528         AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]),
529         [],
530         [with_dbussessionservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`])
531
532 AC_ARG_WITH([dbussystemservicedir],
533         AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]),
534         [],
535         [with_dbussystemservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../system-services])
536
537 AC_ARG_WITH([dbusinterfacedir],
538         AS_HELP_STRING([--with-dbusinterfacedir=DIR], [D-Bus interface directory]),
539         [],
540         [with_dbusinterfacedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../interfaces])
541
542 AC_ARG_WITH([udevrulesdir],
543         AS_HELP_STRING([--with-udevrulesdir=DIR], [Diectory for udev rules]),
544         [],
545         [with_udevrulesdir=`pkg-config --variable=udevdir udev`/rules.d])
546
547 AC_ARG_WITH([pamlibdir],
548         AS_HELP_STRING([--with-pamlibdir=DIR], [Diectory for PAM modules]),
549         [],
550         [with_pamlibdir=/lib/`$CC -print-multi-os-directory`/security])
551
552 AC_ARG_WITH([rootdir],
553         AS_HELP_STRING([--with-rootdir=DIR], [Root directory for files necessary for boot]),
554         [],
555         [with_rootdir=${ac_default_prefix}])
556
557 AC_ARG_WITH([rootlibdir],
558         AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]),
559         [],
560         [with_rootlibdir=${libdir}])
561
562 AC_SUBST([dbuspolicydir], [$with_dbuspolicydir])
563 AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir])
564 AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
565 AC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir])
566 AC_SUBST([udevrulesdir], [$with_udevrulesdir])
567 AC_SUBST([pamlibdir], [$with_pamlibdir])
568 AC_SUBST([rootdir], [$with_rootdir])
569 AC_SUBST([rootlibdir], [$with_rootlibdir])
570
571 AC_CONFIG_FILES([Makefile po/Makefile.in])
572 AC_OUTPUT
573 AC_MSG_RESULT([
574         $PACKAGE_NAME $VERSION
575
576         Distribution:            ${with_distro}
577         SysV compatibility:      ${SYSTEM_SYSV_COMPAT}
578         SysV init scripts:       ${SYSTEM_SYSVINIT_PATH}
579         SysV rc?.d directories:  ${SYSTEM_SYSVRCND_PATH}
580         Gtk:                     ${have_gtk}
581         libcryptsetup:           ${have_libcryptsetup}
582         tcpwrap:                 ${have_tcpwrap}
583         PAM:                     ${have_pam}
584         AUDIT:                   ${have_audit}
585         SELinux:                 ${have_selinux}
586         ACL:                     ${have_acl}
587         binfmt:                  ${have_binfmt}
588         hostnamed:               ${have_hostnamed}
589         timedated:               ${have_timedated}
590         localed:                 ${have_localed}
591         plymouth:                ${have_plymouth}
592         prefix:                  ${prefix}
593         root dir:                ${with_rootdir}
594         lib dir:                 ${libdir}
595         rootlib dir:             ${with_rootlibdir}
596         pam modules dir:         ${with_pamlibdir}
597         udev rules dir:          ${with_udevrulesdir}
598         dbus policy dir:         ${with_dbuspolicydir}
599         dbus session dir:        ${with_dbussessionservicedir}
600         dbus system dir:         ${with_dbussystemservicedir}
601         dbus interfaces dir:     ${with_dbusinterfacedir}
602 ])