]>
Commit | Line | Data |
---|---|---|
fb0951b0 | 1 | # |
47be870b LP |
2 | # This file is part of systemd. |
3 | # | |
3e214785 KS |
4 | # Copyright 2010-2012 Lennart Poettering |
5 | # Copyright 2010-2012 Kay Sievers | |
47be870b LP |
6 | # |
7 | # systemd is free software; you can redistribute it and/or modify it | |
5430f7f2 LP |
8 | # under the terms of the GNU Lesser General Public License as published by |
9 | # the Free Software Foundation; either version 2.1 of the License, or | |
47be870b LP |
10 | # (at your option) any later version. |
11 | # | |
12 | # systemd is distributed in the hope that it will be useful, but | |
13 | # WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
5430f7f2 | 15 | # Lesser General Public License for more details. |
47be870b | 16 | # |
5430f7f2 | 17 | # You should have received a copy of the GNU Lesser General Public License |
47be870b LP |
18 | # along with systemd; If not, see <http://www.gnu.org/licenses/>. |
19 | ||
4e949c11 JJ |
20 | AC_PREREQ([2.64]) |
21 | ||
22 | AC_INIT([systemd], | |
606c24e3 | 23 | [204], |
4e949c11 JJ |
24 | [http://bugs.freedesktop.org/enter_bug.cgi?product=systemd], |
25 | [systemd], | |
26 | [http://www.freedesktop.org/wiki/Software/systemd]) | |
47be870b | 27 | |
78a825f2 | 28 | AC_CONFIG_SRCDIR([src/core/main.c]) |
47be870b LP |
29 | AC_CONFIG_MACRO_DIR([m4]) |
30 | AC_CONFIG_HEADERS([config.h]) | |
a80db8bd JJ |
31 | AC_CONFIG_AUX_DIR([build-aux]) |
32 | ||
4db6d587 | 33 | AC_USE_SYSTEM_EXTENSIONS |
907dd195 | 34 | AC_SYS_LARGEFILE |
eb7bbee6 | 35 | AC_PREFIX_DEFAULT([/usr]) |
bbd9b8c2 | 36 | AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects check-news]) |
3e214785 | 37 | AM_SILENT_RULES([yes]) |
47be870b | 38 | AC_CANONICAL_HOST |
22be093f | 39 | AC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.]) |
d59d0a2b | 40 | AS_IF([test "x$host_cpu" = "xmips" || test "x$host_cpu" = "xmipsel" || |
41 | test "x$host_cpu" = "xmips64" || test "x$host_cpu" = "xmips64el"], | |
42 | [AC_DEFINE(ARCH_MIPS, [], [Whether on mips arch])]) | |
47be870b | 43 | |
3e214785 | 44 | LT_PREREQ(2.2) |
8666abb4 | 45 | LT_INIT([disable-static]) |
47be870b | 46 | |
1c7dde3e BN |
47 | # i18n stuff for the PolicyKit policy files |
48 | IT_PROG_INTLTOOL([0.40.0]) | |
49 | ||
50 | GETTEXT_PACKAGE=systemd | |
51 | AC_SUBST(GETTEXT_PACKAGE) | |
52 | ||
e9da3678 LP |
53 | AC_PROG_MKDIR_P |
54 | AC_PROG_LN_S | |
55 | AC_PROG_SED | |
3ce4fad8 | 56 | AC_PROG_GREP |
f975e971 | 57 | AC_PROG_AWK |
e9da3678 | 58 | |
47be870b LP |
59 | AC_PROG_CC |
60 | AC_PROG_CC_C99 | |
61 | AM_PROG_CC_C_O | |
62 | AC_PROG_GCC_TRADITIONAL | |
47be870b | 63 | |
3e214785 | 64 | AC_PATH_PROG([M4], [m4]) |
fe1fed02 | 65 | AC_PATH_PROG([XSLTPROC], [xsltproc]) |
92ec4495 | 66 | |
86b2e20a LP |
67 | AC_PATH_PROG([QUOTAON], [quotaon], [/usr/sbin/quotaon]) |
68 | AC_PATH_PROG([QUOTACHECK], [quotacheck], [/usr/sbin/quotacheck]) | |
b51fc639 | 69 | |
86b2e20a LP |
70 | AC_PATH_PROG([SETCAP], [setcap], [/usr/sbin/setcap]) |
71 | ||
c1c02e07 | 72 | AC_PATH_PROG([KILL], [kill], [/usr/bin/kill]) |
96ede260 | 73 | |
80a5cbac | 74 | # gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line |
b37250d6 ZJS |
75 | m4_ifdef([GTK_DOC_CHECK], [ |
76 | GTK_DOC_CHECK([1.18],[--flavour no-tmpl])], | |
6581f00f ZJS |
77 | [AM_CONDITIONAL([ENABLE_GTK_DOC], [false]) |
78 | enable_gtk_doc=no]) | |
92ec4495 | 79 | |
fe1fed02 ZJS |
80 | AS_IF([test "x$enable_gtk_doc" = "xyes" -a "x$XSLTPROC" = x], [ |
81 | AC_MSG_ERROR([*** GTK doc requested but xsltproc not found]) | |
82 | ]) | |
83 | ||
6e92b23f | 84 | m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [ |
0eaeca1f | 85 | GOBJECT_INTROSPECTION_CHECK([1.31.1]) |
d66ee73a ZJS |
86 | ], [ |
87 | AM_CONDITIONAL([HAVE_INTROSPECTION], [false]) | |
88 | enable_introspection=no]) | |
3e214785 | 89 | |
ac714a78 MJ |
90 | AC_CHECK_TOOL(OBJCOPY, objcopy) |
91 | AC_CHECK_TOOL(STRINGS, strings) | |
92 | AC_CHECK_TOOL(GPERF, gperf) | |
b62cfcea MB |
93 | if test -z "$GPERF" ; then |
94 | AC_MSG_ERROR([*** gperf not found]) | |
95 | fi | |
9a60da28 | 96 | |
eb2e280f | 97 | CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\ |
be1a67d9 | 98 | -pipe \ |
d1ab0ca0 | 99 | -Wall \ |
d1ab0ca0 | 100 | -Wextra \ |
27765dfc | 101 | -Wno-inline \ |
d1ab0ca0 | 102 | -Wundef \ |
780040dc | 103 | "-Wformat=2 -Wformat-security -Wformat-nonliteral" \ |
d1ab0ca0 LP |
104 | -Wlogical-op \ |
105 | -Wsign-compare \ | |
d1ab0ca0 | 106 | -Wmissing-include-dirs \ |
d1ab0ca0 LP |
107 | -Wold-style-definition \ |
108 | -Wpointer-arith \ | |
109 | -Winit-self \ | |
110 | -Wdeclaration-after-statement \ | |
111 | -Wfloat-equal \ | |
112 | -Wmissing-prototypes \ | |
113 | -Wstrict-prototypes \ | |
114 | -Wredundant-decls \ | |
115 | -Wmissing-declarations \ | |
116 | -Wmissing-noreturn \ | |
117 | -Wshadow \ | |
118 | -Wendif-labels \ | |
119 | -Wcast-align \ | |
120 | -Wstrict-aliasing=2 \ | |
121 | -Wwrite-strings \ | |
be1a67d9 LP |
122 | -Wno-long-long \ |
123 | -Wno-overlength-strings \ | |
d1ab0ca0 | 124 | -Wno-unused-parameter \ |
be1a67d9 | 125 | -Wno-missing-field-initializers \ |
8745297f | 126 | -Wno-unused-result \ |
d200735e | 127 | -Werror=overflow \ |
be1a67d9 | 128 | -ffast-math \ |
d1ab0ca0 LP |
129 | -fno-common \ |
130 | -fdiagnostics-show-option \ | |
8de1fd28 | 131 | -fdiagnostics-color \ |
9b85fc6a GSB |
132 | -fno-strict-aliasing \ |
133 | -fvisibility=hidden \ | |
134 | -ffunction-sections \ | |
5a45a936 | 135 | -fdata-sections \ |
c1663b9d LP |
136 | -fstack-protector \ |
137 | --param=ssp-buffer-size=4]) | |
5a45a936 LP |
138 | AC_SUBST([OUR_CFLAGS], $with_cflags) |
139 | ||
7cb20866 | 140 | AS_CASE([$CFLAGS], [*-O[[12345g\ ]]*], [ |
6a179865 ZJS |
141 | CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\ |
142 | -Wp,-D_FORTIFY_SOURCE=2])], [ | |
c937e0d5 | 143 | python_extra_cflags=-Wp,-U_FORTIFY_SOURCE |
6a179865 | 144 | AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])]) |
5a45a936 | 145 | AC_SUBST([OUR_CPPFLAGS], $with_cppflags) |
9e7adc3a LDM |
146 | |
147 | CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\ | |
9b85fc6a | 148 | -Wl,--as-needed \ |
9d2d0fe1 | 149 | -Wl,--no-undefined \ |
5a45a936 LP |
150 | -Wl,--gc-sections \ |
151 | -Wl,-z,relro \ | |
152 | -Wl,-z,now]) | |
153 | AC_SUBST([OUR_LDFLAGS], $with_ldflags) | |
47be870b | 154 | |
c937e0d5 ZJS |
155 | # ------------------------------------------------------------------------------ |
156 | # we use python to build the man page index, and for systemd-python | |
157 | have_python=no | |
158 | have_python_devel=no | |
159 | ||
160 | AC_ARG_WITH([python], | |
161 | [AS_HELP_STRING([--without-python], [Disable building the man page index and systemd-python (default: test)])]) | |
162 | ||
163 | AS_IF([test "x$with_python" != "xno"], [ | |
164 | AM_PATH_PYTHON(,, [:]) | |
165 | AS_IF([test "$PYTHON" != :], [have_python=yes]) | |
166 | ]) | |
167 | AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"]) | |
168 | AS_IF([test "x$PYTHON_BINARY" = "x"], | |
169 | [AS_IF([test "x$have_python" = "xyes"], | |
25ee45f9 | 170 | [PYTHON_BINARY="$(which "$PYTHON")"], |
c937e0d5 ZJS |
171 | [PYTHON_BINARY=/usr/bin/python])]) |
172 | AC_ARG_VAR(PYTHON_BINARY, [Python binary used to launch installed scripts]) | |
173 | ||
174 | AS_IF([test "x$with_python" != "xno"], [ | |
175 | AC_PATH_PROG(PYTHON_CONFIG, python${PYTHON_VERSION}-config) | |
176 | AS_IF([test -n "$PYTHON_CONFIG"], [ | |
177 | have_python_devel=yes | |
25ee45f9 MB |
178 | PYTHON_CFLAGS="$($PYTHON_CONFIG --cflags) $python_extra_cflags" |
179 | PYTHON_LIBS="$($PYTHON_CONFIG --ldflags)" | |
c937e0d5 ZJS |
180 | AC_SUBST(PYTHON_CFLAGS) |
181 | AC_SUBST(PYTHON_LIBS) | |
603c0b7b | 182 | AC_PATH_PROGS(SPHINX_BUILD, sphinx-build-${PYTHON_VERSION} sphinx-build) |
c937e0d5 ZJS |
183 | ]) |
184 | ]) | |
185 | AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test "$have_python_devel" = "yes"]) | |
186 | ||
187 | # ------------------------------------------------------------------------------ | |
188 | ||
e1718709 | 189 | AC_SEARCH_LIBS([mq_open], [rt], [], [AC_MSG_ERROR([*** POSIX RT library not found])]) |
afea26ad | 190 | AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])]) |
85f19d82 MB |
191 | |
192 | save_LIBS="$LIBS" | |
193 | LIBS= | |
47be870b LP |
194 | AC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])]) |
195 | AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])]) | |
85f19d82 MB |
196 | CAP_LIBS="$LIBS" |
197 | LIBS="$save_LIBS" | |
198 | AC_SUBST(CAP_LIBS) | |
47be870b | 199 | |
9388e99e | 200 | AC_CHECK_FUNCS([fanotify_init fanotify_mark]) |
4db17f29 | 201 | AC_CHECK_FUNCS([__secure_getenv secure_getenv]) |
9388e99e | 202 | AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at], [], [], [[#include <sys/types.h> |
a8348796 | 203 | #include <unistd.h> |
9388e99e MO |
204 | #include <sys/mount.h> |
205 | #include <fcntl.h>]]) | |
a8348796 | 206 | |
b237ef2c | 207 | # This makes sure pkg.m4 is available. |
a9b5b032 | 208 | m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config]) |
d1ab0ca0 | 209 | |
3e214785 | 210 | PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2]) |
e3043162 TG |
211 | |
212 | # ------------------------------------------------------------------------------ | |
213 | have_kmod=no | |
214 | AC_ARG_ENABLE(kmod, AS_HELP_STRING([--disable-kmod], [disable loadable modules support])) | |
215 | if test "x$enable_kmod" != "xno"; then | |
216 | PKG_CHECK_MODULES(KMOD, [ libkmod >= 5 ], | |
217 | [AC_DEFINE(HAVE_KMOD, 1, [Define if kmod is available]) have_kmod=yes], have_kmod=no) | |
218 | if test "x$have_kmod" = xno -a "x$enable_kmod" = xyes; then | |
219 | AC_MSG_ERROR([*** kmod support requested but libraries not found]) | |
220 | fi | |
221 | fi | |
222 | AM_CONDITIONAL(HAVE_KMOD, [test "$have_kmod" = "yes"]) | |
f553b3b1 AO |
223 | |
224 | # ------------------------------------------------------------------------------ | |
225 | have_blkid=no | |
226 | AC_ARG_ENABLE(blkid, AS_HELP_STRING([--disable-blkid], [disable blkid support])) | |
227 | if test "x$enable_blkid" != "xno"; then | |
228 | PKG_CHECK_MODULES(BLKID, [ blkid >= 2.20 ], | |
229 | [AC_DEFINE(HAVE_BLKID, 1, [Define if blkid is available]) have_blkid=yes], have_blkid=no) | |
230 | if test "x$have_blkid" = xno -a "x$enable_blkid" = xyes; then | |
231 | AC_MSG_ERROR([*** blkid support requested but libraries not found]) | |
232 | fi | |
233 | fi | |
234 | AM_CONDITIONAL(HAVE_BLKID, [test "$have_blkid" = "yes"]) | |
728beb28 | 235 | |
3e214785 | 236 | # ------------------------------------------------------------------------------ |
81611586 RS |
237 | have_ima=yes |
238 | AC_ARG_ENABLE([ima], AS_HELP_STRING([--disable-ima],[Disable optional IMA support]), | |
239 | [case "${enableval}" in | |
240 | yes) have_ima=yes ;; | |
241 | no) have_ima=no ;; | |
242 | *) AC_MSG_ERROR(bad value ${enableval} for --disable-ima) ;; | |
243 | esac], | |
244 | [have_ima=yes]) | |
245 | ||
246 | if test "x${have_ima}" != xno ; then | |
247 | AC_DEFINE(HAVE_IMA, 1, [Define if IMA is available]) | |
248 | fi | |
249 | ||
77e68fa2 LP |
250 | # ------------------------------------------------------------------------------ |
251 | have_chkconfig=yes | |
252 | AC_ARG_ENABLE([chkconfig], AS_HELP_STRING([--disable-chkconfig],[Disable optional chkconfig support]), | |
253 | [case "${enableval}" in | |
254 | yes) have_chkconfig=yes ;; | |
255 | no) have_chkconfig=no ;; | |
256 | *) AC_MSG_ERROR(bad value ${enableval} for --disable-chkconfig) ;; | |
257 | esac], | |
258 | [AC_PATH_PROG(CHKCONFIG, chkconfig) | |
259 | if test -z "$CHKCONFIG"; then | |
260 | have_chkconfig=no | |
261 | else | |
262 | have_chkconfig=yes | |
263 | fi]) | |
264 | ||
265 | if test "x${have_chkconfig}" != xno ; then | |
266 | AC_DEFINE(HAVE_CHKCONFIG, 1, [Define if CHKCONFIG is available]) | |
267 | fi | |
268 | ||
3e214785 | 269 | # ------------------------------------------------------------------------------ |
591622d7 LP |
270 | have_selinux=no |
271 | AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support])) | |
272 | if test "x$enable_selinux" != "xno"; then | |
3f8cc098 | 273 | PKG_CHECK_MODULES([SELINUX], [libselinux >= 2.1.9], |
591622d7 | 274 | [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available]) have_selinux=yes], have_selinux=no) |
591622d7 LP |
275 | if test "x$have_selinux" = xno -a "x$enable_selinux" = xyes; then |
276 | AC_MSG_ERROR([*** SELinux support requested but libraries not found]) | |
277 | fi | |
56cf987f | 278 | fi |
591622d7 | 279 | AM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"]) |
45df1f2c CR |
280 | |
281 | AC_ARG_WITH(debug-shell, | |
282 | AS_HELP_STRING([--with-debug-shell=PATH], | |
283 | [Path to debug shell binary]), | |
284 | [SUSHELL="$withval"],[ | |
285 | AS_IF([test "x${have_selinux}" != "xno"], [SUSHELL="/sbin/sushell"] , [SUSHELL="/bin/sh"])]) | |
286 | ||
5ec6b15b | 287 | AC_SUBST(SUSHELL) |
56cf987f | 288 | |
45df1f2c CR |
289 | AC_ARG_WITH([debug-tty], |
290 | AS_HELP_STRING([--with-debug-tty=PATH], | |
291 | [Specify the tty device for debug shell]), | |
292 | [DEBUGTTY="$withval"], | |
293 | [DEBUGTTY=/dev/tty9]) | |
294 | ||
295 | AC_SUBST(DEBUGTTY) | |
296 | ||
3e214785 | 297 | # ------------------------------------------------------------------------------ |
807e17f0 LP |
298 | have_xz=no |
299 | AC_ARG_ENABLE(xz, AS_HELP_STRING([--disable-xz], [Disable optional XZ support])) | |
300 | if test "x$enable_xz" != "xno"; then | |
301 | PKG_CHECK_MODULES(XZ, [ liblzma ], | |
302 | [AC_DEFINE(HAVE_XZ, 1, [Define if XZ is available]) have_xz=yes], have_xz=no) | |
807e17f0 LP |
303 | if test "x$have_xz" = xno -a "x$enable_xz" = xyes; then |
304 | AC_MSG_ERROR([*** Xz support requested but libraries not found]) | |
305 | fi | |
306 | fi | |
307 | AM_CONDITIONAL(HAVE_XZ, [test "$have_xz" = "yes"]) | |
308 | ||
3e214785 | 309 | # ------------------------------------------------------------------------------ |
0213c3f8 LP |
310 | AC_ARG_ENABLE([tcpwrap], |
311 | AS_HELP_STRING([--disable-tcpwrap],[Disable optional TCP wrappers support]), | |
312 | [case "${enableval}" in | |
5b6319dc LP |
313 | yes) have_tcpwrap=yes ;; |
314 | no) have_tcpwrap=no ;; | |
0213c3f8 LP |
315 | *) AC_MSG_ERROR(bad value ${enableval} for --disable-tcpwrap) ;; |
316 | esac], | |
5b6319dc | 317 | [have_tcpwrap=auto]) |
0213c3f8 | 318 | |
5b6319dc | 319 | if test "x${have_tcpwrap}" != xno ; then |
0213c3f8 LP |
320 | ACX_LIBWRAP |
321 | if test "x${LIBWRAP_LIBS}" = x ; then | |
5b6319dc LP |
322 | if test "x$have_tcpwrap" = xyes ; then |
323 | AC_MSG_ERROR([*** TCP wrappers support not found.]) | |
0213c3f8 | 324 | fi |
812cce32 | 325 | have_tcpwrap=no |
0213c3f8 | 326 | else |
5b6319dc | 327 | have_tcpwrap=yes |
0213c3f8 LP |
328 | fi |
329 | else | |
5b6319dc | 330 | LIBWRAP_LIBS= |
0213c3f8 | 331 | fi |
0213c3f8 LP |
332 | AC_SUBST(LIBWRAP_LIBS) |
333 | ||
3e214785 | 334 | # ------------------------------------------------------------------------------ |
5b6319dc LP |
335 | AC_ARG_ENABLE([pam], |
336 | AS_HELP_STRING([--disable-pam],[Disable optional PAM support]), | |
337 | [case "${enableval}" in | |
338 | yes) have_pam=yes ;; | |
339 | no) have_pam=no ;; | |
340 | *) AC_MSG_ERROR(bad value ${enableval} for --disable-pam) ;; | |
341 | esac], | |
342 | [have_pam=auto]) | |
343 | ||
344 | if test "x${have_pam}" != xno ; then | |
345 | AC_CHECK_HEADERS( | |
346 | [security/pam_modules.h security/pam_modutil.h security/pam_ext.h], | |
347 | [have_pam=yes], | |
348 | [if test "x$have_pam" = xyes ; then | |
349 | AC_MSG_ERROR([*** PAM headers not found.]) | |
350 | fi]) | |
351 | ||
352 | AC_CHECK_LIB( | |
353 | [pam], | |
354 | [pam_syslog], | |
355 | [have_pam=yes], | |
356 | [if test "x$have_pam" = xyes ; then | |
357 | AC_MSG_ERROR([*** libpam not found.]) | |
358 | fi]) | |
359 | ||
360 | if test "x$have_pam" = xyes ; then | |
361 | PAM_LIBS="-lpam -lpam_misc" | |
362 | AC_DEFINE(HAVE_PAM, 1, [PAM available]) | |
812cce32 LP |
363 | else |
364 | have_pam=no | |
5b6319dc LP |
365 | fi |
366 | else | |
367 | PAM_LIBS= | |
368 | fi | |
369 | AC_SUBST(PAM_LIBS) | |
370 | AM_CONDITIONAL([HAVE_PAM], [test "x$have_pam" != xno]) | |
371 | ||
3e214785 | 372 | # ------------------------------------------------------------------------------ |
5eda94dd LP |
373 | AC_ARG_ENABLE([acl], |
374 | AS_HELP_STRING([--disable-acl],[Disable optional ACL support]), | |
375 | [case "${enableval}" in | |
376 | yes) have_acl=yes ;; | |
377 | no) have_acl=no ;; | |
378 | *) AC_MSG_ERROR(bad value ${enableval} for --disable-acl) ;; | |
379 | esac], | |
380 | [have_acl=auto]) | |
381 | ||
382 | if test "x${have_acl}" != xno ; then | |
383 | AC_CHECK_HEADERS( | |
384 | [sys/acl.h acl/libacl.h], | |
385 | [have_acl=yes], | |
386 | [if test "x$have_acl" = xyes ; then | |
387 | AC_MSG_ERROR([*** ACL headers not found.]) | |
388 | fi]) | |
389 | ||
390 | AC_CHECK_LIB( | |
391 | [acl], | |
392 | [acl_get_file], | |
393 | [have_acl=yes], | |
394 | [if test "x$have_acl" = xyes ; then | |
395 | AC_MSG_ERROR([*** libacl not found.]) | |
396 | fi]) | |
397 | ||
398 | if test "x$have_acl" = xyes ; then | |
399 | ACL_LIBS="-lacl" | |
400 | AC_DEFINE(HAVE_ACL, 1, [ACL available]) | |
401 | else | |
402 | have_acl=no | |
403 | fi | |
404 | else | |
405 | ACL_LIBS= | |
406 | fi | |
407 | AC_SUBST(ACL_LIBS) | |
408 | AM_CONDITIONAL([HAVE_ACL], [test "x$have_acl" != xno]) | |
409 | ||
fb0951b0 LP |
410 | # ------------------------------------------------------------------------------ |
411 | AC_ARG_ENABLE([xattr], | |
412 | AS_HELP_STRING([--disable-xattr],[Disable optional XATTR support]), | |
413 | [case "${enableval}" in | |
414 | yes) have_xattr=yes ;; | |
415 | no) have_xattr=no ;; | |
416 | *) AC_MSG_ERROR(bad value ${enableval} for --disable-xattr) ;; | |
417 | esac], | |
418 | [have_xattr=auto]) | |
419 | ||
420 | if test "x${have_xattr}" != xno ; then | |
421 | AC_CHECK_HEADERS( | |
422 | [attr/xattr.h], | |
423 | [have_xattr=yes], | |
424 | [if test "x$have_xattr" = xyes ; then | |
425 | AC_MSG_ERROR([*** XATTR headers not found.]) | |
426 | fi]) | |
427 | ||
428 | AC_CHECK_LIB( | |
429 | [attr], | |
430 | [fsetxattr], | |
431 | [have_xattr=yes], | |
432 | [if test "x$have_xattr" = xyes ; then | |
433 | AC_MSG_ERROR([*** libattr not found.]) | |
434 | fi]) | |
435 | ||
436 | if test "x$have_xattr" = xyes ; then | |
437 | XATTR_LIBS="-lattr" | |
438 | AC_DEFINE(HAVE_XATTR, 1, [XATTR available]) | |
439 | else | |
440 | have_xattr=no | |
441 | fi | |
442 | else | |
443 | XATTR_LIBS= | |
444 | fi | |
445 | AC_SUBST(XATTR_LIBS) | |
446 | AM_CONDITIONAL([HAVE_XATTR], [test "x$have_xattr" != xno]) | |
447 | ||
2b3e18de KL |
448 | # ------------------------------------------------------------------------------ |
449 | AC_ARG_ENABLE([smack], AS_HELP_STRING([--disable-smack],[Disable optional SMACK support]), | |
450 | [case "${enableval}" in | |
451 | yes) have_smack=yes ;; | |
452 | no) have_smack=no ;; | |
453 | *) AC_MSG_ERROR(bad value ${enableval} for --disable-smack) ;; | |
454 | esac], | |
455 | [have_smack=auto]) | |
456 | ||
457 | if test "x${have_xattr}" = xno; then | |
458 | if test "x${have_smack}" = xyes; then | |
459 | AC_MSG_ERROR(SMACK requires xattr support) | |
460 | else | |
461 | have_smack=no | |
462 | fi | |
463 | else | |
464 | if test "x${have_smack}" = xauto; then | |
465 | have_smack=yes | |
466 | fi | |
467 | fi | |
468 | ||
469 | if test "x${have_smack}" = xyes ; then | |
470 | AC_DEFINE(HAVE_SMACK, 1, [Define if SMACK is available]) | |
471 | fi | |
472 | ||
7560fffc | 473 | # ------------------------------------------------------------------------------ |
feb12d3e | 474 | AC_ARG_ENABLE([gcrypt], |
7560fffc LP |
475 | AS_HELP_STRING([--disable-gcrypt],[Disable optional GCRYPT support]), |
476 | [case "${enableval}" in | |
477 | yes) have_gcrypt=yes ;; | |
478 | no) have_gcrypt=no ;; | |
479 | *) AC_MSG_ERROR(bad value ${enableval} for --disable-gcrypt) ;; | |
480 | esac], | |
481 | [have_gcrypt=auto]) | |
482 | ||
483 | if test "x${have_gcrypt}" != xno ; then | |
484 | AM_PATH_LIBGCRYPT( | |
485 | [1.4.5], | |
486 | [have_gcrypt=yes], | |
487 | [if test "x$have_gcrypt" = xyes ; then | |
488 | AC_MSG_ERROR([*** GCRYPT headers not found.]) | |
489 | fi]) | |
490 | ||
491 | if test "x$have_gcrypt" = xyes ; then | |
492 | GCRYPT_LIBS="$LIBGCRYPT_LIBS" | |
493 | GCRYPT_CFLAGS="$LIBGCRYPT_CFLAGS" | |
494 | AC_DEFINE(HAVE_GCRYPT, 1, [GCRYPT available]) | |
495 | else | |
496 | have_gcrypt=no | |
497 | fi | |
498 | else | |
499 | GCRYPT_LIBS= | |
500 | GCRYPT_CFLAGS= | |
501 | fi | |
502 | AC_SUBST(GCRYPT_LIBS) | |
503 | AC_SUBST(GCRYPT_CFLAGS) | |
504 | AM_CONDITIONAL([HAVE_GCRYPT], [test "x$have_gcrypt" != xno]) | |
505 | ||
3e214785 | 506 | # ------------------------------------------------------------------------------ |
4927fcae LP |
507 | AC_ARG_ENABLE([audit], |
508 | AS_HELP_STRING([--disable-audit],[Disable optional AUDIT support]), | |
509 | [case "${enableval}" in | |
510 | yes) have_audit=yes ;; | |
511 | no) have_audit=no ;; | |
512 | *) AC_MSG_ERROR(bad value ${enableval} for --disable-audit) ;; | |
513 | esac], | |
514 | [have_audit=auto]) | |
515 | ||
516 | if test "x${have_audit}" != xno ; then | |
517 | AC_CHECK_HEADERS( | |
518 | [libaudit.h], | |
519 | [have_audit=yes], | |
520 | [if test "x$have_audit" = xyes ; then | |
521 | AC_MSG_ERROR([*** AUDIT headers not found.]) | |
522 | fi]) | |
523 | ||
524 | AC_CHECK_LIB( | |
525 | [audit], | |
526 | [audit_open], | |
527 | [have_audit=yes], | |
528 | [if test "x$have_audit" = xyes ; then | |
529 | AC_MSG_ERROR([*** libaudit not found.]) | |
530 | fi]) | |
531 | ||
532 | if test "x$have_audit" = xyes ; then | |
533 | AUDIT_LIBS="-laudit" | |
534 | AC_DEFINE(HAVE_AUDIT, 1, [AUDIT available]) | |
535 | else | |
536 | have_audit=no | |
537 | fi | |
538 | else | |
539 | AUDIT_LIBS= | |
540 | fi | |
541 | AC_SUBST(AUDIT_LIBS) | |
542 | ||
3e214785 | 543 | # ------------------------------------------------------------------------------ |
7f4e0805 LP |
544 | have_libcryptsetup=no |
545 | AC_ARG_ENABLE(libcryptsetup, AS_HELP_STRING([--disable-libcryptsetup], [disable libcryptsetup tools])) | |
546 | if test "x$enable_libcryptsetup" != "xno"; then | |
880a599e | 547 | PKG_CHECK_MODULES(LIBCRYPTSETUP, [ libcryptsetup >= 1.4.2 ], |
7f4e0805 | 548 | [AC_DEFINE(HAVE_LIBCRYPTSETUP, 1, [Define if libcryptsetup is available]) have_libcryptsetup=yes], have_libcryptsetup=no) |
7f4e0805 | 549 | if test "x$have_libcryptsetup" = xno -a "x$enable_libcryptsetup" = xyes; then |
591622d7 | 550 | AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found]) |
7f4e0805 LP |
551 | fi |
552 | fi | |
553 | AM_CONDITIONAL(HAVE_LIBCRYPTSETUP, [test "$have_libcryptsetup" = "yes"]) | |
554 | ||
f6a971bc LP |
555 | # ------------------------------------------------------------------------------ |
556 | have_qrencode=no | |
557 | AC_ARG_ENABLE(qrencode, AS_HELP_STRING([--disable-qrencode], [disable qrencode support])) | |
558 | if test "x$enable_qrencode" != "xno"; then | |
559 | PKG_CHECK_MODULES(QRENCODE, [ libqrencode ], | |
560 | [AC_DEFINE(HAVE_QRENCODE, 1, [Define if qrencode is available]) have_qrencode=yes], have_qrencode=no) | |
561 | if test "x$have_qrencode" = xno -a "x$enable_qrencode" = xyes; then | |
562 | AC_MSG_ERROR([*** qrencode support requested but libraries not found]) | |
563 | fi | |
564 | fi | |
565 | AM_CONDITIONAL(HAVE_QRENCODE, [test "$have_qrencode" = "yes"]) | |
566 | ||
7b17a7d7 LP |
567 | # ------------------------------------------------------------------------------ |
568 | have_microhttpd=no | |
569 | AC_ARG_ENABLE(microhttpd, AS_HELP_STRING([--disable-microhttpd], [disable microhttpd support])) | |
570 | if test "x$enable_microhttpd" != "xno"; then | |
59bb9d9a | 571 | PKG_CHECK_MODULES(MICROHTTPD, [libmicrohttpd >= 0.9.5], |
7b17a7d7 LP |
572 | [AC_DEFINE(HAVE_MICROHTTPD, 1, [Define if microhttpd is available]) have_microhttpd=yes], have_microhttpd=no) |
573 | if test "x$have_microhttpd" = xno -a "x$enable_microhttpd" = xyes; then | |
574 | AC_MSG_ERROR([*** microhttpd support requested but libraries not found]) | |
575 | fi | |
576 | fi | |
577 | AM_CONDITIONAL(HAVE_MICROHTTPD, [test "$have_microhttpd" = "yes"]) | |
578 | ||
3e214785 | 579 | # ------------------------------------------------------------------------------ |
27669061 MV |
580 | have_binfmt=no |
581 | AC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool])) | |
582 | if test "x$enable_binfmt" != "xno"; then | |
be31376e | 583 | have_binfmt=yes |
27669061 MV |
584 | fi |
585 | AM_CONDITIONAL(ENABLE_BINFMT, [test "$have_binfmt" = "yes"]) | |
586 | ||
3e214785 | 587 | # ------------------------------------------------------------------------------ |
e5e83e83 LP |
588 | have_vconsole=no |
589 | AC_ARG_ENABLE(vconsole, AS_HELP_STRING([--disable-vconsole], [disable vconsole tool])) | |
590 | if test "x$enable_vconsole" != "xno"; then | |
be31376e | 591 | have_vconsole=yes |
e5e83e83 LP |
592 | fi |
593 | AM_CONDITIONAL(ENABLE_VCONSOLE, [test "$have_vconsole" = "yes"]) | |
594 | ||
3e214785 | 595 | # ------------------------------------------------------------------------------ |
e5e83e83 LP |
596 | have_readahead=no |
597 | AC_ARG_ENABLE(readahead, AS_HELP_STRING([--disable-readahead], [disable readahead tools])) | |
598 | if test "x$enable_readahead" != "xno"; then | |
be31376e | 599 | have_readahead=yes |
e5e83e83 LP |
600 | fi |
601 | AM_CONDITIONAL(ENABLE_READAHEAD, [test "$have_readahead" = "yes"]) | |
602 | ||
83fdc450 AK |
603 | # ------------------------------------------------------------------------------ |
604 | have_bootchart=no | |
605 | AC_ARG_ENABLE(bootchart, AS_HELP_STRING([--disable-bootchart], [disable bootchart tool])) | |
606 | if test "x$enable_bootchart" != "xno"; then | |
607 | have_bootchart=yes | |
608 | fi | |
609 | AM_CONDITIONAL(ENABLE_BOOTCHART, [test "$have_bootchart" = "yes"]) | |
610 | ||
3e214785 | 611 | # ------------------------------------------------------------------------------ |
4de85612 LP |
612 | have_quotacheck=no |
613 | AC_ARG_ENABLE(quotacheck, AS_HELP_STRING([--disable-quotacheck], [disable quotacheck tools])) | |
614 | if test "x$enable_quotacheck" != "xno"; then | |
be31376e | 615 | have_quotacheck=yes |
4de85612 LP |
616 | fi |
617 | AM_CONDITIONAL(ENABLE_QUOTACHECK, [test "$have_quotacheck" = "yes"]) | |
618 | ||
3e214785 | 619 | # ------------------------------------------------------------------------------ |
4de85612 LP |
620 | have_randomseed=no |
621 | AC_ARG_ENABLE(randomseed, AS_HELP_STRING([--disable-randomseed], [disable randomseed tools])) | |
622 | if test "x$enable_randomseed" != "xno"; then | |
be31376e | 623 | have_randomseed=yes |
4de85612 LP |
624 | fi |
625 | AM_CONDITIONAL(ENABLE_RANDOMSEED, [test "$have_randomseed" = "yes"]) | |
626 | ||
3e214785 | 627 | # ------------------------------------------------------------------------------ |
2a018e83 KS |
628 | have_logind=no |
629 | AC_ARG_ENABLE(logind, AS_HELP_STRING([--disable-logind], [disable login daemon])) | |
630 | if test "x$enable_logind" != "xno"; then | |
be31376e | 631 | have_logind=yes |
2a018e83 KS |
632 | fi |
633 | AM_CONDITIONAL(ENABLE_LOGIND, [test "$have_logind" = "yes"]) | |
4c80c73c | 634 | AS_IF([test "$have_logind" = "yes"], [ AC_DEFINE(HAVE_LOGIND, [1], [Logind support available]) ]) |
2a018e83 | 635 | |
3e214785 | 636 | # ------------------------------------------------------------------------------ |
b2e9fb99 MV |
637 | have_hostnamed=no |
638 | AC_ARG_ENABLE(hostnamed, AS_HELP_STRING([--disable-hostnamed], [disable hostname daemon])) | |
639 | if test "x$enable_hostnamed" != "xno"; then | |
be31376e | 640 | have_hostnamed=yes |
b2e9fb99 MV |
641 | fi |
642 | AM_CONDITIONAL(ENABLE_HOSTNAMED, [test "$have_hostnamed" = "yes"]) | |
643 | ||
3e214785 | 644 | # ------------------------------------------------------------------------------ |
f47cd184 MV |
645 | have_timedated=no |
646 | AC_ARG_ENABLE(timedated, AS_HELP_STRING([--disable-timedated], [disable timedate daemon])) | |
647 | if test "x$enable_timedated" != "xno"; then | |
be31376e | 648 | have_timedated=yes |
f47cd184 MV |
649 | fi |
650 | AM_CONDITIONAL(ENABLE_TIMEDATED, [test "$have_timedated" = "yes"]) | |
651 | ||
3e214785 | 652 | # ------------------------------------------------------------------------------ |
4cd1eaa5 MV |
653 | have_localed=no |
654 | AC_ARG_ENABLE(localed, AS_HELP_STRING([--disable-localed], [disable locale daemon])) | |
655 | if test "x$enable_localed" != "xno"; then | |
be31376e | 656 | have_localed=yes |
4cd1eaa5 MV |
657 | fi |
658 | AM_CONDITIONAL(ENABLE_LOCALED, [test "$have_localed" = "yes"]) | |
659 | ||
3e214785 | 660 | # ------------------------------------------------------------------------------ |
f5e04665 LP |
661 | have_coredump=no |
662 | AC_ARG_ENABLE(coredump, AS_HELP_STRING([--disable-coredump], [disable coredump hook])) | |
663 | if test "x$enable_coredump" != "xno"; then | |
be31376e | 664 | have_coredump=yes |
f5e04665 LP |
665 | fi |
666 | AM_CONDITIONAL(ENABLE_COREDUMP, [test "$have_coredump" = "yes"]) | |
667 | ||
46ba8aae LP |
668 | # ------------------------------------------------------------------------------ |
669 | have_polkit=no | |
670 | AC_ARG_ENABLE(polkit, AS_HELP_STRING([--disable-polkit], [disable PolicyKit support])) | |
671 | if test "x$enable_polkit" != "xno"; then | |
672 | AC_DEFINE(ENABLE_POLKIT, 1, [Define if PolicyKit support is to be enabled]) | |
673 | have_polkit=yes | |
674 | fi | |
675 | AM_CONDITIONAL(ENABLE_POLKIT, [test "x$have_polkit" = "xyes"]) | |
676 | ||
b872e9a0 LP |
677 | # ------------------------------------------------------------------------------ |
678 | have_efi=no | |
679 | AC_ARG_ENABLE(efi, AS_HELP_STRING([--disable-efi], [disable EFI support])) | |
680 | if test "x$enable_efi" != "xno"; then | |
681 | AC_DEFINE(ENABLE_EFI, 1, [Define if EFI support is to be enabled]) | |
682 | have_efi=yes | |
683 | fi | |
684 | AM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"]) | |
685 | ||
b1c4ca25 LP |
686 | # ------------------------------------------------------------------------------ |
687 | AC_ARG_WITH(rc-local-script-path-start, | |
688 | AS_HELP_STRING([--with-rc-local-script-path-start=PATH], | |
689 | [Path to /etc/rc.local]), | |
690 | [RC_LOCAL_SCRIPT_PATH_START="$withval"], | |
691 | [RC_LOCAL_SCRIPT_PATH_START="/etc/rc.local"]) | |
692 | ||
693 | AC_ARG_WITH(rc-local-script-path-stop, | |
694 | AS_HELP_STRING([--with-rc-local-script-path-stop=PATH], | |
bc270841 | 695 | [Path to /usr/sbin/halt.local]), |
b1c4ca25 | 696 | [RC_LOCAL_SCRIPT_PATH_STOP="$withval"], |
bc270841 | 697 | [RC_LOCAL_SCRIPT_PATH_STOP="/usr/sbin/halt.local"]) |
b1c4ca25 LP |
698 | |
699 | AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_START, ["$RC_LOCAL_SCRIPT_PATH_START"], [Path of /etc/rc.local script]) | |
bc270841 | 700 | AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_STOP, ["$RC_LOCAL_SCRIPT_PATH_STOP"], [Path of /usr/sbin/halt.local script]) |
b1c4ca25 LP |
701 | |
702 | AC_SUBST(RC_LOCAL_SCRIPT_PATH_START) | |
703 | AC_SUBST(RC_LOCAL_SCRIPT_PATH_STOP) | |
704 | ||
a382332e LP |
705 | # ------------------------------------------------------------------------------ |
706 | AC_ARG_WITH(kbd-loadkeys, | |
707 | AS_HELP_STRING([--with-kbd-loadkeys=PATH], | |
708 | [Path to loadkeys]), | |
709 | [KBD_LOADKEYS="$withval"], | |
710 | [KBD_LOADKEYS="/usr/bin/loadkeys"]) | |
711 | ||
712 | AC_ARG_WITH(kbd-setfont, | |
713 | AS_HELP_STRING([--with-kbd-setfont=PATH], | |
714 | [Path to setfont]), | |
715 | [KBD_SETFONT="$withval"], | |
716 | [KBD_SETFONT="/usr/bin/setfont"]) | |
717 | ||
718 | AC_DEFINE_UNQUOTED(KBD_LOADKEYS, ["$KBD_LOADKEYS"], [Path of loadkeys]) | |
719 | AC_DEFINE_UNQUOTED(KBD_SETFONT, ["$KBD_SETFONT"], [Path of setfont]) | |
720 | ||
721 | AC_SUBST(KBD_LOADKEYS) | |
722 | AC_SUBST(KBD_SETFONT) | |
723 | ||
4ad61fd1 CR |
724 | AC_ARG_WITH(telinit, |
725 | AS_HELP_STRING([--with-telinit=PATH], | |
726 | [Path to telinit]), | |
727 | [TELINIT="$withval"], | |
728 | [TELINIT="/lib/upstart/telinit"]) | |
729 | ||
730 | AC_DEFINE_UNQUOTED(TELINIT, ["$TELINIT"], [Path to telinit]) | |
731 | ||
732 | AC_SUBST(TELINIT) | |
733 | ||
7211f918 LP |
734 | AC_CHECK_HEADERS_ONCE([valgrind/memcheck.h]) |
735 | ||
d562955e TG |
736 | # ------------------------------------------------------------------------------ |
737 | have_myhostname=no | |
f8c5a581 | 738 | AC_ARG_ENABLE(myhostname, AS_HELP_STRING([--disable-myhostname], [disable nss-myhostname support])) |
d562955e TG |
739 | if test "x$enable_myhostname" != "xno"; then |
740 | AC_HEADER_STDC | |
741 | AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h nss.h sys/ioctl.h]) | |
742 | ||
743 | AC_C_CONST | |
744 | AC_TYPE_SIZE_T | |
745 | AC_HEADER_TIME | |
746 | ||
747 | AC_FUNC_MALLOC | |
748 | AC_FUNC_SELECT_ARGTYPES | |
749 | AC_CHECK_FUNCS([gethostbyaddr gethostbyname gettimeofday inet_ntoa memset select socket strcspn strdup strerror strncasecmp strcasecmp strspn]) | |
750 | ||
751 | have_myhostname=yes | |
752 | fi | |
753 | AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"]) | |
754 | ||
3e214785 KS |
755 | # ------------------------------------------------------------------------------ |
756 | AC_ARG_WITH(firmware-path, | |
757 | AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]], | |
a3bd8447 TG |
758 | [Firmware search path (default="")]), |
759 | [], [with_firmware_path=""]) | |
3e214785 KS |
760 | OLD_IFS=$IFS |
761 | IFS=: | |
762 | for i in $with_firmware_path; do | |
763 | if test "x${FIRMWARE_PATH}" = "x"; then | |
764 | FIRMWARE_PATH="\\\"${i}/\\\"" | |
765 | else | |
766 | FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\"" | |
767 | fi | |
768 | done | |
769 | IFS=$OLD_IFS | |
a3bd8447 | 770 | AC_SUBST(FIRMWARE_PATH) |
d8d4bee7 | 771 | AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ]) |
a3bd8447 | 772 | AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"]) |
3e214785 KS |
773 | |
774 | # ------------------------------------------------------------------------------ | |
775 | AC_ARG_ENABLE([gudev], | |
776 | AS_HELP_STRING([--disable-gudev], [disable Gobject libudev support @<:@default=enabled@:>@]), | |
777 | [], [enable_gudev=yes]) | |
de1c301e | 778 | AS_IF([test "x$enable_gudev" = "xyes"], [ PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.22.0 gobject-2.0 >= 2.22.0 gio-2.0]) ]) |
3e214785 | 779 | AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"]) |
de1c301e LP |
780 | AS_IF([test "x$enable_gudev" = "xyes"], [ AC_DEFINE(HAVE_GLIB, 1, [Define if glib is available]) ]) |
781 | ||
3e214785 KS |
782 | # ------------------------------------------------------------------------------ |
783 | AC_ARG_ENABLE([keymap], | |
784 | AS_HELP_STRING([--disable-keymap], [disable keymap fixup support @<:@default=enabled@:>@]), | |
785 | [], [enable_keymap=yes]) | |
786 | AS_IF([test "x$enable_keymap" = "xyes"], [ | |
787 | AC_PATH_PROG([GPERF], [gperf]) | |
788 | if test -z "$GPERF"; then | |
789 | AC_MSG_ERROR([gperf is needed]) | |
790 | fi | |
791 | ||
792 | AC_CHECK_HEADER([linux/input.h], [:], AC_MSG_ERROR([kernel headers not found])) | |
793 | AC_SUBST([INCLUDE_PREFIX], [$(echo '#include <linux/input.h>' | eval $ac_cpp -E - | sed -n '/linux\/input.h/ {s:.*"\(.*\)/linux/input.h".*:\1:; p; q}')]) | |
794 | ]) | |
795 | AM_CONDITIONAL([ENABLE_KEYMAP], [test "x$enable_keymap" = "xyes"]) | |
796 | ||
797 | # ------------------------------------------------------------------------------ | |
75db9a77 | 798 | have_manpages=no |
4c2b0e4e | 799 | AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages])) |
fe1fed02 ZJS |
800 | AS_IF([test "x$enable_manpages" != xno], [ |
801 | AS_IF([test "x$enable_manpages" = xyes -a "x$XSLTPROC" = x], [ | |
802 | AC_MSG_ERROR([*** Manpages requested but xsltproc not found]) | |
803 | ]) | |
804 | AS_IF([test "x$XSLTPROC" != x], [have_manpages=yes]) | |
805 | ]) | |
806 | AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"]) | |
75db9a77 | 807 | |
3e214785 | 808 | # ------------------------------------------------------------------------------ |
d1ab0ca0 | 809 | |
34eff652 LP |
810 | # Location of the init scripts as mandated by LSB |
811 | SYSTEM_SYSVINIT_PATH=/etc/init.d | |
f1dd0c3f | 812 | SYSTEM_SYSVRCND_PATH=/etc/rc.d |
f975e971 | 813 | M4_DEFINES= |
12e84679 | 814 | |
136337ff | 815 | AC_ARG_WITH([sysvinit-path], |
be31376e | 816 | [AS_HELP_STRING([--with-sysvinit-path=PATH], |
bc270841 | 817 | [Specify the path to where the SysV init scripts are located])], |
be31376e KS |
818 | [SYSTEM_SYSVINIT_PATH="$withval"], |
819 | []) | |
136337ff | 820 | |
dee4c244 LP |
821 | AC_ARG_WITH([sysvrcnd-path], |
822 | [AS_HELP_STRING([--with-sysvrcnd-path=PATH], | |
bc270841 | 823 | [Specify the path to the base directory for the SysV rcN.d directories])], |
136337ff TFH |
824 | [SYSTEM_SYSVRCND_PATH="$withval"], |
825 | []) | |
826 | ||
07459bb6 FF |
827 | if test "x${SYSTEM_SYSVINIT_PATH}" != "x" -a "x${SYSTEM_SYSVRCND_PATH}" != "x"; then |
828 | AC_DEFINE(HAVE_SYSV_COMPAT, [], [SysV init scripts and rcN.d links are supported.]) | |
829 | SYSTEM_SYSV_COMPAT="yes" | |
f975e971 | 830 | M4_DEFINES="$M4_DEFINES -DHAVE_SYSV_COMPAT" |
07459bb6 | 831 | elif test "x${SYSTEM_SYSVINIT_PATH}" != "x" -o "x${SYSTEM_SYSVRCND_PATH}" != "x"; then |
dee4c244 | 832 | AC_MSG_ERROR([*** You need both --with-sysvinit-path=PATH and --with-sysvrcnd-path=PATH to enable SysV compatibility support, or both empty to disable it.]) |
07459bb6 FF |
833 | else |
834 | SYSTEM_SYSV_COMPAT="no" | |
835 | fi | |
836 | ||
bc270841 LP |
837 | AC_SUBST(SYSTEM_SYSVINIT_PATH) |
838 | AC_SUBST(SYSTEM_SYSVRCND_PATH) | |
839 | AC_SUBST(M4_DEFINES) | |
840 | ||
841 | AM_CONDITIONAL(HAVE_SYSV_COMPAT, test "$SYSTEM_SYSV_COMPAT" = "yes") | |
842 | ||
bef2733f | 843 | AC_ARG_WITH([tty-gid], |
a05ea46d | 844 | [AS_HELP_STRING([--with-tty-gid=GID], |
bef2733f LP |
845 | [Specify the numeric GID of the 'tty' group])], |
846 | [AC_DEFINE_UNQUOTED(TTY_GID, [$withval], [GID of the 'tty' group])], | |
847 | []) | |
848 | ||
d2d12cd1 LP |
849 | AC_ARG_WITH([dbuspolicydir], |
850 | AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]), | |
851 | [], | |
25ee45f9 | 852 | [with_dbuspolicydir=$($PKG_CONFIG --variable=sysconfdir dbus-1)/dbus-1/system.d]) |
d122948d | 853 | |
d2d12cd1 LP |
854 | AC_ARG_WITH([dbussessionservicedir], |
855 | AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]), | |
856 | [], | |
25ee45f9 | 857 | [with_dbussessionservicedir=$($PKG_CONFIG --variable=session_bus_services_dir dbus-1)]) |
d122948d | 858 | |
d2d12cd1 LP |
859 | AC_ARG_WITH([dbussystemservicedir], |
860 | AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]), | |
861 | [], | |
03c14914 | 862 | [with_dbussystemservicedir=$(readlink -m $($PKG_CONFIG --variable=session_bus_services_dir dbus-1)/../system-services)]) |
d122948d | 863 | |
d2d12cd1 LP |
864 | AC_ARG_WITH([dbusinterfacedir], |
865 | AS_HELP_STRING([--with-dbusinterfacedir=DIR], [D-Bus interface directory]), | |
866 | [], | |
03c14914 | 867 | [with_dbusinterfacedir=$(readlink -m $($PKG_CONFIG --variable=session_bus_services_dir dbus-1)/../interfaces)]) |
d122948d | 868 | |
db059f1b MB |
869 | AC_ARG_WITH([bashcompletiondir], |
870 | AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]), | |
871 | [], | |
25ee45f9 MB |
872 | [AS_IF([$($PKG_CONFIG --exists bash-completion)], [ |
873 | with_bashcompletiondir=$($PKG_CONFIG --variable=completionsdir bash-completion) | |
db059f1b MB |
874 | ] , [ |
875 | with_bashcompletiondir=${datadir}/bash-completion/completions | |
876 | ])]) | |
877 | ||
b8079ae1 KS |
878 | AC_ARG_WITH([rootprefix], |
879 | AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]), | |
39ad55a9 | 880 | [], [with_rootprefix=${ac_default_prefix}]) |
d2d12cd1 | 881 | |
ae446765 KS |
882 | AC_ARG_WITH([rootlibdir], |
883 | AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]), | |
884 | [], | |
885 | [with_rootlibdir=${libdir}]) | |
886 | ||
9d3203b4 | 887 | AC_ARG_WITH([pamlibdir], |
b0cca7d8 | 888 | AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]), |
9d3203b4 KS |
889 | [], |
890 | [with_pamlibdir=${with_rootlibdir}/security]) | |
891 | ||
bc9bdbba MG |
892 | AC_ARG_ENABLE([split-usr], |
893 | AS_HELP_STRING([--enable-split-usr], [Assume that /bin, /sbin aren\'t symlinks into /usr]), | |
894 | [], | |
895 | [AS_IF([test "x${ac_default_prefix}" != "x${with_rootprefix}"], [ | |
896 | enable_split_usr=yes | |
897 | ], [ | |
898 | enable_split_usr=no | |
899 | ])]) | |
900 | ||
901 | AS_IF([test "x${enable_split_usr}" = "xyes"], [ | |
2c6db6fb | 902 | AC_DEFINE(HAVE_SPLIT_USR, 1, [Define if /bin, /sbin aren't symlinks into /usr]) |
bc9bdbba | 903 | ]) |
2c6db6fb | 904 | |
6fc00209 ZJS |
905 | # Work around intltoolize and gtk-doc problems in VPATH builds |
906 | AM_CONDITIONAL([ENABLE_GTK_DOC_TESTS], [test "x$0" = "x./configure"], | |
907 | [Define to do gtk-doc tests]) | |
908 | AS_IF([test "x$0" != "x./configure"], [ | |
909 | AC_SUBST([INTLTOOL_UPDATE], [/bin/true]) | |
910 | ]) | |
911 | ||
cee22bd3 HGB |
912 | AC_ARG_ENABLE(tests, |
913 | [AC_HELP_STRING([--disable-tests], [disable tests])], | |
914 | enable_tests=$enableval, enable_tests=yes) | |
915 | AM_CONDITIONAL(ENABLE_TESTS, [test x$enable_tests = xyes]) | |
916 | ||
d2d12cd1 LP |
917 | AC_SUBST([dbuspolicydir], [$with_dbuspolicydir]) |
918 | AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir]) | |
919 | AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir]) | |
920 | AC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir]) | |
db059f1b | 921 | AC_SUBST([bashcompletiondir], [$with_bashcompletiondir]) |
8c6db833 | 922 | AC_SUBST([pamlibdir], [$with_pamlibdir]) |
b8079ae1 | 923 | AC_SUBST([rootprefix], [$with_rootprefix]) |
ae446765 | 924 | AC_SUBST([rootlibdir], [$with_rootlibdir]) |
8c4a3079 | 925 | |
3e214785 KS |
926 | AC_CONFIG_FILES([ |
927 | Makefile po/Makefile.in | |
bb061708 KS |
928 | docs/libudev/Makefile |
929 | docs/libudev/version.xml | |
930 | docs/gudev/Makefile | |
931 | docs/gudev/version.xml | |
3e214785 KS |
932 | ]) |
933 | ||
a45a909f | 934 | AC_OUTPUT |
ae446765 | 935 | AC_MSG_RESULT([ |
0571e011 LP |
936 | $PACKAGE_NAME $VERSION |
937 | ||
7f4e0805 | 938 | libcryptsetup: ${have_libcryptsetup} |
5b6319dc LP |
939 | tcpwrap: ${have_tcpwrap} |
940 | PAM: ${have_pam} | |
12716238 | 941 | AUDIT: ${have_audit} |
81611586 | 942 | IMA: ${have_ima} |
12716238 | 943 | SELinux: ${have_selinux} |
2b3e18de | 944 | SMACK: ${have_smack} |
807e17f0 | 945 | XZ: ${have_xz} |
5eda94dd | 946 | ACL: ${have_acl} |
fb0951b0 | 947 | XATTR: ${have_xattr} |
7560fffc | 948 | GCRYPT: ${have_gcrypt} |
f6a971bc | 949 | QRENCODE: ${have_qrencode} |
7b17a7d7 | 950 | MICROHTTPD: ${have_microhttpd} |
77e68fa2 | 951 | CHKCONFIG: ${have_chkconfig} |
27669061 | 952 | binfmt: ${have_binfmt} |
e5e83e83 LP |
953 | vconsole: ${have_vconsole} |
954 | readahead: ${have_readahead} | |
83fdc450 | 955 | bootchart: ${have_bootchart} |
4de85612 LP |
956 | quotacheck: ${have_quotacheck} |
957 | randomseed: ${have_randomseed} | |
2a018e83 | 958 | logind: ${have_logind} |
b2e9fb99 | 959 | hostnamed: ${have_hostnamed} |
f47cd184 | 960 | timedated: ${have_timedated} |
4cd1eaa5 | 961 | localed: ${have_localed} |
f5e04665 | 962 | coredump: ${have_coredump} |
46ba8aae | 963 | polkit: ${have_polkit} |
b872e9a0 | 964 | efi: ${have_efi} |
e3043162 | 965 | kmod: ${have_kmod} |
f553b3b1 | 966 | blkid: ${have_blkid} |
d562955e | 967 | nss-myhostname: ${have_myhostname} |
3e214785 KS |
968 | gudev: ${enable_gudev} |
969 | gintrospection: ${enable_introspection} | |
970 | keymap: ${enable_keymap} | |
8d7e170a LP |
971 | Python: ${have_python} |
972 | Python Headers: ${have_python_devel} | |
2f4da3e6 ZJS |
973 | man pages: ${have_manpages} |
974 | gtk-doc: ${enable_gtk_doc} | |
975 | Split /usr: ${enable_split_usr} | |
976 | SysV compatibility: ${SYSTEM_SYSV_COMPAT} | |
3e214785 | 977 | |
8c4a3079 | 978 | prefix: ${prefix} |
b8079ae1 | 979 | rootprefix: ${with_rootprefix} |
3e214785 KS |
980 | sysconf dir: ${sysconfdir} |
981 | datarootdir: ${datarootdir} | |
982 | includedir: ${includedir} | |
983 | include_prefix: ${INCLUDE_PREFIX} | |
ae446765 KS |
984 | lib dir: ${libdir} |
985 | rootlib dir: ${with_rootlibdir} | |
2f4da3e6 ZJS |
986 | SysV init scripts: ${SYSTEM_SYSVINIT_PATH} |
987 | SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH} | |
988 | Build Python: ${PYTHON} | |
989 | Installation Python: ${PYTHON_BINARY} | |
990 | firmware path: ${FIRMWARE_PATH} | |
2c6db6fb | 991 | PAM modules dir: ${with_pamlibdir} |
2c6db6fb LP |
992 | D-Bus policy dir: ${with_dbuspolicydir} |
993 | D-Bus session dir: ${with_dbussessionservicedir} | |
994 | D-Bus system dir: ${with_dbussystemservicedir} | |
995 | D-Bus interfaces dir: ${with_dbusinterfacedir} | |
db059f1b | 996 | Bash completions dir: ${with_bashcompletiondir} |
b1c4ca25 LP |
997 | Extra start script: ${RC_LOCAL_SCRIPT_PATH_START} |
998 | Extra stop script: ${RC_LOCAL_SCRIPT_PATH_STOP} | |
45df1f2c | 999 | Debug shell: ${SUSHELL} @ ${DEBUGTTY} |
66be6554 | 1000 | |
5a45a936 | 1001 | CFLAGS: ${OUR_CFLAGS} ${CFLAGS} |
1f048a6b | 1002 | CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS} |
5a45a936 | 1003 | LDFLAGS: ${OUR_LDFLAGS} ${LDFLAGS} |
568c7e02 ZJS |
1004 | PYTHON_CFLAGS: ${PYTHON_CFLAGS} |
1005 | PYTHON_LIBS: ${PYTHON_LIBS} | |
ae446765 | 1006 | ]) |