2 # This file is part of systemd.
4 # Copyright 2010-2012 Lennart Poettering
5 # Copyright 2010-2012 Kay Sievers
7 # systemd is free software; you can redistribute it and/or modify it
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
10 # (at your option) any later version.
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
15 # Lesser General Public License for more details.
17 # You should have received a copy of the GNU Lesser General Public License
18 # along with systemd; If not, see <http://www.gnu.org/licenses/>.
24 [http://bugs.freedesktop.org/enter_bug.cgi?product=systemd],
26 [http://www.freedesktop.org/wiki/Software/systemd])
28 AC_CONFIG_SRCDIR([src/core/main.c])
29 AC_CONFIG_MACRO_DIR([m4])
30 AC_CONFIG_HEADERS([config.h])
31 AC_CONFIG_AUX_DIR([build-aux])
33 AC_USE_SYSTEM_EXTENSIONS
35 AC_PREFIX_DEFAULT([/usr])
36 AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects check-news])
37 AM_SILENT_RULES([yes])
39 AC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.])
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])])
45 LT_INIT([disable-static])
47 AS_IF([test "x$enable_static" = "xyes"], [AC_MSG_ERROR([--enable-static is not supported by systemd])])
48 AS_IF([test "x$enable_largefile" = "xno"], [AC_MSG_ERROR([--disable-largefile is not supported by systemd])])
50 # i18n stuff for the PolicyKit policy files
51 IT_PROG_INTLTOOL([0.40.0])
53 GETTEXT_PACKAGE=systemd
54 AC_SUBST(GETTEXT_PACKAGE)
65 AC_PROG_GCC_TRADITIONAL
67 AC_PATH_PROG([M4], [m4])
68 AC_PATH_PROG([XSLTPROC], [xsltproc])
70 AC_PATH_PROG([QUOTAON], [quotaon], [/usr/sbin/quotaon])
71 AC_PATH_PROG([QUOTACHECK], [quotacheck], [/usr/sbin/quotacheck])
73 AC_PATH_PROG([SETCAP], [setcap], [/usr/sbin/setcap])
75 AC_PATH_PROG([KILL], [kill], [/usr/bin/kill])
77 # gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line
78 m4_ifdef([GTK_DOC_CHECK], [
79 GTK_DOC_CHECK([1.18],[--flavour no-tmpl])],
80 [AM_CONDITIONAL([ENABLE_GTK_DOC], [false])
83 AS_IF([test "x$enable_gtk_doc" = "xyes" -a "x$XSLTPROC" = x], [
84 AC_MSG_ERROR([*** GTK doc requested but xsltproc not found])
87 m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [
88 GOBJECT_INTROSPECTION_CHECK([1.31.1])
90 AM_CONDITIONAL([HAVE_INTROSPECTION], [false])
91 enable_introspection=no])
93 AC_CHECK_TOOL(OBJCOPY, objcopy)
94 AC_CHECK_TOOL(STRINGS, strings)
95 AC_CHECK_TOOL(GPERF, gperf)
96 if test -z "$GPERF" ; then
97 AC_MSG_ERROR([*** gperf not found])
100 CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
106 "-Wformat=2 -Wformat-security -Wformat-nonliteral" \
109 -Wmissing-include-dirs \
110 -Wold-style-definition \
113 -Wdeclaration-after-statement \
115 -Wmissing-prototypes \
116 -Wstrict-prototypes \
118 -Wmissing-declarations \
123 -Wstrict-aliasing=2 \
126 -Wno-overlength-strings \
127 -Wno-unused-parameter \
128 -Wno-missing-field-initializers \
133 -fdiagnostics-show-option \
134 -fdiagnostics-color \
135 -fno-strict-aliasing \
136 -fvisibility=hidden \
137 -ffunction-sections \
140 --param=ssp-buffer-size=4])
141 AC_SUBST([OUR_CFLAGS], $with_cflags)
143 AS_CASE([$CFLAGS], [*-O[[12345g\ ]]*], [
144 CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
145 -Wp,-D_FORTIFY_SOURCE=2])], [
146 python_extra_cflags=-Wp,-U_FORTIFY_SOURCE
147 AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])])
148 AC_SUBST([OUR_CPPFLAGS], $with_cppflags)
150 CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
156 AC_SUBST([OUR_LDFLAGS], $with_ldflags)
158 # ------------------------------------------------------------------------------
159 # we use python to build the man page index, and for systemd-python
163 AC_ARG_WITH([python],
164 [AS_HELP_STRING([--without-python], [Disable building the man page index and systemd-python (default: test)])])
166 AS_IF([test "x$with_python" != "xno"], [
167 AM_PATH_PYTHON(,, [:])
168 AS_IF([test "$PYTHON" != :], [have_python=yes])
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"],
173 [PYTHON_BINARY="$(which "$PYTHON")"],
174 [PYTHON_BINARY=/usr/bin/python])])
175 AC_ARG_VAR(PYTHON_BINARY, [Python binary used to launch installed scripts])
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
181 PYTHON_CFLAGS="$($PYTHON_CONFIG --cflags) $python_extra_cflags"
182 PYTHON_LIBS="$($PYTHON_CONFIG --ldflags)"
183 AC_SUBST(PYTHON_CFLAGS)
184 AC_SUBST(PYTHON_LIBS)
185 AC_PATH_PROGS(SPHINX_BUILD, sphinx-build-${PYTHON_VERSION} sphinx-build)
188 AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test "$have_python_devel" = "yes"])
190 # ------------------------------------------------------------------------------
192 AC_SEARCH_LIBS([mq_open], [rt], [], [AC_MSG_ERROR([*** POSIX RT library not found])])
193 AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
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])])
203 AC_CHECK_FUNCS([fanotify_init fanotify_mark])
204 AC_CHECK_FUNCS([__secure_getenv secure_getenv])
205 AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at], [], [], [[#include <sys/types.h>
207 #include <sys/mount.h>
208 #include <fcntl.h>]])
210 # This makes sure pkg.m4 is available.
211 m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
213 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2])
215 # ------------------------------------------------------------------------------
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])
225 AM_CONDITIONAL(HAVE_KMOD, [test "$have_kmod" = "yes"])
227 # ------------------------------------------------------------------------------
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])
237 AM_CONDITIONAL(HAVE_BLKID, [test "$have_blkid" = "yes"])
239 # ------------------------------------------------------------------------------
241 AC_ARG_ENABLE([ima], AS_HELP_STRING([--disable-ima],[Disable optional IMA support]),
242 [case "${enableval}" in
245 *) AC_MSG_ERROR(bad value ${enableval} for --disable-ima) ;;
249 if test "x${have_ima}" != xno ; then
250 AC_DEFINE(HAVE_IMA, 1, [Define if IMA is available])
253 # ------------------------------------------------------------------------------
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) ;;
261 [AC_PATH_PROG(CHKCONFIG, chkconfig)
262 if test -z "$CHKCONFIG"; then
268 if test "x${have_chkconfig}" != xno ; then
269 AC_DEFINE(HAVE_CHKCONFIG, 1, [Define if CHKCONFIG is available])
272 # ------------------------------------------------------------------------------
274 AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
275 if test "x$enable_selinux" != "xno"; then
276 PKG_CHECK_MODULES([SELINUX], [libselinux >= 2.1.9],
277 [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available]) have_selinux=yes], have_selinux=no)
278 if test "x$have_selinux" = xno -a "x$enable_selinux" = xyes; then
279 AC_MSG_ERROR([*** SELinux support requested but libraries not found])
282 AM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"])
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"])])
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])
300 # ------------------------------------------------------------------------------
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)
306 if test "x$have_xz" = xno -a "x$enable_xz" = xyes; then
307 AC_MSG_ERROR([*** Xz support requested but libraries not found])
310 AM_CONDITIONAL(HAVE_XZ, [test "$have_xz" = "yes"])
312 # ------------------------------------------------------------------------------
313 AC_ARG_ENABLE([tcpwrap],
314 AS_HELP_STRING([--disable-tcpwrap],[Disable optional TCP wrappers support]),
315 [case "${enableval}" in
316 yes) have_tcpwrap=yes ;;
317 no) have_tcpwrap=no ;;
318 *) AC_MSG_ERROR(bad value ${enableval} for --disable-tcpwrap) ;;
322 if test "x${have_tcpwrap}" != xno ; then
324 if test "x${LIBWRAP_LIBS}" = x ; then
325 if test "x$have_tcpwrap" = xyes ; then
326 AC_MSG_ERROR([*** TCP wrappers support not found.])
335 AC_SUBST(LIBWRAP_LIBS)
337 # ------------------------------------------------------------------------------
339 AS_HELP_STRING([--disable-pam],[Disable optional PAM support]),
340 [case "${enableval}" in
343 *) AC_MSG_ERROR(bad value ${enableval} for --disable-pam) ;;
347 if test "x${have_pam}" != xno ; then
349 [security/pam_modules.h security/pam_modutil.h security/pam_ext.h],
351 [if test "x$have_pam" = xyes ; then
352 AC_MSG_ERROR([*** PAM headers not found.])
359 [if test "x$have_pam" = xyes ; then
360 AC_MSG_ERROR([*** libpam not found.])
363 if test "x$have_pam" = xyes ; then
364 PAM_LIBS="-lpam -lpam_misc"
365 AC_DEFINE(HAVE_PAM, 1, [PAM available])
373 AM_CONDITIONAL([HAVE_PAM], [test "x$have_pam" != xno])
375 # ------------------------------------------------------------------------------
377 AS_HELP_STRING([--disable-acl],[Disable optional ACL support]),
378 [case "${enableval}" in
381 *) AC_MSG_ERROR(bad value ${enableval} for --disable-acl) ;;
385 if test "x${have_acl}" != xno ; then
387 [sys/acl.h acl/libacl.h],
389 [if test "x$have_acl" = xyes ; then
390 AC_MSG_ERROR([*** ACL headers not found.])
397 [if test "x$have_acl" = xyes ; then
398 AC_MSG_ERROR([*** libacl not found.])
401 if test "x$have_acl" = xyes ; then
403 AC_DEFINE(HAVE_ACL, 1, [ACL available])
411 AM_CONDITIONAL([HAVE_ACL], [test "x$have_acl" != xno])
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 ;;
419 *) AC_MSG_ERROR(bad value ${enableval} for --disable-xattr) ;;
423 if test "x${have_xattr}" != xno ; then
427 [if test "x$have_xattr" = xyes ; then
428 AC_MSG_ERROR([*** XATTR headers not found.])
435 [if test "x$have_xattr" = xyes ; then
436 AC_MSG_ERROR([*** libattr not found.])
439 if test "x$have_xattr" = xyes ; then
441 AC_DEFINE(HAVE_XATTR, 1, [XATTR available])
449 AM_CONDITIONAL([HAVE_XATTR], [test "x$have_xattr" != xno])
451 # ------------------------------------------------------------------------------
452 AC_ARG_ENABLE([smack], AS_HELP_STRING([--disable-smack],[Disable optional SMACK support]),
453 [case "${enableval}" in
454 yes) have_smack=yes ;;
456 *) AC_MSG_ERROR(bad value ${enableval} for --disable-smack) ;;
460 if test "x${have_xattr}" = xno; then
461 if test "x${have_smack}" = xyes; then
462 AC_MSG_ERROR(SMACK requires xattr support)
467 if test "x${have_smack}" = xauto; then
472 if test "x${have_smack}" = xyes ; then
473 AC_DEFINE(HAVE_SMACK, 1, [Define if SMACK is available])
476 # ------------------------------------------------------------------------------
477 AC_ARG_ENABLE([gcrypt],
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) ;;
486 if test "x${have_gcrypt}" != xno ; then
490 [if test "x$have_gcrypt" = xyes ; then
491 AC_MSG_ERROR([*** GCRYPT headers not found.])
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])
505 AC_SUBST(GCRYPT_LIBS)
506 AC_SUBST(GCRYPT_CFLAGS)
507 AM_CONDITIONAL([HAVE_GCRYPT], [test "x$have_gcrypt" != xno])
509 # ------------------------------------------------------------------------------
510 AC_ARG_ENABLE([audit],
511 AS_HELP_STRING([--disable-audit],[Disable optional AUDIT support]),
512 [case "${enableval}" in
513 yes) have_audit=yes ;;
515 *) AC_MSG_ERROR(bad value ${enableval} for --disable-audit) ;;
519 if test "x${have_audit}" != xno ; then
523 [if test "x$have_audit" = xyes ; then
524 AC_MSG_ERROR([*** AUDIT headers not found.])
531 [if test "x$have_audit" = xyes ; then
532 AC_MSG_ERROR([*** libaudit not found.])
535 if test "x$have_audit" = xyes ; then
537 AC_DEFINE(HAVE_AUDIT, 1, [AUDIT available])
546 # ------------------------------------------------------------------------------
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
550 PKG_CHECK_MODULES(LIBCRYPTSETUP, [ libcryptsetup >= 1.4.2 ],
551 [AC_DEFINE(HAVE_LIBCRYPTSETUP, 1, [Define if libcryptsetup is available]) have_libcryptsetup=yes], have_libcryptsetup=no)
552 if test "x$have_libcryptsetup" = xno -a "x$enable_libcryptsetup" = xyes; then
553 AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found])
556 AM_CONDITIONAL(HAVE_LIBCRYPTSETUP, [test "$have_libcryptsetup" = "yes"])
558 # ------------------------------------------------------------------------------
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])
568 AM_CONDITIONAL(HAVE_QRENCODE, [test "$have_qrencode" = "yes"])
570 # ------------------------------------------------------------------------------
572 AC_ARG_ENABLE(microhttpd, AS_HELP_STRING([--disable-microhttpd], [disable microhttpd support]))
573 if test "x$enable_microhttpd" != "xno"; then
574 PKG_CHECK_MODULES(MICROHTTPD, [libmicrohttpd >= 0.9.5],
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])
580 AM_CONDITIONAL(HAVE_MICROHTTPD, [test "$have_microhttpd" = "yes"])
582 # ------------------------------------------------------------------------------
584 AC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool]))
585 if test "x$enable_binfmt" != "xno"; then
588 AM_CONDITIONAL(ENABLE_BINFMT, [test "$have_binfmt" = "yes"])
590 # ------------------------------------------------------------------------------
592 AC_ARG_ENABLE(vconsole, AS_HELP_STRING([--disable-vconsole], [disable vconsole tool]))
593 if test "x$enable_vconsole" != "xno"; then
596 AM_CONDITIONAL(ENABLE_VCONSOLE, [test "$have_vconsole" = "yes"])
598 # ------------------------------------------------------------------------------
600 AC_ARG_ENABLE(readahead, AS_HELP_STRING([--disable-readahead], [disable readahead tools]))
601 if test "x$enable_readahead" != "xno"; then
604 AM_CONDITIONAL(ENABLE_READAHEAD, [test "$have_readahead" = "yes"])
606 # ------------------------------------------------------------------------------
608 AC_ARG_ENABLE(bootchart, AS_HELP_STRING([--disable-bootchart], [disable bootchart tool]))
609 if test "x$enable_bootchart" != "xno"; then
612 AM_CONDITIONAL(ENABLE_BOOTCHART, [test "$have_bootchart" = "yes"])
614 # ------------------------------------------------------------------------------
616 AC_ARG_ENABLE(quotacheck, AS_HELP_STRING([--disable-quotacheck], [disable quotacheck tools]))
617 if test "x$enable_quotacheck" != "xno"; then
620 AM_CONDITIONAL(ENABLE_QUOTACHECK, [test "$have_quotacheck" = "yes"])
622 # ------------------------------------------------------------------------------
624 AC_ARG_ENABLE(tmpfiles, AS_HELP_STRING([--disable-tmpfiles], [disable tmpfiles support]))
625 if test "x$enable_tmpfiles" != "xno"; then
628 AM_CONDITIONAL(ENABLE_TMPFILES, [test "$have_tmpfiles" = "yes"])
630 # ------------------------------------------------------------------------------
632 AC_ARG_ENABLE(randomseed, AS_HELP_STRING([--disable-randomseed], [disable randomseed tools]))
633 if test "x$enable_randomseed" != "xno"; then
636 AM_CONDITIONAL(ENABLE_RANDOMSEED, [test "$have_randomseed" = "yes"])
638 # ------------------------------------------------------------------------------
640 AC_ARG_ENABLE(logind, AS_HELP_STRING([--disable-logind], [disable login daemon]))
641 if test "x$enable_logind" != "xno"; then
644 AM_CONDITIONAL(ENABLE_LOGIND, [test "$have_logind" = "yes"])
645 AS_IF([test "$have_logind" = "yes"], [ AC_DEFINE(HAVE_LOGIND, [1], [Logind support available]) ])
647 # ------------------------------------------------------------------------------
649 AC_ARG_ENABLE(hostnamed, AS_HELP_STRING([--disable-hostnamed], [disable hostname daemon]))
650 if test "x$enable_hostnamed" != "xno"; then
653 AM_CONDITIONAL(ENABLE_HOSTNAMED, [test "$have_hostnamed" = "yes"])
655 # ------------------------------------------------------------------------------
657 AC_ARG_ENABLE(timedated, AS_HELP_STRING([--disable-timedated], [disable timedate daemon]))
658 if test "x$enable_timedated" != "xno"; then
661 AM_CONDITIONAL(ENABLE_TIMEDATED, [test "$have_timedated" = "yes"])
663 # ------------------------------------------------------------------------------
665 AC_ARG_ENABLE(localed, AS_HELP_STRING([--disable-localed], [disable locale daemon]))
666 if test "x$enable_localed" != "xno"; then
669 AM_CONDITIONAL(ENABLE_LOCALED, [test "$have_localed" = "yes"])
671 # ------------------------------------------------------------------------------
673 AC_ARG_ENABLE(coredump, AS_HELP_STRING([--disable-coredump], [disable coredump hook]))
674 if test "x$enable_coredump" != "xno"; then
677 AM_CONDITIONAL(ENABLE_COREDUMP, [test "$have_coredump" = "yes"])
679 # ------------------------------------------------------------------------------
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])
686 AM_CONDITIONAL(ENABLE_POLKIT, [test "x$have_polkit" = "xyes"])
688 # ------------------------------------------------------------------------------
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])
695 AM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"])
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"])
704 AC_ARG_WITH(rc-local-script-path-stop,
705 AS_HELP_STRING([--with-rc-local-script-path-stop=PATH],
706 [Path to /usr/sbin/halt.local]),
707 [RC_LOCAL_SCRIPT_PATH_STOP="$withval"],
708 [RC_LOCAL_SCRIPT_PATH_STOP="/usr/sbin/halt.local"])
710 AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_START, ["$RC_LOCAL_SCRIPT_PATH_START"], [Path of /etc/rc.local script])
711 AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_STOP, ["$RC_LOCAL_SCRIPT_PATH_STOP"], [Path of /usr/sbin/halt.local script])
713 AC_SUBST(RC_LOCAL_SCRIPT_PATH_START)
714 AC_SUBST(RC_LOCAL_SCRIPT_PATH_STOP)
716 # ------------------------------------------------------------------------------
717 AC_ARG_WITH(kbd-loadkeys,
718 AS_HELP_STRING([--with-kbd-loadkeys=PATH],
720 [KBD_LOADKEYS="$withval"],
721 [KBD_LOADKEYS="/usr/bin/loadkeys"])
723 AC_ARG_WITH(kbd-setfont,
724 AS_HELP_STRING([--with-kbd-setfont=PATH],
726 [KBD_SETFONT="$withval"],
727 [KBD_SETFONT="/usr/bin/setfont"])
729 AC_DEFINE_UNQUOTED(KBD_LOADKEYS, ["$KBD_LOADKEYS"], [Path of loadkeys])
730 AC_DEFINE_UNQUOTED(KBD_SETFONT, ["$KBD_SETFONT"], [Path of setfont])
732 AC_SUBST(KBD_LOADKEYS)
733 AC_SUBST(KBD_SETFONT)
736 AS_HELP_STRING([--with-telinit=PATH],
738 [TELINIT="$withval"],
739 [TELINIT="/lib/upstart/telinit"])
741 AC_DEFINE_UNQUOTED(TELINIT, ["$TELINIT"], [Path to telinit])
745 AC_CHECK_HEADERS_ONCE([valgrind/memcheck.h])
747 # ------------------------------------------------------------------------------
749 AC_ARG_ENABLE(myhostname, AS_HELP_STRING([--disable-myhostname], [disable nss-myhostname support]))
750 if test "x$enable_myhostname" != "xno"; then
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])
759 AC_FUNC_SELECT_ARGTYPES
760 AC_CHECK_FUNCS([gethostbyaddr gethostbyname gettimeofday inet_ntoa memset select socket strcspn strdup strerror strncasecmp strcasecmp strspn])
764 AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"])
766 # ------------------------------------------------------------------------------
767 AC_ARG_WITH(firmware-path,
768 AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]],
769 [Firmware search path (default="")]),
770 [], [with_firmware_path=""])
773 for i in $with_firmware_path; do
774 if test "x${FIRMWARE_PATH}" = "x"; then
775 FIRMWARE_PATH="\\\"${i}/\\\""
777 FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\""
781 AC_SUBST(FIRMWARE_PATH)
782 AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ])
783 AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"])
785 # ------------------------------------------------------------------------------
786 AC_ARG_ENABLE([gudev],
787 AS_HELP_STRING([--disable-gudev], [disable Gobject libudev support @<:@default=enabled@:>@]),
788 [], [enable_gudev=yes])
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]) ])
790 AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"])
791 AS_IF([test "x$enable_gudev" = "xyes"], [ AC_DEFINE(HAVE_GLIB, 1, [Define if glib is available]) ])
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])
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}')])
806 AM_CONDITIONAL([ENABLE_KEYMAP], [test "x$enable_keymap" = "xyes"])
808 # ------------------------------------------------------------------------------
810 AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages]))
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])
815 AS_IF([test "x$XSLTPROC" != x], [have_manpages=yes])
817 AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
819 # ------------------------------------------------------------------------------
821 # Location of the init scripts as mandated by LSB
822 SYSTEM_SYSVINIT_PATH=/etc/init.d
823 SYSTEM_SYSVRCND_PATH=/etc/rc.d
826 AC_ARG_WITH([sysvinit-path],
827 [AS_HELP_STRING([--with-sysvinit-path=PATH],
828 [Specify the path to where the SysV init scripts are located])],
829 [SYSTEM_SYSVINIT_PATH="$withval"],
832 AC_ARG_WITH([sysvrcnd-path],
833 [AS_HELP_STRING([--with-sysvrcnd-path=PATH],
834 [Specify the path to the base directory for the SysV rcN.d directories])],
835 [SYSTEM_SYSVRCND_PATH="$withval"],
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"
841 M4_DEFINES="$M4_DEFINES -DHAVE_SYSV_COMPAT"
842 elif test "x${SYSTEM_SYSVINIT_PATH}" != "x" -o "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
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.])
845 SYSTEM_SYSV_COMPAT="no"
848 AC_SUBST(SYSTEM_SYSVINIT_PATH)
849 AC_SUBST(SYSTEM_SYSVRCND_PATH)
852 AM_CONDITIONAL(HAVE_SYSV_COMPAT, test "$SYSTEM_SYSV_COMPAT" = "yes")
854 AC_ARG_WITH([tty-gid],
855 [AS_HELP_STRING([--with-tty-gid=GID],
856 [Specify the numeric GID of the 'tty' group])],
857 [AC_DEFINE_UNQUOTED(TTY_GID, [$withval], [GID of the 'tty' group])],
860 AC_ARG_WITH([dbuspolicydir],
861 AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
863 [with_dbuspolicydir=$($PKG_CONFIG --variable=sysconfdir dbus-1)/dbus-1/system.d])
865 AC_ARG_WITH([dbussessionservicedir],
866 AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]),
868 [with_dbussessionservicedir=$($PKG_CONFIG --variable=session_bus_services_dir dbus-1)])
870 AC_ARG_WITH([dbussystemservicedir],
871 AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]),
873 [with_dbussystemservicedir=$(readlink -m $($PKG_CONFIG --variable=session_bus_services_dir dbus-1)/../system-services)])
875 AC_ARG_WITH([dbusinterfacedir],
876 AS_HELP_STRING([--with-dbusinterfacedir=DIR], [D-Bus interface directory]),
878 [with_dbusinterfacedir=$(readlink -m $($PKG_CONFIG --variable=session_bus_services_dir dbus-1)/../interfaces)])
880 AC_ARG_WITH([bashcompletiondir],
881 AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]),
883 [AS_IF([$($PKG_CONFIG --exists bash-completion)], [
884 with_bashcompletiondir=$($PKG_CONFIG --variable=completionsdir bash-completion)
886 with_bashcompletiondir=${datadir}/bash-completion/completions
889 AC_ARG_WITH([rootprefix],
890 AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
891 [], [with_rootprefix=${ac_default_prefix}])
893 AC_ARG_WITH([rootlibdir],
894 AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]),
896 [with_rootlibdir=${libdir}])
898 AC_ARG_WITH([pamlibdir],
899 AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
901 [with_pamlibdir=${with_rootlibdir}/security])
903 AC_ARG_ENABLE([split-usr],
904 AS_HELP_STRING([--enable-split-usr], [Assume that /bin, /sbin aren\'t symlinks into /usr]),
906 [AS_IF([test "x${ac_default_prefix}" != "x${with_rootprefix}"], [
912 AS_IF([test "x${enable_split_usr}" = "xyes"], [
913 AC_DEFINE(HAVE_SPLIT_USR, 1, [Define if /bin, /sbin aren't symlinks into /usr])
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])
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])
928 AC_SUBST([dbuspolicydir], [$with_dbuspolicydir])
929 AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir])
930 AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
931 AC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir])
932 AC_SUBST([bashcompletiondir], [$with_bashcompletiondir])
933 AC_SUBST([pamlibdir], [$with_pamlibdir])
934 AC_SUBST([rootprefix], [$with_rootprefix])
935 AC_SUBST([rootlibdir], [$with_rootlibdir])
938 Makefile po/Makefile.in
939 docs/libudev/Makefile
940 docs/libudev/version.xml
942 docs/gudev/version.xml
947 $PACKAGE_NAME $VERSION
949 libcryptsetup: ${have_libcryptsetup}
950 tcpwrap: ${have_tcpwrap}
954 SELinux: ${have_selinux}
959 GCRYPT: ${have_gcrypt}
960 QRENCODE: ${have_qrencode}
961 MICROHTTPD: ${have_microhttpd}
962 CHKCONFIG: ${have_chkconfig}
963 binfmt: ${have_binfmt}
964 vconsole: ${have_vconsole}
965 readahead: ${have_readahead}
966 bootchart: ${have_bootchart}
967 quotacheck: ${have_quotacheck}
968 tmpfiles: ${have_tmpfiles}
969 randomseed: ${have_randomseed}
970 logind: ${have_logind}
971 hostnamed: ${have_hostnamed}
972 timedated: ${have_timedated}
973 localed: ${have_localed}
974 coredump: ${have_coredump}
975 polkit: ${have_polkit}
979 nss-myhostname: ${have_myhostname}
980 gudev: ${enable_gudev}
981 gintrospection: ${enable_introspection}
982 keymap: ${enable_keymap}
983 Python: ${have_python}
984 Python Headers: ${have_python_devel}
985 man pages: ${have_manpages}
986 gtk-doc: ${enable_gtk_doc}
987 Split /usr: ${enable_split_usr}
988 SysV compatibility: ${SYSTEM_SYSV_COMPAT}
991 rootprefix: ${with_rootprefix}
992 sysconf dir: ${sysconfdir}
993 datarootdir: ${datarootdir}
994 includedir: ${includedir}
995 include_prefix: ${INCLUDE_PREFIX}
997 rootlib dir: ${with_rootlibdir}
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}
1003 PAM modules dir: ${with_pamlibdir}
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}
1008 Bash completions dir: ${with_bashcompletiondir}
1009 Extra start script: ${RC_LOCAL_SCRIPT_PATH_START}
1010 Extra stop script: ${RC_LOCAL_SCRIPT_PATH_STOP}
1011 Debug shell: ${SUSHELL} @ ${DEBUGTTY}
1013 CFLAGS: ${OUR_CFLAGS} ${CFLAGS}
1014 CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS}
1015 LDFLAGS: ${OUR_LDFLAGS} ${LDFLAGS}
1016 PYTHON_CFLAGS: ${PYTHON_CFLAGS}
1017 PYTHON_LIBS: ${PYTHON_LIBS}