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