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