]> git.ipfire.org Git - thirdparty/systemd.git/blame - configure.ac
path-lookup: monitor /etc/systemd/user for user manager
[thirdparty/systemd.git] / configure.ac
CommitLineData
47be870b
LP
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
18AC_PREREQ(2.63)
19
47675042 20AC_INIT([systemd],[33],[systemd-devel@lists.freedesktop.org])
e99e38bb 21AC_CONFIG_SRCDIR([src/main.c])
47be870b
LP
22AC_CONFIG_MACRO_DIR([m4])
23AC_CONFIG_HEADERS([config.h])
4db6d587 24AC_USE_SYSTEM_EXTENSIONS
907dd195 25AC_SYS_LARGEFILE
47be870b 26
b60e6bbf 27AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax subdir-objects dist-bzip2])
47be870b 28
1b322bdb 29AC_SUBST(PACKAGE_URL, [http://www.freedesktop.org/wiki/Software/systemd])
47be870b
LP
30
31AC_CANONICAL_HOST
22be093f 32AC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.])
d59d0a2b 33AS_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])])
47be870b
LP
36
37AM_SILENT_RULES([yes])
38
39AC_CHECK_PROG([STOW], [stow], [yes], [no])
40
41AS_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
1c7dde3e
BN
46# i18n stuff for the PolicyKit policy files
47IT_PROG_INTLTOOL([0.40.0])
48
49GETTEXT_PACKAGE=systemd
50AC_SUBST(GETTEXT_PACKAGE)
51
e9da3678
LP
52AC_PROG_MKDIR_P
53AC_PROG_LN_S
54AC_PROG_SED
f975e971 55AC_PROG_AWK
e9da3678 56
47be870b
LP
57AC_PROG_CC
58AC_PROG_CC_C99
59AM_PROG_CC_C_O
60AC_PROG_GCC_TRADITIONAL
47be870b 61
9a60da28
TR
62AC_CHECK_TOOL(OBJCOPY, objcopy)
63AC_CHECK_TOOL(STRINGS, strings)
f975e971 64AC_CHECK_TOOL(GPERF, gperf)
b62cfcea
MB
65if test -z "$GPERF" ; then
66 AC_MSG_ERROR([*** gperf not found])
67fi
9a60da28 68
d1ab0ca0 69CC_CHECK_CFLAGS_APPEND([ \
be1a67d9 70 -pipe \
d1ab0ca0
LP
71 -Wall \
72 -W \
73 -Wextra \
27765dfc 74 -Wno-inline \
d1ab0ca0 75 -Wvla \
d1ab0ca0
LP
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 \
be1a67d9
LP
98 -Wno-long-long \
99 -Wno-overlength-strings \
d1ab0ca0 100 -Wno-unused-parameter \
be1a67d9 101 -Wno-missing-field-initializers \
8745297f 102 -Wno-unused-result \
d1ab0ca0 103 -Wp,-D_FORTIFY_SOURCE=2 \
be1a67d9 104 -ffast-math \
d1ab0ca0
LP
105 -fno-common \
106 -fdiagnostics-show-option \
9b85fc6a
GSB
107 -fno-strict-aliasing \
108 -fvisibility=hidden \
109 -ffunction-sections \
110 -fdata-sections \
111 -Wl,--as-needed \
112 -Wl,--gc-sections])
47be870b 113
139be57d
LP
114LT_PREREQ(2.2)
115LT_INIT
116
47be870b 117AC_SEARCH_LIBS([clock_gettime], [rt], [], [AC_MSG_ERROR([*** POSIX RT library not found])])
afea26ad 118AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
85f19d82
MB
119
120save_LIBS="$LIBS"
121LIBS=
47be870b
LP
122AC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])])
123AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
85f19d82
MB
124CAP_LIBS="$LIBS"
125LIBS="$save_LIBS"
126AC_SUBST(CAP_LIBS)
47be870b 127
b237ef2c 128# This makes sure pkg.m4 is available.
a9b5b032 129m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
d1ab0ca0 130
309c2a2c 131PKG_CHECK_MODULES(UDEV, [ libudev >= 172 ])
47be870b
LP
132AC_SUBST(UDEV_CFLAGS)
133AC_SUBST(UDEV_LIBS)
134
83bda358 135PKG_CHECK_MODULES(DBUS, [ dbus-1 >= 1.3.2 ])
47be870b
LP
136AC_SUBST(DBUS_CFLAGS)
137AC_SUBST(DBUS_LIBS)
138
591622d7
LP
139have_selinux=no
140AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
141if 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
56cf987f 149fi
591622d7 150AM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"])
56cf987f 151
0213c3f8
LP
152AC_ARG_ENABLE([tcpwrap],
153 AS_HELP_STRING([--disable-tcpwrap],[Disable optional TCP wrappers support]),
154 [case "${enableval}" in
5b6319dc
LP
155 yes) have_tcpwrap=yes ;;
156 no) have_tcpwrap=no ;;
0213c3f8
LP
157 *) AC_MSG_ERROR(bad value ${enableval} for --disable-tcpwrap) ;;
158 esac],
5b6319dc 159 [have_tcpwrap=auto])
0213c3f8 160
5b6319dc 161if test "x${have_tcpwrap}" != xno ; then
0213c3f8
LP
162 ACX_LIBWRAP
163 if test "x${LIBWRAP_LIBS}" = x ; then
5b6319dc
LP
164 if test "x$have_tcpwrap" = xyes ; then
165 AC_MSG_ERROR([*** TCP wrappers support not found.])
0213c3f8 166 fi
812cce32 167 have_tcpwrap=no
0213c3f8 168 else
5b6319dc 169 have_tcpwrap=yes
0213c3f8
LP
170 fi
171else
5b6319dc 172 LIBWRAP_LIBS=
0213c3f8 173fi
0213c3f8
LP
174AC_SUBST(LIBWRAP_LIBS)
175
5b6319dc
LP
176AC_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
185if 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])
812cce32
LP
204 else
205 have_pam=no
5b6319dc
LP
206 fi
207else
208 PAM_LIBS=
209fi
210AC_SUBST(PAM_LIBS)
211AM_CONDITIONAL([HAVE_PAM], [test "x$have_pam" != xno])
212
5eda94dd
LP
213AC_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
222if 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
244else
245 ACL_LIBS=
246fi
247AC_SUBST(ACL_LIBS)
248AM_CONDITIONAL([HAVE_ACL], [test "x$have_acl" != xno])
249
4927fcae
LP
250AC_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
259if 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
281else
282 AUDIT_LIBS=
283fi
284AC_SUBST(AUDIT_LIBS)
285
7f4e0805
LP
286have_libcryptsetup=no
287AC_ARG_ENABLE(libcryptsetup, AS_HELP_STRING([--disable-libcryptsetup], [disable libcryptsetup tools]))
288if 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
591622d7 294 AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found])
7f4e0805
LP
295 fi
296fi
297AM_CONDITIONAL(HAVE_LIBCRYPTSETUP, [test "$have_libcryptsetup" = "yes"])
298
27669061
MV
299have_binfmt=no
300AC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool]))
301if test "x$enable_binfmt" != "xno"; then
302 have_binfmt=yes
303fi
304AM_CONDITIONAL(ENABLE_BINFMT, [test "$have_binfmt" = "yes"])
305
b2e9fb99
MV
306have_hostnamed=no
307AC_ARG_ENABLE(hostnamed, AS_HELP_STRING([--disable-hostnamed], [disable hostname daemon]))
308if test "x$enable_hostnamed" != "xno"; then
309 have_hostnamed=yes
310fi
311AM_CONDITIONAL(ENABLE_HOSTNAMED, [test "$have_hostnamed" = "yes"])
312
a9b5b032
MT
313have_gtk=no
314AC_ARG_ENABLE(gtk, AS_HELP_STRING([--disable-gtk], [disable GTK tools]))
315if test "x$enable_gtk" != "xno"; then
26742b3f 316 PKG_CHECK_MODULES(GTK, [ gtk+-2.0 glib-2.0 > 2.26 gio-unix-2.0 ],
a9b5b032
MT
317 [AC_DEFINE(HAVE_GTK, 1, [Define if GTK is available]) have_gtk=yes], have_gtk=no)
318 AC_SUBST(GTK_CFLAGS)
319 AC_SUBST(GTK_LIBS)
320 if test "x$have_gtk" = xno -a "x$enable_gtk" = xyes; then
26742b3f 321 AC_MSG_ERROR([*** gtk support requested but libraries not found])
a9b5b032
MT
322 fi
323fi
324AM_CONDITIONAL(HAVE_GTK, [test "$have_gtk" = "yes"])
325
010e310f 326if test "$have_gtk" = "yes"; then
ab85c225
MB
327 PKG_CHECK_MODULES(LIBNOTIFY, [ libnotify ])
328 PKG_CHECK_EXISTS([ libnotify >= 0.7.0 ], [ libnotify07=yes ])
329
2fa47da5
LP
330 AC_SUBST(LIBNOTIFY_CFLAGS)
331 AC_SUBST(LIBNOTIFY_LIBS)
010e310f 332fi
ab85c225 333AM_CONDITIONAL(LIBNOTIFY07, [ test "$libnotify07" = "yes" ])
010e310f 334
db040a61 335AM_PROG_VALAC([0.10])
47be870b 336AC_SUBST(VAPIDIR)
42e39f0b 337AM_CONDITIONAL(HAVE_VALAC, test x"$VALAC" != x)
47be870b 338
d1ab0ca0
LP
339AC_PATH_PROG([XSLTPROC], [xsltproc])
340AM_CONDITIONAL(HAVE_XSLTPROC, test x"$XSLTPROC" != x)
341
5e6afdd3
LP
342AC_PATH_PROG([M4], [m4])
343
a338bab5 344AC_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]))
0571e011
LP
345if test "z$with_distro" = "z"; then
346 if test "$cross_compiling" = yes; then
347 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)])
348 else
8d7cb6e0
LDM
349 test -f "/etc/redhat-release" && with_distro="fedora"
350 test -f "/etc/SuSE-release" && with_distro="suse"
351 test -f "/etc/debian_version" && with_distro="debian"
352 test -f "/etc/arch-release" && with_distro="arch"
353 test -f "/etc/gentoo-release" && with_distro="gentoo"
354 test -f "/etc/slackware-version" && with_distro="slackware"
355 test -f "/etc/frugalware-release" && with_distro="frugalware"
a338bab5 356 test -f "/etc/altlinux-release" && with_distro="altlinux"
1de4d79b 357 test -f "/etc/mandriva-release" && with_distro="mandriva"
54e4fdef 358 test -f "/etc/meego-release" && with_distro="meego"
1bd8b818 359 test -f "/etc/angstrom-version" && with_distro="angstrom"
858dae18
AE
360 if test "x`lsb_release -is 2>/dev/null`" = "xUbuntu"; then
361 with_distro="ubuntu"
362 fi
0571e011
LP
363 fi
364 if test "z$with_distro" = "z"; then
365 with_distro=`uname -s`
366 fi
367fi
368with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' `
7d568925 369AC_DEFINE_UNQUOTED(DISTRIBUTION, ["${with_distro}"], [Target Distribution])
0571e011 370
34eff652
LP
371# Location of the init scripts as mandated by LSB
372SYSTEM_SYSVINIT_PATH=/etc/init.d
f1dd0c3f 373SYSTEM_SYSVRCND_PATH=/etc/rc.d
34eff652 374
f975e971 375M4_DEFINES=
e05b415e 376have_plymouth=no
12e84679 377
0571e011
LP
378case $with_distro in
379 fedora)
380 SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
2c696a96 381 AC_DEFINE(TARGET_FEDORA, [], [Target is Fedora/RHEL])
f975e971 382 M4_DEFINES=-DTARGET_FEDORA=1
e05b415e 383 have_plymouth=yes
0571e011
LP
384 ;;
385 suse)
0571e011 386 SYSTEM_SYSVRCND_PATH=/etc/init.d
634826b5 387 AC_DEFINE(TARGET_SUSE, [], [Target is openSUSE/SLE])
f975e971 388 M4_DEFINES=-DTARGET_SUSE=1
e05b415e 389 have_plymouth=yes
0571e011
LP
390 ;;
391 debian)
0571e011 392 SYSTEM_SYSVRCND_PATH=/etc
858dae18 393 AC_DEFINE(TARGET_DEBIAN, [], [Target is Debian])
f975e971 394 M4_DEFINES=-DTARGET_DEBIAN=1
0571e011 395 ;;
858dae18
AE
396 ubuntu)
397 SYSTEM_SYSVRCND_PATH=/etc
858dae18 398 AC_DEFINE(TARGET_UBUNTU, [], [Target is Ubuntu])
f975e971 399 M4_DEFINES=-DTARGET_UBUNTU=1
858dae18 400 ;;
d7c114c0
DR
401 arch)
402 SYSTEM_SYSVINIT_PATH=/etc/rc.d
403 SYSTEM_SYSVRCND_PATH=/etc
d7c114c0 404 AC_DEFINE(TARGET_ARCH, [], [Target is ArchLinux])
f975e971 405 M4_DEFINES=-DTARGET_ARCH=1
d7c114c0 406 ;;
f2b4af1c 407 gentoo)
07459bb6
FF
408 SYSTEM_SYSVINIT_PATH=
409 SYSTEM_SYSVRCND_PATH=
f2b4af1c 410 AC_DEFINE(TARGET_GENTOO, [], [Target is Gentoo])
f975e971 411 M4_DEFINES=-DTARGET_GENTOO=1
f2b4af1c 412 ;;
65c8976a
MS
413 slackware)
414 SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
65c8976a 415 AC_DEFINE(TARGET_SLACKWARE, [], [Target is Slackware])
f975e971 416 M4_DEFINES=-DTARGET_SLACKWARE=1
65c8976a 417 ;;
f5c88ec1
MV
418 frugalware)
419 SYSTEM_SYSVINIT_PATH=/etc/rc.d
f5c88ec1 420 AC_DEFINE(TARGET_FRUGALWARE, [], [Target is Frugalware])
f975e971 421 M4_DEFINES=-DTARGET_FRUGALWARE=1
e05b415e 422 have_plymouth=yes
f5c88ec1 423 ;;
a338bab5
AS
424 altlinux)
425 SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
a338bab5 426 AC_DEFINE(TARGET_ALTLINUX, [], [Target is ALTLinux])
f975e971 427 M4_DEFINES=-DTARGET_ALTLINUX=1
e05b415e 428 have_plymouth=yes
a338bab5 429 ;;
1de4d79b
AB
430 mandriva)
431 SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
1de4d79b 432 AC_DEFINE(TARGET_MANDRIVA, [], [Target is Mandriva])
f975e971 433 M4_DEFINES=-DTARGET_MANDRIVA=1
e05b415e 434 have_plymouth=yes
1de4d79b 435 ;;
54e4fdef
CF
436 meego)
437 SYSTEM_SYSVINIT_PATH=
438 SYSTEM_SYSVRCND_PATH=
439 AC_DEFINE(TARGET_MEEGO, [], [Target is MeeGo])
f975e971 440 M4_DEFINES=-DTARGET_MEEGO=1
54e4fdef 441 ;;
1bd8b818
KK
442 angstrom)
443 SYSTEM_SYSVRCND_PATH=/etc
444 AC_DEFINE(TARGET_ANGSTROM, [], [Target is Ångström])
f975e971 445 M4_DEFINES=-DTARGET_ANGSTROM=1
1bd8b818 446 ;;
bf024b02 447 other)
0571e011
LP
448 ;;
449 *)
bf024b02 450 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])
0571e011
LP
451 ;;
452esac
453
136337ff
TFH
454AC_ARG_WITH([sysvinit-path],
455 [AS_HELP_STRING([--with-sysvinit-path=PATH],
456 [Specify the path to where the SysV init scripts are located @<:@default=based on distro@:>@])],
457 [SYSTEM_SYSVINIT_PATH="$withval"],
458 [])
459
460AC_ARG_WITH([sysvrcd-path],
461 [AS_HELP_STRING([--with-sysvrcd-path=PATH],
462 [Specify the path to the base directory for the SysV rcN.d directories @<:@default=based on distro@:>@])],
463 [SYSTEM_SYSVRCND_PATH="$withval"],
464 [])
465
0571e011 466AC_SUBST(SYSTEM_SYSVINIT_PATH)
d64b723a 467AC_SUBST(SYSTEM_SYSVRCND_PATH)
f975e971 468AC_SUBST(M4_DEFINES)
0571e011 469
07459bb6
FF
470if test "x${SYSTEM_SYSVINIT_PATH}" != "x" -a "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
471 AC_DEFINE(HAVE_SYSV_COMPAT, [], [SysV init scripts and rcN.d links are supported.])
472 SYSTEM_SYSV_COMPAT="yes"
f975e971 473 M4_DEFINES="$M4_DEFINES -DHAVE_SYSV_COMPAT"
07459bb6
FF
474elif test "x${SYSTEM_SYSVINIT_PATH}" != "x" -o "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
475 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.])
476else
477 SYSTEM_SYSV_COMPAT="no"
478fi
479
bef2733f 480AC_ARG_WITH([tty-gid],
a05ea46d 481 [AS_HELP_STRING([--with-tty-gid=GID],
bef2733f
LP
482 [Specify the numeric GID of the 'tty' group])],
483 [AC_DEFINE_UNQUOTED(TTY_GID, [$withval], [GID of the 'tty' group])],
484 [])
485
e05b415e
HG
486AC_ARG_ENABLE(plymouth, AS_HELP_STRING([--enable-plymouth], [enable plymouth support]))
487if test -n "$enable_plymouth"; then
488 have_plymouth="$enable_plymouth"
489fi
490
0571e011
LP
491AM_CONDITIONAL(TARGET_FEDORA, test x"$with_distro" = xfedora)
492AM_CONDITIONAL(TARGET_SUSE, test x"$with_distro" = xsuse)
493AM_CONDITIONAL(TARGET_DEBIAN, test x"$with_distro" = xdebian)
858dae18
AE
494AM_CONDITIONAL(TARGET_UBUNTU, test x"$with_distro" = xubuntu)
495AM_CONDITIONAL(TARGET_DEBIAN_OR_UBUNTU, test x"$with_distro" = xdebian -o x"$with_distro" = xubuntu)
d7c114c0 496AM_CONDITIONAL(TARGET_ARCH, test x"$with_distro" = xarch)
f2b4af1c 497AM_CONDITIONAL(TARGET_GENTOO, test x"$with_distro" = xgentoo)
65c8976a 498AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware)
f5c88ec1 499AM_CONDITIONAL(TARGET_FRUGALWARE, test x"$with_distro" = xfrugalware)
a338bab5 500AM_CONDITIONAL(TARGET_ALTLINUX, test x"$with_distro" = xaltlinux)
1de4d79b 501AM_CONDITIONAL(TARGET_MANDRIVA, test x"$with_distro" = xmandriva)
54e4fdef 502AM_CONDITIONAL(TARGET_MEEGO, test x"$with_distro" = xmeego)
1bd8b818 503AM_CONDITIONAL(TARGET_ANGSTROM, test x"$with_distro" = xangstrom)
0571e011 504
e05b415e 505AM_CONDITIONAL(HAVE_PLYMOUTH, test "$have_plymouth" = "yes")
cca4aeee 506AM_CONDITIONAL(HAVE_SYSV_COMPAT, test "$SYSTEM_SYSV_COMPAT" = "yes")
cd3f8b7d 507
d2d12cd1
LP
508AC_ARG_WITH([dbuspolicydir],
509 AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
510 [],
511 [with_dbuspolicydir=`pkg-config --variable=sysconfdir dbus-1`/dbus-1/system.d])
d122948d 512
d2d12cd1
LP
513AC_ARG_WITH([dbussessionservicedir],
514 AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]),
515 [],
516 [with_dbussessionservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`])
d122948d 517
d2d12cd1
LP
518AC_ARG_WITH([dbussystemservicedir],
519 AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]),
520 [],
521 [with_dbussystemservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../system-services])
d122948d 522
d2d12cd1
LP
523AC_ARG_WITH([dbusinterfacedir],
524 AS_HELP_STRING([--with-dbusinterfacedir=DIR], [D-Bus interface directory]),
525 [],
526 [with_dbusinterfacedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../interfaces])
d122948d 527
d1ab0ca0
LP
528AC_ARG_WITH([udevrulesdir],
529 AS_HELP_STRING([--with-udevrulesdir=DIR], [Diectory for udev rules]),
530 [],
8c6db833
LP
531 [with_udevrulesdir=`pkg-config --variable=udevdir udev`/rules.d])
532
533AC_ARG_WITH([pamlibdir],
534 AS_HELP_STRING([--with-pamlibdir=DIR], [Diectory for PAM modules]),
535 [],
536 [with_pamlibdir=/lib/`$CC -print-multi-os-directory`/security])
d1ab0ca0 537
8c4a3079
LP
538AC_ARG_WITH([rootdir],
539 AS_HELP_STRING([--with-rootdir=DIR], [Root directory for files necessary for boot]),
540 [],
a6baa3f6 541 [with_rootdir=${ac_default_prefix}])
d2d12cd1 542
ae446765
KS
543AC_ARG_WITH([rootlibdir],
544 AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]),
545 [],
546 [with_rootlibdir=${libdir}])
547
d2d12cd1
LP
548AC_SUBST([dbuspolicydir], [$with_dbuspolicydir])
549AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir])
550AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
551AC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir])
552AC_SUBST([udevrulesdir], [$with_udevrulesdir])
8c6db833 553AC_SUBST([pamlibdir], [$with_pamlibdir])
8c4a3079 554AC_SUBST([rootdir], [$with_rootdir])
ae446765 555AC_SUBST([rootlibdir], [$with_rootlibdir])
8c4a3079 556
1c7dde3e 557AC_CONFIG_FILES([Makefile po/Makefile.in])
a45a909f 558AC_OUTPUT
ae446765 559AC_MSG_RESULT([
0571e011
LP
560 $PACKAGE_NAME $VERSION
561
2c696a96 562 Distribution: ${with_distro}
07459bb6 563 SysV compatibility: ${SYSTEM_SYSV_COMPAT}
0571e011
LP
564 SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
565 SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
a9b5b032 566 Gtk: ${have_gtk}
7f4e0805 567 libcryptsetup: ${have_libcryptsetup}
5b6319dc
LP
568 tcpwrap: ${have_tcpwrap}
569 PAM: ${have_pam}
12716238
LP
570 AUDIT: ${have_audit}
571 SELinux: ${have_selinux}
5eda94dd 572 ACL: ${have_acl}
27669061 573 binfmt: ${have_binfmt}
b2e9fb99 574 hostnamed: ${have_hostnamed}
e05b415e 575 plymouth: ${have_plymouth}
8c4a3079
LP
576 prefix: ${prefix}
577 root dir: ${with_rootdir}
ae446765
KS
578 lib dir: ${libdir}
579 rootlib dir: ${with_rootlibdir}
8c6db833 580 pam modules dir: ${with_pamlibdir}
ae446765 581 udev rules dir: ${with_udevrulesdir}
d2d12cd1
LP
582 dbus policy dir: ${with_dbuspolicydir}
583 dbus session dir: ${with_dbussessionservicedir}
584 dbus system dir: ${with_dbussystemservicedir}
585 dbus interfaces dir: ${with_dbusinterfacedir}
ae446765 586])