]>
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 | ||
437b7dee | 20 | AC_INIT([systemd],[43],[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 |
eb7bbee6 | 26 | AC_PREFIX_DEFAULT([/usr]) |
bbd9b8c2 | 27 | AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects check-news]) |
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 | ||
1c7dde3e BN |
39 | # i18n stuff for the PolicyKit policy files |
40 | IT_PROG_INTLTOOL([0.40.0]) | |
41 | ||
42 | GETTEXT_PACKAGE=systemd | |
43 | AC_SUBST(GETTEXT_PACKAGE) | |
44 | ||
e9da3678 LP |
45 | AC_PROG_MKDIR_P |
46 | AC_PROG_LN_S | |
47 | AC_PROG_SED | |
3ce4fad8 | 48 | AC_PROG_GREP |
f975e971 | 49 | AC_PROG_AWK |
e9da3678 | 50 | |
47be870b LP |
51 | AC_PROG_CC |
52 | AC_PROG_CC_C99 | |
53 | AM_PROG_CC_C_O | |
54 | AC_PROG_GCC_TRADITIONAL | |
47be870b | 55 | |
9a60da28 TR |
56 | AC_CHECK_TOOL(OBJCOPY, objcopy) |
57 | AC_CHECK_TOOL(STRINGS, strings) | |
f975e971 | 58 | AC_CHECK_TOOL(GPERF, gperf) |
b62cfcea MB |
59 | if test -z "$GPERF" ; then |
60 | AC_MSG_ERROR([*** gperf not found]) | |
61 | fi | |
9a60da28 | 62 | |
d1ab0ca0 | 63 | CC_CHECK_CFLAGS_APPEND([ \ |
be1a67d9 | 64 | -pipe \ |
d1ab0ca0 LP |
65 | -Wall \ |
66 | -W \ | |
67 | -Wextra \ | |
27765dfc | 68 | -Wno-inline \ |
d1ab0ca0 | 69 | -Wvla \ |
d1ab0ca0 LP |
70 | -Wundef \ |
71 | -Wformat=2 \ | |
72 | -Wlogical-op \ | |
73 | -Wsign-compare \ | |
74 | -Wformat-security \ | |
75 | -Wmissing-include-dirs \ | |
76 | -Wformat-nonliteral \ | |
77 | -Wold-style-definition \ | |
78 | -Wpointer-arith \ | |
79 | -Winit-self \ | |
80 | -Wdeclaration-after-statement \ | |
81 | -Wfloat-equal \ | |
82 | -Wmissing-prototypes \ | |
83 | -Wstrict-prototypes \ | |
84 | -Wredundant-decls \ | |
85 | -Wmissing-declarations \ | |
86 | -Wmissing-noreturn \ | |
87 | -Wshadow \ | |
88 | -Wendif-labels \ | |
89 | -Wcast-align \ | |
90 | -Wstrict-aliasing=2 \ | |
91 | -Wwrite-strings \ | |
be1a67d9 LP |
92 | -Wno-long-long \ |
93 | -Wno-overlength-strings \ | |
d1ab0ca0 | 94 | -Wno-unused-parameter \ |
be1a67d9 | 95 | -Wno-missing-field-initializers \ |
8745297f | 96 | -Wno-unused-result \ |
d200735e | 97 | -Werror=overflow \ |
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 |
109 | LT_PREREQ(2.2) |
110 | LT_INIT | |
111 | ||
47be870b | 112 | AC_SEARCH_LIBS([clock_gettime], [rt], [], [AC_MSG_ERROR([*** POSIX RT library not found])]) |
afea26ad | 113 | AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])]) |
85f19d82 MB |
114 | |
115 | save_LIBS="$LIBS" | |
116 | LIBS= | |
47be870b LP |
117 | AC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])]) |
118 | AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])]) | |
85f19d82 MB |
119 | CAP_LIBS="$LIBS" |
120 | LIBS="$save_LIBS" | |
121 | AC_SUBST(CAP_LIBS) | |
47be870b | 122 | |
b237ef2c | 123 | # This makes sure pkg.m4 is available. |
a9b5b032 | 124 | m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config]) |
d1ab0ca0 | 125 | |
309c2a2c | 126 | PKG_CHECK_MODULES(UDEV, [ libudev >= 172 ]) |
83bda358 | 127 | PKG_CHECK_MODULES(DBUS, [ dbus-1 >= 1.3.2 ]) |
728beb28 TG |
128 | PKG_CHECK_MODULES(KMOD, [ libkmod >= 5 ]) |
129 | ||
591622d7 LP |
130 | have_selinux=no |
131 | AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support])) | |
132 | if test "x$enable_selinux" != "xno"; then | |
133 | PKG_CHECK_MODULES(SELINUX, [ libselinux ], | |
134 | [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available]) have_selinux=yes], have_selinux=no) | |
591622d7 LP |
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 | 138 | fi |
591622d7 | 139 | AM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"]) |
56cf987f | 140 | |
807e17f0 LP |
141 | have_xz=no |
142 | AC_ARG_ENABLE(xz, AS_HELP_STRING([--disable-xz], [Disable optional XZ support])) | |
143 | if test "x$enable_xz" != "xno"; then | |
144 | PKG_CHECK_MODULES(XZ, [ liblzma ], | |
145 | [AC_DEFINE(HAVE_XZ, 1, [Define if XZ is available]) have_xz=yes], have_xz=no) | |
807e17f0 LP |
146 | if test "x$have_xz" = xno -a "x$enable_xz" = xyes; then |
147 | AC_MSG_ERROR([*** Xz support requested but libraries not found]) | |
148 | fi | |
149 | fi | |
150 | AM_CONDITIONAL(HAVE_XZ, [test "$have_xz" = "yes"]) | |
151 | ||
0213c3f8 LP |
152 | AC_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 | 161 | if 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 |
171 | else | |
5b6319dc | 172 | LIBWRAP_LIBS= |
0213c3f8 | 173 | fi |
0213c3f8 LP |
174 | AC_SUBST(LIBWRAP_LIBS) |
175 | ||
5b6319dc LP |
176 | AC_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 | ||
185 | if 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 |
207 | else | |
208 | PAM_LIBS= | |
209 | fi | |
210 | AC_SUBST(PAM_LIBS) | |
211 | AM_CONDITIONAL([HAVE_PAM], [test "x$have_pam" != xno]) | |
212 | ||
5eda94dd LP |
213 | AC_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 | ||
222 | if 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 | |
244 | else | |
245 | ACL_LIBS= | |
246 | fi | |
247 | AC_SUBST(ACL_LIBS) | |
248 | AM_CONDITIONAL([HAVE_ACL], [test "x$have_acl" != xno]) | |
249 | ||
4927fcae LP |
250 | AC_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 | ||
259 | if 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 | |
281 | else | |
282 | AUDIT_LIBS= | |
283 | fi | |
284 | AC_SUBST(AUDIT_LIBS) | |
285 | ||
7f4e0805 LP |
286 | have_libcryptsetup=no |
287 | AC_ARG_ENABLE(libcryptsetup, AS_HELP_STRING([--disable-libcryptsetup], [disable libcryptsetup tools])) | |
288 | if 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) | |
7f4e0805 | 291 | if test "x$have_libcryptsetup" = xno -a "x$enable_libcryptsetup" = xyes; then |
591622d7 | 292 | AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found]) |
7f4e0805 LP |
293 | fi |
294 | fi | |
295 | AM_CONDITIONAL(HAVE_LIBCRYPTSETUP, [test "$have_libcryptsetup" = "yes"]) | |
296 | ||
27669061 MV |
297 | have_binfmt=no |
298 | AC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool])) | |
299 | if test "x$enable_binfmt" != "xno"; then | |
be31376e | 300 | have_binfmt=yes |
27669061 MV |
301 | fi |
302 | AM_CONDITIONAL(ENABLE_BINFMT, [test "$have_binfmt" = "yes"]) | |
303 | ||
e5e83e83 LP |
304 | have_vconsole=no |
305 | AC_ARG_ENABLE(vconsole, AS_HELP_STRING([--disable-vconsole], [disable vconsole tool])) | |
306 | if test "x$enable_vconsole" != "xno"; then | |
be31376e | 307 | have_vconsole=yes |
e5e83e83 LP |
308 | fi |
309 | AM_CONDITIONAL(ENABLE_VCONSOLE, [test "$have_vconsole" = "yes"]) | |
310 | ||
311 | have_readahead=no | |
312 | AC_ARG_ENABLE(readahead, AS_HELP_STRING([--disable-readahead], [disable readahead tools])) | |
313 | if test "x$enable_readahead" != "xno"; then | |
be31376e | 314 | have_readahead=yes |
e5e83e83 LP |
315 | fi |
316 | AM_CONDITIONAL(ENABLE_READAHEAD, [test "$have_readahead" = "yes"]) | |
317 | ||
4de85612 LP |
318 | have_quotacheck=no |
319 | AC_ARG_ENABLE(quotacheck, AS_HELP_STRING([--disable-quotacheck], [disable quotacheck tools])) | |
320 | if test "x$enable_quotacheck" != "xno"; then | |
be31376e | 321 | have_quotacheck=yes |
4de85612 LP |
322 | fi |
323 | AM_CONDITIONAL(ENABLE_QUOTACHECK, [test "$have_quotacheck" = "yes"]) | |
324 | ||
325 | have_randomseed=no | |
326 | AC_ARG_ENABLE(randomseed, AS_HELP_STRING([--disable-randomseed], [disable randomseed tools])) | |
327 | if test "x$enable_randomseed" != "xno"; then | |
be31376e | 328 | have_randomseed=yes |
4de85612 LP |
329 | fi |
330 | AM_CONDITIONAL(ENABLE_RANDOMSEED, [test "$have_randomseed" = "yes"]) | |
331 | ||
2a018e83 KS |
332 | have_logind=no |
333 | AC_ARG_ENABLE(logind, AS_HELP_STRING([--disable-logind], [disable login daemon])) | |
334 | if test "x$enable_logind" != "xno"; then | |
be31376e | 335 | have_logind=yes |
2a018e83 KS |
336 | fi |
337 | AM_CONDITIONAL(ENABLE_LOGIND, [test "$have_logind" = "yes"]) | |
338 | ||
b2e9fb99 MV |
339 | have_hostnamed=no |
340 | AC_ARG_ENABLE(hostnamed, AS_HELP_STRING([--disable-hostnamed], [disable hostname daemon])) | |
341 | if test "x$enable_hostnamed" != "xno"; then | |
be31376e | 342 | have_hostnamed=yes |
b2e9fb99 MV |
343 | fi |
344 | AM_CONDITIONAL(ENABLE_HOSTNAMED, [test "$have_hostnamed" = "yes"]) | |
345 | ||
f47cd184 MV |
346 | have_timedated=no |
347 | AC_ARG_ENABLE(timedated, AS_HELP_STRING([--disable-timedated], [disable timedate daemon])) | |
348 | if test "x$enable_timedated" != "xno"; then | |
be31376e | 349 | have_timedated=yes |
f47cd184 MV |
350 | fi |
351 | AM_CONDITIONAL(ENABLE_TIMEDATED, [test "$have_timedated" = "yes"]) | |
352 | ||
4cd1eaa5 MV |
353 | have_localed=no |
354 | AC_ARG_ENABLE(localed, AS_HELP_STRING([--disable-localed], [disable locale daemon])) | |
355 | if test "x$enable_localed" != "xno"; then | |
be31376e | 356 | have_localed=yes |
4cd1eaa5 MV |
357 | fi |
358 | AM_CONDITIONAL(ENABLE_LOCALED, [test "$have_localed" = "yes"]) | |
359 | ||
f5e04665 LP |
360 | have_coredump=no |
361 | AC_ARG_ENABLE(coredump, AS_HELP_STRING([--disable-coredump], [disable coredump hook])) | |
362 | if test "x$enable_coredump" != "xno"; then | |
be31376e | 363 | have_coredump=yes |
f5e04665 LP |
364 | fi |
365 | AM_CONDITIONAL(ENABLE_COREDUMP, [test "$have_coredump" = "yes"]) | |
366 | ||
75db9a77 | 367 | have_manpages=no |
4c2b0e4e | 368 | AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages])) |
75db9a77 | 369 | if test "x$enable_manpages" != "xno"; then |
be31376e | 370 | have_manpages=yes |
75db9a77 LP |
371 | fi |
372 | AM_CONDITIONAL(ENABLE_MANPAGES, [test "$have_manpages" = "yes"]) | |
373 | ||
a9b5b032 MT |
374 | have_gtk=no |
375 | AC_ARG_ENABLE(gtk, AS_HELP_STRING([--disable-gtk], [disable GTK tools])) | |
376 | if test "x$enable_gtk" != "xno"; then | |
11216eb0 | 377 | PKG_CHECK_MODULES(GTK, [ gtk+-2.0 glib-2.0 > 2.26 gio-unix-2.0 gee-1.0], |
a9b5b032 | 378 | [AC_DEFINE(HAVE_GTK, 1, [Define if GTK is available]) have_gtk=yes], have_gtk=no) |
a9b5b032 | 379 | if test "x$have_gtk" = xno -a "x$enable_gtk" = xyes; then |
26742b3f | 380 | AC_MSG_ERROR([*** gtk support requested but libraries not found]) |
a9b5b032 MT |
381 | fi |
382 | fi | |
383 | AM_CONDITIONAL(HAVE_GTK, [test "$have_gtk" = "yes"]) | |
384 | ||
010e310f | 385 | if test "$have_gtk" = "yes"; then |
ab85c225 | 386 | PKG_CHECK_MODULES(LIBNOTIFY, [ libnotify ]) |
010e310f GSB |
387 | fi |
388 | ||
db040a61 | 389 | AM_PROG_VALAC([0.10]) |
47be870b | 390 | AC_SUBST(VAPIDIR) |
42e39f0b | 391 | AM_CONDITIONAL(HAVE_VALAC, test x"$VALAC" != x) |
47be870b | 392 | |
d1ab0ca0 LP |
393 | AC_PATH_PROG([XSLTPROC], [xsltproc]) |
394 | AM_CONDITIONAL(HAVE_XSLTPROC, test x"$XSLTPROC" != x) | |
395 | ||
5e6afdd3 LP |
396 | AC_PATH_PROG([M4], [m4]) |
397 | ||
3ce4fad8 | 398 | AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of fedora, suse, debian, ubuntu, arch, gentoo, slackware, altlinuxi, mandriva, meego, mageia, angstrom or other])) |
0571e011 LP |
399 | if test "z$with_distro" = "z"; then |
400 | if test "$cross_compiling" = yes; then | |
401 | 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)]) | |
402 | else | |
3ce4fad8 | 403 | with_distro=$($GREP '^ID=' /etc/os-release | $SED 's/ID=//'); |
0571e011 LP |
404 | fi |
405 | if test "z$with_distro" = "z"; then | |
3ce4fad8 | 406 | with_distro=other |
0571e011 LP |
407 | fi |
408 | fi | |
409 | with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' ` | |
7d568925 | 410 | AC_DEFINE_UNQUOTED(DISTRIBUTION, ["${with_distro}"], [Target Distribution]) |
0571e011 | 411 | |
34eff652 LP |
412 | # Location of the init scripts as mandated by LSB |
413 | SYSTEM_SYSVINIT_PATH=/etc/init.d | |
f1dd0c3f | 414 | SYSTEM_SYSVRCND_PATH=/etc/rc.d |
34eff652 | 415 | |
f975e971 | 416 | M4_DEFINES= |
e05b415e | 417 | have_plymouth=no |
12e84679 | 418 | |
0571e011 LP |
419 | case $with_distro in |
420 | fedora) | |
421 | SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d | |
2c696a96 | 422 | AC_DEFINE(TARGET_FEDORA, [], [Target is Fedora/RHEL]) |
f975e971 | 423 | M4_DEFINES=-DTARGET_FEDORA=1 |
e05b415e | 424 | have_plymouth=yes |
0571e011 | 425 | ;; |
3ce4fad8 | 426 | opensuse|suse) |
0571e011 | 427 | SYSTEM_SYSVRCND_PATH=/etc/init.d |
634826b5 | 428 | AC_DEFINE(TARGET_SUSE, [], [Target is openSUSE/SLE]) |
f975e971 | 429 | M4_DEFINES=-DTARGET_SUSE=1 |
e05b415e | 430 | have_plymouth=yes |
0571e011 LP |
431 | ;; |
432 | debian) | |
0571e011 | 433 | SYSTEM_SYSVRCND_PATH=/etc |
858dae18 | 434 | AC_DEFINE(TARGET_DEBIAN, [], [Target is Debian]) |
f975e971 | 435 | M4_DEFINES=-DTARGET_DEBIAN=1 |
0571e011 | 436 | ;; |
858dae18 AE |
437 | ubuntu) |
438 | SYSTEM_SYSVRCND_PATH=/etc | |
858dae18 | 439 | AC_DEFINE(TARGET_UBUNTU, [], [Target is Ubuntu]) |
f975e971 | 440 | M4_DEFINES=-DTARGET_UBUNTU=1 |
858dae18 | 441 | ;; |
d7c114c0 DR |
442 | arch) |
443 | SYSTEM_SYSVINIT_PATH=/etc/rc.d | |
444 | SYSTEM_SYSVRCND_PATH=/etc | |
d7c114c0 | 445 | AC_DEFINE(TARGET_ARCH, [], [Target is ArchLinux]) |
f975e971 | 446 | M4_DEFINES=-DTARGET_ARCH=1 |
d7c114c0 | 447 | ;; |
f2b4af1c | 448 | gentoo) |
07459bb6 FF |
449 | SYSTEM_SYSVINIT_PATH= |
450 | SYSTEM_SYSVRCND_PATH= | |
f2b4af1c | 451 | AC_DEFINE(TARGET_GENTOO, [], [Target is Gentoo]) |
f975e971 | 452 | M4_DEFINES=-DTARGET_GENTOO=1 |
f2b4af1c | 453 | ;; |
65c8976a MS |
454 | slackware) |
455 | SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d | |
65c8976a | 456 | AC_DEFINE(TARGET_SLACKWARE, [], [Target is Slackware]) |
f975e971 | 457 | M4_DEFINES=-DTARGET_SLACKWARE=1 |
65c8976a | 458 | ;; |
f5c88ec1 MV |
459 | frugalware) |
460 | SYSTEM_SYSVINIT_PATH=/etc/rc.d | |
f5c88ec1 | 461 | AC_DEFINE(TARGET_FRUGALWARE, [], [Target is Frugalware]) |
f975e971 | 462 | M4_DEFINES=-DTARGET_FRUGALWARE=1 |
e05b415e | 463 | have_plymouth=yes |
f5c88ec1 | 464 | ;; |
a338bab5 AS |
465 | altlinux) |
466 | SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d | |
a338bab5 | 467 | AC_DEFINE(TARGET_ALTLINUX, [], [Target is ALTLinux]) |
f975e971 | 468 | M4_DEFINES=-DTARGET_ALTLINUX=1 |
e05b415e | 469 | have_plymouth=yes |
a338bab5 | 470 | ;; |
1de4d79b AB |
471 | mandriva) |
472 | SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d | |
1de4d79b | 473 | AC_DEFINE(TARGET_MANDRIVA, [], [Target is Mandriva]) |
f975e971 | 474 | M4_DEFINES=-DTARGET_MANDRIVA=1 |
e05b415e | 475 | have_plymouth=yes |
1de4d79b | 476 | ;; |
54e4fdef CF |
477 | meego) |
478 | SYSTEM_SYSVINIT_PATH= | |
479 | SYSTEM_SYSVRCND_PATH= | |
480 | AC_DEFINE(TARGET_MEEGO, [], [Target is MeeGo]) | |
f975e971 | 481 | M4_DEFINES=-DTARGET_MEEGO=1 |
be31376e | 482 | ;; |
1bd8b818 KK |
483 | angstrom) |
484 | SYSTEM_SYSVRCND_PATH=/etc | |
485 | AC_DEFINE(TARGET_ANGSTROM, [], [Target is Ångström]) | |
f975e971 | 486 | M4_DEFINES=-DTARGET_ANGSTROM=1 |
1bd8b818 | 487 | ;; |
6fdae8a6 DM |
488 | mageia) |
489 | SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d | |
490 | AC_DEFINE(TARGET_MAGEIA, [], [Target is Mageia]) | |
491 | M4_DISTRO_FLAG=-DTARGET_MAGEIA=1 | |
492 | have_plymouth=yes | |
493 | ;; | |
bf024b02 | 494 | other) |
0571e011 LP |
495 | ;; |
496 | *) | |
bf024b02 | 497 | 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 |
498 | ;; |
499 | esac | |
500 | ||
136337ff | 501 | AC_ARG_WITH([sysvinit-path], |
be31376e KS |
502 | [AS_HELP_STRING([--with-sysvinit-path=PATH], |
503 | [Specify the path to where the SysV init scripts are located @<:@default=based on distro@:>@])], | |
504 | [SYSTEM_SYSVINIT_PATH="$withval"], | |
505 | []) | |
136337ff TFH |
506 | |
507 | AC_ARG_WITH([sysvrcd-path], | |
508 | [AS_HELP_STRING([--with-sysvrcd-path=PATH], | |
509 | [Specify the path to the base directory for the SysV rcN.d directories @<:@default=based on distro@:>@])], | |
510 | [SYSTEM_SYSVRCND_PATH="$withval"], | |
511 | []) | |
512 | ||
0571e011 | 513 | AC_SUBST(SYSTEM_SYSVINIT_PATH) |
d64b723a | 514 | AC_SUBST(SYSTEM_SYSVRCND_PATH) |
f975e971 | 515 | AC_SUBST(M4_DEFINES) |
0571e011 | 516 | |
07459bb6 FF |
517 | if test "x${SYSTEM_SYSVINIT_PATH}" != "x" -a "x${SYSTEM_SYSVRCND_PATH}" != "x"; then |
518 | AC_DEFINE(HAVE_SYSV_COMPAT, [], [SysV init scripts and rcN.d links are supported.]) | |
519 | SYSTEM_SYSV_COMPAT="yes" | |
f975e971 | 520 | M4_DEFINES="$M4_DEFINES -DHAVE_SYSV_COMPAT" |
07459bb6 FF |
521 | elif test "x${SYSTEM_SYSVINIT_PATH}" != "x" -o "x${SYSTEM_SYSVRCND_PATH}" != "x"; then |
522 | 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.]) | |
523 | else | |
524 | SYSTEM_SYSV_COMPAT="no" | |
525 | fi | |
526 | ||
bef2733f | 527 | AC_ARG_WITH([tty-gid], |
a05ea46d | 528 | [AS_HELP_STRING([--with-tty-gid=GID], |
bef2733f LP |
529 | [Specify the numeric GID of the 'tty' group])], |
530 | [AC_DEFINE_UNQUOTED(TTY_GID, [$withval], [GID of the 'tty' group])], | |
531 | []) | |
532 | ||
e05b415e HG |
533 | AC_ARG_ENABLE(plymouth, AS_HELP_STRING([--enable-plymouth], [enable plymouth support])) |
534 | if test -n "$enable_plymouth"; then | |
535 | have_plymouth="$enable_plymouth" | |
536 | fi | |
537 | ||
0571e011 LP |
538 | AM_CONDITIONAL(TARGET_FEDORA, test x"$with_distro" = xfedora) |
539 | AM_CONDITIONAL(TARGET_SUSE, test x"$with_distro" = xsuse) | |
540 | AM_CONDITIONAL(TARGET_DEBIAN, test x"$with_distro" = xdebian) | |
858dae18 AE |
541 | AM_CONDITIONAL(TARGET_UBUNTU, test x"$with_distro" = xubuntu) |
542 | AM_CONDITIONAL(TARGET_DEBIAN_OR_UBUNTU, test x"$with_distro" = xdebian -o x"$with_distro" = xubuntu) | |
d7c114c0 | 543 | AM_CONDITIONAL(TARGET_ARCH, test x"$with_distro" = xarch) |
f2b4af1c | 544 | AM_CONDITIONAL(TARGET_GENTOO, test x"$with_distro" = xgentoo) |
65c8976a | 545 | AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware) |
f5c88ec1 | 546 | AM_CONDITIONAL(TARGET_FRUGALWARE, test x"$with_distro" = xfrugalware) |
a338bab5 | 547 | AM_CONDITIONAL(TARGET_ALTLINUX, test x"$with_distro" = xaltlinux) |
1de4d79b | 548 | AM_CONDITIONAL(TARGET_MANDRIVA, test x"$with_distro" = xmandriva) |
54e4fdef | 549 | AM_CONDITIONAL(TARGET_MEEGO, test x"$with_distro" = xmeego) |
1bd8b818 | 550 | AM_CONDITIONAL(TARGET_ANGSTROM, test x"$with_distro" = xangstrom) |
6fdae8a6 | 551 | AM_CONDITIONAL(TARGET_MAGEIA, test x"$with_distro" = xmageia) |
0571e011 | 552 | |
e05b415e | 553 | AM_CONDITIONAL(HAVE_PLYMOUTH, test "$have_plymouth" = "yes") |
cca4aeee | 554 | AM_CONDITIONAL(HAVE_SYSV_COMPAT, test "$SYSTEM_SYSV_COMPAT" = "yes") |
cd3f8b7d | 555 | |
d2d12cd1 LP |
556 | AC_ARG_WITH([dbuspolicydir], |
557 | AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]), | |
558 | [], | |
559 | [with_dbuspolicydir=`pkg-config --variable=sysconfdir dbus-1`/dbus-1/system.d]) | |
d122948d | 560 | |
d2d12cd1 LP |
561 | AC_ARG_WITH([dbussessionservicedir], |
562 | AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]), | |
563 | [], | |
564 | [with_dbussessionservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`]) | |
d122948d | 565 | |
d2d12cd1 LP |
566 | AC_ARG_WITH([dbussystemservicedir], |
567 | AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]), | |
568 | [], | |
569 | [with_dbussystemservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../system-services]) | |
d122948d | 570 | |
d2d12cd1 LP |
571 | AC_ARG_WITH([dbusinterfacedir], |
572 | AS_HELP_STRING([--with-dbusinterfacedir=DIR], [D-Bus interface directory]), | |
573 | [], | |
574 | [with_dbusinterfacedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../interfaces]) | |
d122948d | 575 | |
d1ab0ca0 | 576 | AC_ARG_WITH([udevrulesdir], |
b0cca7d8 | 577 | AS_HELP_STRING([--with-udevrulesdir=DIR], [Directory for udev rules]), |
d1ab0ca0 | 578 | [], |
8c6db833 LP |
579 | [with_udevrulesdir=`pkg-config --variable=udevdir udev`/rules.d]) |
580 | ||
b8079ae1 KS |
581 | AC_ARG_WITH([rootprefix], |
582 | AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]), | |
39ad55a9 | 583 | [], [with_rootprefix=${ac_default_prefix}]) |
d2d12cd1 | 584 | |
ae446765 KS |
585 | AC_ARG_WITH([rootlibdir], |
586 | AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]), | |
587 | [], | |
588 | [with_rootlibdir=${libdir}]) | |
589 | ||
9d3203b4 | 590 | AC_ARG_WITH([pamlibdir], |
b0cca7d8 | 591 | AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]), |
9d3203b4 KS |
592 | [], |
593 | [with_pamlibdir=${with_rootlibdir}/security]) | |
594 | ||
bc9bdbba MG |
595 | AC_ARG_ENABLE([split-usr], |
596 | AS_HELP_STRING([--enable-split-usr], [Assume that /bin, /sbin aren\'t symlinks into /usr]), | |
597 | [], | |
598 | [AS_IF([test "x${ac_default_prefix}" != "x${with_rootprefix}"], [ | |
599 | enable_split_usr=yes | |
600 | ], [ | |
601 | enable_split_usr=no | |
602 | ])]) | |
603 | ||
604 | AS_IF([test "x${enable_split_usr}" = "xyes"], [ | |
2c6db6fb | 605 | AC_DEFINE(HAVE_SPLIT_USR, 1, [Define if /bin, /sbin aren't symlinks into /usr]) |
bc9bdbba | 606 | ]) |
2c6db6fb | 607 | |
d2d12cd1 LP |
608 | AC_SUBST([dbuspolicydir], [$with_dbuspolicydir]) |
609 | AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir]) | |
610 | AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir]) | |
611 | AC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir]) | |
612 | AC_SUBST([udevrulesdir], [$with_udevrulesdir]) | |
8c6db833 | 613 | AC_SUBST([pamlibdir], [$with_pamlibdir]) |
b8079ae1 | 614 | AC_SUBST([rootprefix], [$with_rootprefix]) |
ae446765 | 615 | AC_SUBST([rootlibdir], [$with_rootlibdir]) |
8c4a3079 | 616 | |
1c7dde3e | 617 | AC_CONFIG_FILES([Makefile po/Makefile.in]) |
a45a909f | 618 | AC_OUTPUT |
ae446765 | 619 | AC_MSG_RESULT([ |
0571e011 LP |
620 | $PACKAGE_NAME $VERSION |
621 | ||
2c696a96 | 622 | Distribution: ${with_distro} |
07459bb6 | 623 | SysV compatibility: ${SYSTEM_SYSV_COMPAT} |
0571e011 LP |
624 | SysV init scripts: ${SYSTEM_SYSVINIT_PATH} |
625 | SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH} | |
a9b5b032 | 626 | Gtk: ${have_gtk} |
7f4e0805 | 627 | libcryptsetup: ${have_libcryptsetup} |
5b6319dc LP |
628 | tcpwrap: ${have_tcpwrap} |
629 | PAM: ${have_pam} | |
12716238 LP |
630 | AUDIT: ${have_audit} |
631 | SELinux: ${have_selinux} | |
807e17f0 | 632 | XZ: ${have_xz} |
5eda94dd | 633 | ACL: ${have_acl} |
27669061 | 634 | binfmt: ${have_binfmt} |
e5e83e83 LP |
635 | vconsole: ${have_vconsole} |
636 | readahead: ${have_readahead} | |
4de85612 LP |
637 | quotacheck: ${have_quotacheck} |
638 | randomseed: ${have_randomseed} | |
2a018e83 | 639 | logind: ${have_logind} |
b2e9fb99 | 640 | hostnamed: ${have_hostnamed} |
f47cd184 | 641 | timedated: ${have_timedated} |
4cd1eaa5 | 642 | localed: ${have_localed} |
f5e04665 | 643 | coredump: ${have_coredump} |
e05b415e | 644 | plymouth: ${have_plymouth} |
8c4a3079 | 645 | prefix: ${prefix} |
b8079ae1 | 646 | rootprefix: ${with_rootprefix} |
fbe224e2 | 647 | libexec dir: ${libexecdir} |
ae446765 KS |
648 | lib dir: ${libdir} |
649 | rootlib dir: ${with_rootlibdir} | |
2c6db6fb | 650 | PAM modules dir: ${with_pamlibdir} |
ae446765 | 651 | udev rules dir: ${with_udevrulesdir} |
2c6db6fb LP |
652 | D-Bus policy dir: ${with_dbuspolicydir} |
653 | D-Bus session dir: ${with_dbussessionservicedir} | |
654 | D-Bus system dir: ${with_dbussystemservicedir} | |
655 | D-Bus interfaces dir: ${with_dbusinterfacedir} | |
bc9bdbba | 656 | Split /usr: ${enable_split_usr} |
75db9a77 | 657 | Build man pages: ${have_manpages} |
ae446765 | 658 | ]) |