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