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])])
43 SD_CHECK_MAX_INT_SIZE([time_t], [#include <time.h>])
46 LT_INIT([disable-static])
48 # i18n stuff for the PolicyKit policy files
49 IT_PROG_INTLTOOL([0.40.0])
51 GETTEXT_PACKAGE=systemd
52 AC_SUBST(GETTEXT_PACKAGE)
63 AC_PROG_GCC_TRADITIONAL
65 AC_PATH_PROG([M4], [m4])
66 AC_PATH_PROG([XSLTPROC], [xsltproc])
68 AC_PATH_PROG([QUOTAON], [quotaon], [/usr/sbin/quotaon])
69 AC_PATH_PROG([QUOTACHECK], [quotacheck], [/usr/sbin/quotacheck])
71 AC_PATH_PROG([SETCAP], [setcap], [/usr/sbin/setcap])
73 AC_PATH_PROG([KILL], [kill], [/usr/bin/kill])
75 # gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line
76 m4_ifdef([GTK_DOC_CHECK], [
77 GTK_DOC_CHECK([1.18],[--flavour no-tmpl])
78 ], [AM_CONDITIONAL([ENABLE_GTK_DOC], [false])])
80 AS_IF([test "x$enable_gtk_doc" = "xyes" -a "x$XSLTPROC" = x], [
81 AC_MSG_ERROR([*** GTK doc requested but xsltproc not found])
84 m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [
85 GOBJECT_INTROSPECTION_CHECK([1.31.1])
87 AM_CONDITIONAL([HAVE_INTROSPECTION], [false])
88 enable_introspection=no])
90 AC_PATH_TOOL(OBJCOPY, objcopy)
91 AC_PATH_TOOL(STRINGS, strings)
92 AC_PATH_TOOL(GPERF, gperf)
93 if test -z "$GPERF" ; then
94 AC_MSG_ERROR([*** gperf not found])
97 # we use python to build the man page index, and for systemd-python
101 AC_ARG_WITH([python],
102 [AS_HELP_STRING([--without-python], [Disable building the man page index and systemd-python (default: test)])])
104 AS_IF([test "x$with_python" != "xno"], [
105 AM_PATH_PYTHON(,, [:])
106 AS_IF([test "$PYTHON" != :], [have_python=yes])
108 AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
109 AS_IF([test "x$PYTHON_BINARY" = "x"],
110 [AS_IF([test "x$have_python" = "xyes"],
111 [PYTHON_BINARY="`which "$PYTHON"`"],
112 [PYTHON_BINARY=/usr/bin/python])])
113 AC_ARG_VAR(PYTHON_BINARY, [Python binary used to launch installed scripts])
115 AS_IF([test "x$with_python" != "xno"], [
116 AC_PATH_PROG(PYTHON_CONFIG, python${PYTHON_VERSION}-config)
117 AS_IF([test -n "$PYTHON_CONFIG"], [
118 have_python_devel=yes
119 PYTHON_CFLAGS="`$PYTHON_CONFIG --cflags`"
120 PYTHON_LIBS="`$PYTHON_CONFIG --ldflags`"
121 AC_SUBST(PYTHON_CFLAGS)
122 AC_SUBST(PYTHON_LIBS)
125 AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test "$have_python_devel" = "yes"])
127 CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
137 -Wmissing-include-dirs \
138 -Wformat-nonliteral \
139 -Wold-style-definition \
142 -Wdeclaration-after-statement \
144 -Wmissing-prototypes \
145 -Wstrict-prototypes \
147 -Wmissing-declarations \
152 -Wstrict-aliasing=2 \
155 -Wno-overlength-strings \
156 -Wno-unused-parameter \
157 -Wno-missing-field-initializers \
162 -fdiagnostics-show-option \
163 -fno-strict-aliasing \
164 -fvisibility=hidden \
165 -ffunction-sections \
168 --param=ssp-buffer-size=4])
169 AC_SUBST([OUR_CFLAGS], $with_cflags)
171 AS_CASE([$CFLAGS], [*-O[[12345\ ]]*], [
172 CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
173 -Wp,-D_FORTIFY_SOURCE=2])], [
174 AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])])
175 AC_SUBST([OUR_CPPFLAGS], $with_cppflags)
177 CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
182 AC_SUBST([OUR_LDFLAGS], $with_ldflags)
184 AC_SEARCH_LIBS([mq_open], [rt], [], [AC_MSG_ERROR([*** POSIX RT library not found])])
185 AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
189 AC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])])
190 AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
195 AC_CHECK_FUNCS([fanotify_init fanotify_mark])
196 AC_CHECK_FUNCS([__secure_getenv secure_getenv])
197 AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at], [], [], [[#include <sys/types.h>
199 #include <sys/mount.h>
200 #include <fcntl.h>]])
202 # This makes sure pkg.m4 is available.
203 m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
205 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2])
207 # ------------------------------------------------------------------------------
209 AC_ARG_ENABLE(kmod, AS_HELP_STRING([--disable-kmod], [disable loadable modules support]))
210 if test "x$enable_kmod" != "xno"; then
211 PKG_CHECK_MODULES(KMOD, [ libkmod >= 5 ],
212 [AC_DEFINE(HAVE_KMOD, 1, [Define if kmod is available]) have_kmod=yes], have_kmod=no)
213 if test "x$have_kmod" = xno -a "x$enable_kmod" = xyes; then
214 AC_MSG_ERROR([*** kmod support requested but libraries not found])
217 AM_CONDITIONAL(HAVE_KMOD, [test "$have_kmod" = "yes"])
219 # ------------------------------------------------------------------------------
221 AC_ARG_ENABLE(blkid, AS_HELP_STRING([--disable-blkid], [disable blkid support]))
222 if test "x$enable_blkid" != "xno"; then
223 PKG_CHECK_MODULES(BLKID, [ blkid >= 2.20 ],
224 [AC_DEFINE(HAVE_BLKID, 1, [Define if blkid is available]) have_blkid=yes], have_blkid=no)
225 if test "x$have_blkid" = xno -a "x$enable_blkid" = xyes; then
226 AC_MSG_ERROR([*** blkid support requested but libraries not found])
229 AM_CONDITIONAL(HAVE_BLKID, [test "$have_blkid" = "yes"])
231 # ------------------------------------------------------------------------------
233 AC_ARG_ENABLE([ima], AS_HELP_STRING([--disable-ima],[Disable optional IMA support]),
234 [case "${enableval}" in
237 *) AC_MSG_ERROR(bad value ${enableval} for --disable-ima) ;;
241 if test "x${have_ima}" != xno ; then
242 AC_DEFINE(HAVE_IMA, 1, [Define if IMA is available])
245 # ------------------------------------------------------------------------------
247 AC_ARG_ENABLE([chkconfig], AS_HELP_STRING([--disable-chkconfig],[Disable optional chkconfig support]),
248 [case "${enableval}" in
249 yes) have_chkconfig=yes ;;
250 no) have_chkconfig=no ;;
251 *) AC_MSG_ERROR(bad value ${enableval} for --disable-chkconfig) ;;
253 [AC_PATH_PROG(CHKCONFIG, chkconfig)
254 if test -z "$CHKCONFIG"; then
260 if test "x${have_chkconfig}" != xno ; then
261 AC_DEFINE(HAVE_CHKCONFIG, 1, [Define if CHKCONFIG is available])
264 # ------------------------------------------------------------------------------
266 AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
267 if test "x$enable_selinux" != "xno"; then
268 PKG_CHECK_MODULES([SELINUX], [libselinux >= 2.1.9],
269 [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available]) have_selinux=yes], have_selinux=no)
270 if test "x$have_selinux" = xno -a "x$enable_selinux" = xyes; then
271 AC_MSG_ERROR([*** SELinux support requested but libraries not found])
274 AM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"])
275 if test "x${have_selinux}" != xno ; then
276 sushell=/sbin/sushell
282 # ------------------------------------------------------------------------------
284 AC_ARG_ENABLE(xz, AS_HELP_STRING([--disable-xz], [Disable optional XZ support]))
285 if test "x$enable_xz" != "xno"; then
286 PKG_CHECK_MODULES(XZ, [ liblzma ],
287 [AC_DEFINE(HAVE_XZ, 1, [Define if XZ is available]) have_xz=yes], have_xz=no)
288 if test "x$have_xz" = xno -a "x$enable_xz" = xyes; then
289 AC_MSG_ERROR([*** Xz support requested but libraries not found])
292 AM_CONDITIONAL(HAVE_XZ, [test "$have_xz" = "yes"])
294 # ------------------------------------------------------------------------------
295 AC_ARG_ENABLE([tcpwrap],
296 AS_HELP_STRING([--disable-tcpwrap],[Disable optional TCP wrappers support]),
297 [case "${enableval}" in
298 yes) have_tcpwrap=yes ;;
299 no) have_tcpwrap=no ;;
300 *) AC_MSG_ERROR(bad value ${enableval} for --disable-tcpwrap) ;;
304 if test "x${have_tcpwrap}" != xno ; then
306 if test "x${LIBWRAP_LIBS}" = x ; then
307 if test "x$have_tcpwrap" = xyes ; then
308 AC_MSG_ERROR([*** TCP wrappers support not found.])
317 AC_SUBST(LIBWRAP_LIBS)
319 # ------------------------------------------------------------------------------
321 AS_HELP_STRING([--disable-pam],[Disable optional PAM support]),
322 [case "${enableval}" in
325 *) AC_MSG_ERROR(bad value ${enableval} for --disable-pam) ;;
329 if test "x${have_pam}" != xno ; then
331 [security/pam_modules.h security/pam_modutil.h security/pam_ext.h],
333 [if test "x$have_pam" = xyes ; then
334 AC_MSG_ERROR([*** PAM headers not found.])
341 [if test "x$have_pam" = xyes ; then
342 AC_MSG_ERROR([*** libpam not found.])
345 if test "x$have_pam" = xyes ; then
346 PAM_LIBS="-lpam -lpam_misc"
347 AC_DEFINE(HAVE_PAM, 1, [PAM available])
355 AM_CONDITIONAL([HAVE_PAM], [test "x$have_pam" != xno])
357 # ------------------------------------------------------------------------------
359 AS_HELP_STRING([--disable-acl],[Disable optional ACL support]),
360 [case "${enableval}" in
363 *) AC_MSG_ERROR(bad value ${enableval} for --disable-acl) ;;
367 if test "x${have_acl}" != xno ; then
369 [sys/acl.h acl/libacl.h],
371 [if test "x$have_acl" = xyes ; then
372 AC_MSG_ERROR([*** ACL headers not found.])
379 [if test "x$have_acl" = xyes ; then
380 AC_MSG_ERROR([*** libacl not found.])
383 if test "x$have_acl" = xyes ; then
385 AC_DEFINE(HAVE_ACL, 1, [ACL available])
393 AM_CONDITIONAL([HAVE_ACL], [test "x$have_acl" != xno])
395 # ------------------------------------------------------------------------------
396 AC_ARG_ENABLE([xattr],
397 AS_HELP_STRING([--disable-xattr],[Disable optional XATTR support]),
398 [case "${enableval}" in
399 yes) have_xattr=yes ;;
401 *) AC_MSG_ERROR(bad value ${enableval} for --disable-xattr) ;;
405 if test "x${have_xattr}" != xno ; then
409 [if test "x$have_xattr" = xyes ; then
410 AC_MSG_ERROR([*** XATTR headers not found.])
417 [if test "x$have_xattr" = xyes ; then
418 AC_MSG_ERROR([*** libattr not found.])
421 if test "x$have_xattr" = xyes ; then
423 AC_DEFINE(HAVE_XATTR, 1, [XATTR available])
431 AM_CONDITIONAL([HAVE_XATTR], [test "x$have_xattr" != xno])
433 # ------------------------------------------------------------------------------
434 AC_ARG_ENABLE([gcrypt],
435 AS_HELP_STRING([--disable-gcrypt],[Disable optional GCRYPT support]),
436 [case "${enableval}" in
437 yes) have_gcrypt=yes ;;
438 no) have_gcrypt=no ;;
439 *) AC_MSG_ERROR(bad value ${enableval} for --disable-gcrypt) ;;
443 if test "x${have_gcrypt}" != xno ; then
447 [if test "x$have_gcrypt" = xyes ; then
448 AC_MSG_ERROR([*** GCRYPT headers not found.])
451 if test "x$have_gcrypt" = xyes ; then
452 GCRYPT_LIBS="$LIBGCRYPT_LIBS"
453 GCRYPT_CFLAGS="$LIBGCRYPT_CFLAGS"
454 AC_DEFINE(HAVE_GCRYPT, 1, [GCRYPT available])
462 AC_SUBST(GCRYPT_LIBS)
463 AC_SUBST(GCRYPT_CFLAGS)
464 AM_CONDITIONAL([HAVE_GCRYPT], [test "x$have_gcrypt" != xno])
466 # ------------------------------------------------------------------------------
467 AC_ARG_ENABLE([audit],
468 AS_HELP_STRING([--disable-audit],[Disable optional AUDIT support]),
469 [case "${enableval}" in
470 yes) have_audit=yes ;;
472 *) AC_MSG_ERROR(bad value ${enableval} for --disable-audit) ;;
476 if test "x${have_audit}" != xno ; then
480 [if test "x$have_audit" = xyes ; then
481 AC_MSG_ERROR([*** AUDIT headers not found.])
488 [if test "x$have_audit" = xyes ; then
489 AC_MSG_ERROR([*** libaudit not found.])
492 if test "x$have_audit" = xyes ; then
494 AC_DEFINE(HAVE_AUDIT, 1, [AUDIT available])
503 # ------------------------------------------------------------------------------
504 have_libcryptsetup=no
505 AC_ARG_ENABLE(libcryptsetup, AS_HELP_STRING([--disable-libcryptsetup], [disable libcryptsetup tools]))
506 if test "x$enable_libcryptsetup" != "xno"; then
507 PKG_CHECK_MODULES(LIBCRYPTSETUP, [ libcryptsetup >= 1.4.2 ],
508 [AC_DEFINE(HAVE_LIBCRYPTSETUP, 1, [Define if libcryptsetup is available]) have_libcryptsetup=yes], have_libcryptsetup=no)
509 if test "x$have_libcryptsetup" = xno -a "x$enable_libcryptsetup" = xyes; then
510 AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found])
513 AM_CONDITIONAL(HAVE_LIBCRYPTSETUP, [test "$have_libcryptsetup" = "yes"])
515 # ------------------------------------------------------------------------------
517 AC_ARG_ENABLE(qrencode, AS_HELP_STRING([--disable-qrencode], [disable qrencode support]))
518 if test "x$enable_qrencode" != "xno"; then
519 PKG_CHECK_MODULES(QRENCODE, [ libqrencode ],
520 [AC_DEFINE(HAVE_QRENCODE, 1, [Define if qrencode is available]) have_qrencode=yes], have_qrencode=no)
521 if test "x$have_qrencode" = xno -a "x$enable_qrencode" = xyes; then
522 AC_MSG_ERROR([*** qrencode support requested but libraries not found])
525 AM_CONDITIONAL(HAVE_QRENCODE, [test "$have_qrencode" = "yes"])
527 # ------------------------------------------------------------------------------
529 AC_ARG_ENABLE(microhttpd, AS_HELP_STRING([--disable-microhttpd], [disable microhttpd support]))
530 if test "x$enable_microhttpd" != "xno"; then
531 PKG_CHECK_MODULES(MICROHTTPD, [libmicrohttpd >= 0.9.5],
532 [AC_DEFINE(HAVE_MICROHTTPD, 1, [Define if microhttpd is available]) have_microhttpd=yes], have_microhttpd=no)
533 if test "x$have_microhttpd" = xno -a "x$enable_microhttpd" = xyes; then
534 AC_MSG_ERROR([*** microhttpd support requested but libraries not found])
537 AM_CONDITIONAL(HAVE_MICROHTTPD, [test "$have_microhttpd" = "yes"])
539 # ------------------------------------------------------------------------------
541 AC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool]))
542 if test "x$enable_binfmt" != "xno"; then
545 AM_CONDITIONAL(ENABLE_BINFMT, [test "$have_binfmt" = "yes"])
547 # ------------------------------------------------------------------------------
549 AC_ARG_ENABLE(vconsole, AS_HELP_STRING([--disable-vconsole], [disable vconsole tool]))
550 if test "x$enable_vconsole" != "xno"; then
553 AM_CONDITIONAL(ENABLE_VCONSOLE, [test "$have_vconsole" = "yes"])
555 # ------------------------------------------------------------------------------
557 AC_ARG_ENABLE(readahead, AS_HELP_STRING([--disable-readahead], [disable readahead tools]))
558 if test "x$enable_readahead" != "xno"; then
561 AM_CONDITIONAL(ENABLE_READAHEAD, [test "$have_readahead" = "yes"])
563 # ------------------------------------------------------------------------------
565 AC_ARG_ENABLE(bootchart, AS_HELP_STRING([--disable-bootchart], [disable bootchart tool]))
566 if test "x$enable_bootchart" != "xno"; then
569 AM_CONDITIONAL(ENABLE_BOOTCHART, [test "$have_bootchart" = "yes"])
571 # ------------------------------------------------------------------------------
573 AC_ARG_ENABLE(quotacheck, AS_HELP_STRING([--disable-quotacheck], [disable quotacheck tools]))
574 if test "x$enable_quotacheck" != "xno"; then
577 AM_CONDITIONAL(ENABLE_QUOTACHECK, [test "$have_quotacheck" = "yes"])
579 # ------------------------------------------------------------------------------
581 AC_ARG_ENABLE(randomseed, AS_HELP_STRING([--disable-randomseed], [disable randomseed tools]))
582 if test "x$enable_randomseed" != "xno"; then
585 AM_CONDITIONAL(ENABLE_RANDOMSEED, [test "$have_randomseed" = "yes"])
587 # ------------------------------------------------------------------------------
589 AC_ARG_ENABLE(logind, AS_HELP_STRING([--disable-logind], [disable login daemon]))
590 if test "x$enable_logind" != "xno"; then
593 AM_CONDITIONAL(ENABLE_LOGIND, [test "$have_logind" = "yes"])
594 AS_IF([test "$have_logind" = "yes"], [ AC_DEFINE(HAVE_LOGIND, [1], [Logind support available]) ])
596 # ------------------------------------------------------------------------------
598 AC_ARG_ENABLE(hostnamed, AS_HELP_STRING([--disable-hostnamed], [disable hostname daemon]))
599 if test "x$enable_hostnamed" != "xno"; then
602 AM_CONDITIONAL(ENABLE_HOSTNAMED, [test "$have_hostnamed" = "yes"])
604 # ------------------------------------------------------------------------------
606 AC_ARG_ENABLE(timedated, AS_HELP_STRING([--disable-timedated], [disable timedate daemon]))
607 if test "x$enable_timedated" != "xno"; then
610 AM_CONDITIONAL(ENABLE_TIMEDATED, [test "$have_timedated" = "yes"])
612 # ------------------------------------------------------------------------------
614 AC_ARG_ENABLE(localed, AS_HELP_STRING([--disable-localed], [disable locale daemon]))
615 if test "x$enable_localed" != "xno"; then
618 AM_CONDITIONAL(ENABLE_LOCALED, [test "$have_localed" = "yes"])
620 # ------------------------------------------------------------------------------
622 AC_ARG_ENABLE(coredump, AS_HELP_STRING([--disable-coredump], [disable coredump hook]))
623 if test "x$enable_coredump" != "xno"; then
626 AM_CONDITIONAL(ENABLE_COREDUMP, [test "$have_coredump" = "yes"])
628 # ------------------------------------------------------------------------------
629 AC_ARG_WITH(rc-local-script-path-start,
630 AS_HELP_STRING([--with-rc-local-script-path-start=PATH],
631 [Path to /etc/rc.local]),
632 [RC_LOCAL_SCRIPT_PATH_START="$withval"],
633 [RC_LOCAL_SCRIPT_PATH_START="/etc/rc.local"])
635 AC_ARG_WITH(rc-local-script-path-stop,
636 AS_HELP_STRING([--with-rc-local-script-path-stop=PATH],
637 [Path to /usr/sbin/halt.local]),
638 [RC_LOCAL_SCRIPT_PATH_STOP="$withval"],
639 [RC_LOCAL_SCRIPT_PATH_STOP="/usr/sbin/halt.local"])
641 AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_START, ["$RC_LOCAL_SCRIPT_PATH_START"], [Path of /etc/rc.local script])
642 AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_STOP, ["$RC_LOCAL_SCRIPT_PATH_STOP"], [Path of /usr/sbin/halt.local script])
644 AC_SUBST(RC_LOCAL_SCRIPT_PATH_START)
645 AC_SUBST(RC_LOCAL_SCRIPT_PATH_STOP)
647 # ------------------------------------------------------------------------------
648 AC_ARG_WITH(kbd-loadkeys,
649 AS_HELP_STRING([--with-kbd-loadkeys=PATH],
651 [KBD_LOADKEYS="$withval"],
652 [KBD_LOADKEYS="/usr/bin/loadkeys"])
654 AC_ARG_WITH(kbd-setfont,
655 AS_HELP_STRING([--with-kbd-setfont=PATH],
657 [KBD_SETFONT="$withval"],
658 [KBD_SETFONT="/usr/bin/setfont"])
660 AC_DEFINE_UNQUOTED(KBD_LOADKEYS, ["$KBD_LOADKEYS"], [Path of loadkeys])
661 AC_DEFINE_UNQUOTED(KBD_SETFONT, ["$KBD_SETFONT"], [Path of setfont])
663 AC_SUBST(KBD_LOADKEYS)
664 AC_SUBST(KBD_SETFONT)
666 # ------------------------------------------------------------------------------
668 AC_ARG_ENABLE(myhostname, AS_HELP_STRING([--disable-myhostname], [disable nss-myhostname support]))
669 if test "x$enable_myhostname" != "xno"; then
671 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])
678 AC_FUNC_SELECT_ARGTYPES
679 AC_CHECK_FUNCS([gethostbyaddr gethostbyname gettimeofday inet_ntoa memset select socket strcspn strdup strerror strncasecmp strcasecmp strspn])
683 AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"])
685 # ------------------------------------------------------------------------------
686 AC_ARG_WITH(firmware-path,
687 AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]],
688 [Firmware search path (default=ROOTPREFIX/lib/firmware/updates:ROOTPREFIX/lib/firmware)]),
689 [], [with_firmware_path="$rootprefix/lib/firmware/updates:$rootprefix/lib/firmware"])
692 for i in $with_firmware_path; do
693 if test "x${FIRMWARE_PATH}" = "x"; then
694 FIRMWARE_PATH="\\\"${i}/\\\""
696 FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\""
700 AC_SUBST([FIRMWARE_PATH], [$FIRMWARE_PATH])
702 # ------------------------------------------------------------------------------
703 AC_ARG_ENABLE([gudev],
704 AS_HELP_STRING([--disable-gudev], [disable Gobject libudev support @<:@default=enabled@:>@]),
705 [], [enable_gudev=yes])
706 AS_IF([test "x$enable_gudev" = "xyes"], [ PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.22.0 gobject-2.0 >= 2.22.0]) ])
707 AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"])
709 # ------------------------------------------------------------------------------
710 AC_ARG_ENABLE([keymap],
711 AS_HELP_STRING([--disable-keymap], [disable keymap fixup support @<:@default=enabled@:>@]),
712 [], [enable_keymap=yes])
713 AS_IF([test "x$enable_keymap" = "xyes"], [
714 AC_PATH_PROG([GPERF], [gperf])
715 if test -z "$GPERF"; then
716 AC_MSG_ERROR([gperf is needed])
719 AC_CHECK_HEADER([linux/input.h], [:], AC_MSG_ERROR([kernel headers not found]))
720 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}')])
722 AM_CONDITIONAL([ENABLE_KEYMAP], [test "x$enable_keymap" = "xyes"])
724 # ------------------------------------------------------------------------------
726 AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages]))
727 AS_IF([test "x$enable_manpages" != xno], [
728 AS_IF([test "x$enable_manpages" = xyes -a "x$XSLTPROC" = x], [
729 AC_MSG_ERROR([*** Manpages requested but xsltproc not found])
731 AS_IF([test "x$XSLTPROC" != x], [have_manpages=yes])
733 AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
735 # ------------------------------------------------------------------------------
737 # Location of the init scripts as mandated by LSB
738 SYSTEM_SYSVINIT_PATH=/etc/init.d
739 SYSTEM_SYSVRCND_PATH=/etc/rc.d
742 AC_ARG_WITH([sysvinit-path],
743 [AS_HELP_STRING([--with-sysvinit-path=PATH],
744 [Specify the path to where the SysV init scripts are located])],
745 [SYSTEM_SYSVINIT_PATH="$withval"],
748 AC_ARG_WITH([sysvrcnd-path],
749 [AS_HELP_STRING([--with-sysvrcnd-path=PATH],
750 [Specify the path to the base directory for the SysV rcN.d directories])],
751 [SYSTEM_SYSVRCND_PATH="$withval"],
754 if test "x${SYSTEM_SYSVINIT_PATH}" != "x" -a "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
755 AC_DEFINE(HAVE_SYSV_COMPAT, [], [SysV init scripts and rcN.d links are supported.])
756 SYSTEM_SYSV_COMPAT="yes"
757 M4_DEFINES="$M4_DEFINES -DHAVE_SYSV_COMPAT"
758 elif test "x${SYSTEM_SYSVINIT_PATH}" != "x" -o "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
759 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.])
761 SYSTEM_SYSV_COMPAT="no"
764 AC_SUBST(SYSTEM_SYSVINIT_PATH)
765 AC_SUBST(SYSTEM_SYSVRCND_PATH)
768 AM_CONDITIONAL(HAVE_SYSV_COMPAT, test "$SYSTEM_SYSV_COMPAT" = "yes")
770 AC_ARG_WITH([tty-gid],
771 [AS_HELP_STRING([--with-tty-gid=GID],
772 [Specify the numeric GID of the 'tty' group])],
773 [AC_DEFINE_UNQUOTED(TTY_GID, [$withval], [GID of the 'tty' group])],
776 AC_ARG_WITH([dbuspolicydir],
777 AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
779 [with_dbuspolicydir=`pkg-config --variable=sysconfdir dbus-1`/dbus-1/system.d])
781 AC_ARG_WITH([dbussessionservicedir],
782 AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]),
784 [with_dbussessionservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`])
786 AC_ARG_WITH([dbussystemservicedir],
787 AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]),
789 [with_dbussystemservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../system-services])
791 AC_ARG_WITH([dbusinterfacedir],
792 AS_HELP_STRING([--with-dbusinterfacedir=DIR], [D-Bus interface directory]),
794 [with_dbusinterfacedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../interfaces])
796 AC_ARG_WITH([rootprefix],
797 AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
798 [], [with_rootprefix=${ac_default_prefix}])
800 AC_ARG_WITH([rootlibdir],
801 AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]),
803 [with_rootlibdir=${libdir}])
805 AC_ARG_WITH([pamlibdir],
806 AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
808 [with_pamlibdir=${with_rootlibdir}/security])
810 AC_ARG_ENABLE([split-usr],
811 AS_HELP_STRING([--enable-split-usr], [Assume that /bin, /sbin aren\'t symlinks into /usr]),
813 [AS_IF([test "x${ac_default_prefix}" != "x${with_rootprefix}"], [
819 AS_IF([test "x${enable_split_usr}" = "xyes"], [
820 AC_DEFINE(HAVE_SPLIT_USR, 1, [Define if /bin, /sbin aren't symlinks into /usr])
823 AC_SUBST([dbuspolicydir], [$with_dbuspolicydir])
824 AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir])
825 AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
826 AC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir])
827 AC_SUBST([pamlibdir], [$with_pamlibdir])
828 AC_SUBST([rootprefix], [$with_rootprefix])
829 AC_SUBST([rootlibdir], [$with_rootlibdir])
832 Makefile po/Makefile.in
833 docs/libudev/Makefile
834 docs/libudev/version.xml
836 docs/gudev/version.xml
841 $PACKAGE_NAME $VERSION
843 libcryptsetup: ${have_libcryptsetup}
844 tcpwrap: ${have_tcpwrap}
848 SELinux: ${have_selinux}
852 GCRYPT: ${have_gcrypt}
853 QRENCODE: ${have_qrencode}
854 MICROHTTPD: ${have_microhttpd}
855 CHKCONFIG: ${have_chkconfig}
856 binfmt: ${have_binfmt}
857 vconsole: ${have_vconsole}
858 readahead: ${have_readahead}
859 bootchart: ${have_bootchart}
860 quotacheck: ${have_quotacheck}
861 randomseed: ${have_randomseed}
862 logind: ${have_logind}
863 hostnamed: ${have_hostnamed}
864 timedated: ${have_timedated}
865 localed: ${have_localed}
866 coredump: ${have_coredump}
869 nss-myhostname: ${have_myhostname}
870 gudev: ${enable_gudev}
871 gintrospection: ${enable_introspection}
872 keymap: ${enable_keymap}
873 Python: ${have_python}
874 Python Headers: ${have_python_devel}
875 man pages: ${have_manpages}
876 gtk-doc: ${enable_gtk_doc}
877 Split /usr: ${enable_split_usr}
878 SysV compatibility: ${SYSTEM_SYSV_COMPAT}
881 rootprefix: ${with_rootprefix}
882 sysconf dir: ${sysconfdir}
883 datarootdir: ${datarootdir}
884 includedir: ${includedir}
885 include_prefix: ${INCLUDE_PREFIX}
887 rootlib dir: ${with_rootlibdir}
888 SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
889 SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
890 Build Python: ${PYTHON}
891 Installation Python: ${PYTHON_BINARY}
892 firmware path: ${FIRMWARE_PATH}
893 PAM modules dir: ${with_pamlibdir}
894 D-Bus policy dir: ${with_dbuspolicydir}
895 D-Bus session dir: ${with_dbussessionservicedir}
896 D-Bus system dir: ${with_dbussystemservicedir}
897 D-Bus interfaces dir: ${with_dbusinterfacedir}
898 Extra start script: ${RC_LOCAL_SCRIPT_PATH_START}
899 Extra stop script: ${RC_LOCAL_SCRIPT_PATH_STOP}
901 CFLAGS: ${OUR_CFLAGS} ${CFLAGS}
902 CPPLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS}
903 LDFLAGS: ${OUR_LDFLAGS} ${LDFLAGS}
904 PYTHON_CFLAGS: ${PYTHON_CFLAGS}
905 PYTHON_LIBS: ${PYTHON_LIBS}