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