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