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