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