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