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])])
47 # i18n stuff for the PolicyKit policy files
48 IT_PROG_INTLTOOL([0.40.0])
50 GETTEXT_PACKAGE=systemd
51 AC_SUBST(GETTEXT_PACKAGE)
62 AC_PROG_GCC_TRADITIONAL
64 AC_PATH_PROG([M4], [m4])
65 AC_PATH_PROG([XSLTPROC], [xsltproc])
67 AC_PATH_PROG([QUOTAON], [quotaon], [/sbin/quotaon])
68 AC_PATH_PROG([QUOTACHECK], [quotacheck], [/sbin/quotacheck])
70 # gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line
71 m4_ifdef([GTK_DOC_CHECK], [
72 GTK_DOC_CHECK([1.18],[--flavour no-tmpl])
73 ], [AM_CONDITIONAL([ENABLE_GTK_DOC], [false])])
75 AS_IF([test "x$enable_gtk_doc" = "xyes" -a "x$XSLTPROC" = x], [
76 AC_MSG_ERROR([*** GTK doc requested but xsltproc not found])
79 m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [
80 GOBJECT_INTROSPECTION_CHECK([1.31.1])
81 ], [AM_CONDITIONAL([HAVE_INTROSPECTION], [false])])
83 AC_PATH_TOOL(OBJCOPY, objcopy)
84 AC_PATH_TOOL(STRINGS, strings)
85 AC_PATH_TOOL(GPERF, gperf)
86 if test -z "$GPERF" ; then
87 AC_MSG_ERROR([*** gperf not found])
90 # we use python to build the man page index, and for systemd-python
93 AM_PATH_PYTHON(,, [:])
94 if test "$PYTHON" != : ; then
96 AC_PATH_PROG([PYTHON_CONFIG], python-config)
98 if test -n "$PYTHON_CONFIG" ; then
100 PYTHON_CFLAGS="`$PYTHON_CONFIG --cflags`"
101 PYTHON_LIBS="`$PYTHON_CONFIG --libs`"
102 AC_SUBST(PYTHON_CFLAGS)
103 AC_SUBST(PYTHON_LIBS)
106 AM_CONDITIONAL([HAVE_PYTHON], [test "$have_python" = "yes"])
107 AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test "$have_python_devel" = "yes"])
109 CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
119 -Wmissing-include-dirs \
120 -Wformat-nonliteral \
121 -Wold-style-definition \
124 -Wdeclaration-after-statement \
126 -Wmissing-prototypes \
127 -Wstrict-prototypes \
129 -Wmissing-declarations \
134 -Wstrict-aliasing=2 \
137 -Wno-overlength-strings \
138 -Wno-unused-parameter \
139 -Wno-missing-field-initializers \
144 -fdiagnostics-show-option \
145 -fno-strict-aliasing \
146 -fvisibility=hidden \
147 -ffunction-sections \
150 --param=ssp-buffer-size=4])
151 AC_SUBST([OUR_CFLAGS], $with_cflags)
153 CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
154 -Wp,-D_FORTIFY_SOURCE=2])
155 AC_SUBST([OUR_CPPFLAGS], $with_cppflags)
157 CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
162 AC_SUBST([OUR_LDFLAGS], $with_ldflags)
164 AC_SEARCH_LIBS([clock_gettime], [rt], [], [AC_MSG_ERROR([*** POSIX RT library not found])])
165 AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
169 AC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])])
170 AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
175 AC_CHECK_FUNCS([fanotify_init fanotify_mark name_to_handle_at])
176 AC_CHECK_FUNCS([__secure_getenv secure_getenv])
177 AC_CHECK_DECLS([gettid, pivot_root], [], [], [[#include <sys/types.h>
179 #include <sys/mount.h>]])
181 # This makes sure pkg.m4 is available.
182 m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
184 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2])
185 PKG_CHECK_MODULES(KMOD, [libkmod >= 5])
186 PKG_CHECK_MODULES(BLKID,[blkid >= 2.20])
188 # ------------------------------------------------------------------------------
190 AC_ARG_ENABLE([ima], AS_HELP_STRING([--disable-ima],[Disable optional IMA support]),
191 [case "${enableval}" in
194 *) AC_MSG_ERROR(bad value ${enableval} for --disable-ima) ;;
198 if test "x${have_ima}" != xno ; then
199 AC_DEFINE(HAVE_IMA, 1, [Define if IMA is available])
202 # ------------------------------------------------------------------------------
204 AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
205 if test "x$enable_selinux" != "xno"; then
206 PKG_CHECK_MODULES(SELINUX, [ libselinux ],
207 [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available]) have_selinux=yes], have_selinux=no)
208 if test "x$have_selinux" = xno -a "x$enable_selinux" = xyes; then
209 AC_MSG_ERROR([*** SELinux support requested but libraries not found])
212 AM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"])
213 if test "x${have_selinux}" != xno ; then
214 sushell=/sbin/sushell
220 # ------------------------------------------------------------------------------
222 AC_ARG_ENABLE(xz, AS_HELP_STRING([--disable-xz], [Disable optional XZ support]))
223 if test "x$enable_xz" != "xno"; then
224 PKG_CHECK_MODULES(XZ, [ liblzma ],
225 [AC_DEFINE(HAVE_XZ, 1, [Define if XZ is available]) have_xz=yes], have_xz=no)
226 if test "x$have_xz" = xno -a "x$enable_xz" = xyes; then
227 AC_MSG_ERROR([*** Xz support requested but libraries not found])
230 AM_CONDITIONAL(HAVE_XZ, [test "$have_xz" = "yes"])
232 # ------------------------------------------------------------------------------
233 AC_ARG_ENABLE([tcpwrap],
234 AS_HELP_STRING([--disable-tcpwrap],[Disable optional TCP wrappers support]),
235 [case "${enableval}" in
236 yes) have_tcpwrap=yes ;;
237 no) have_tcpwrap=no ;;
238 *) AC_MSG_ERROR(bad value ${enableval} for --disable-tcpwrap) ;;
242 if test "x${have_tcpwrap}" != xno ; then
244 if test "x${LIBWRAP_LIBS}" = x ; then
245 if test "x$have_tcpwrap" = xyes ; then
246 AC_MSG_ERROR([*** TCP wrappers support not found.])
255 AC_SUBST(LIBWRAP_LIBS)
257 # ------------------------------------------------------------------------------
259 AS_HELP_STRING([--disable-pam],[Disable optional PAM support]),
260 [case "${enableval}" in
263 *) AC_MSG_ERROR(bad value ${enableval} for --disable-pam) ;;
267 if test "x${have_pam}" != xno ; then
269 [security/pam_modules.h security/pam_modutil.h security/pam_ext.h],
271 [if test "x$have_pam" = xyes ; then
272 AC_MSG_ERROR([*** PAM headers not found.])
279 [if test "x$have_pam" = xyes ; then
280 AC_MSG_ERROR([*** libpam not found.])
283 if test "x$have_pam" = xyes ; then
284 PAM_LIBS="-lpam -lpam_misc"
285 AC_DEFINE(HAVE_PAM, 1, [PAM available])
293 AM_CONDITIONAL([HAVE_PAM], [test "x$have_pam" != xno])
295 # ------------------------------------------------------------------------------
297 AS_HELP_STRING([--disable-acl],[Disable optional ACL support]),
298 [case "${enableval}" in
301 *) AC_MSG_ERROR(bad value ${enableval} for --disable-acl) ;;
305 if test "x${have_acl}" != xno ; then
307 [sys/acl.h acl/libacl.h],
309 [if test "x$have_acl" = xyes ; then
310 AC_MSG_ERROR([*** ACL headers not found.])
317 [if test "x$have_acl" = xyes ; then
318 AC_MSG_ERROR([*** libacl not found.])
321 if test "x$have_acl" = xyes ; then
323 AC_DEFINE(HAVE_ACL, 1, [ACL available])
331 AM_CONDITIONAL([HAVE_ACL], [test "x$have_acl" != xno])
333 # ------------------------------------------------------------------------------
334 AC_ARG_ENABLE([gcrypt],
335 AS_HELP_STRING([--disable-gcrypt],[Disable optional GCRYPT support]),
336 [case "${enableval}" in
337 yes) have_gcrypt=yes ;;
338 no) have_gcrypt=no ;;
339 *) AC_MSG_ERROR(bad value ${enableval} for --disable-gcrypt) ;;
343 if test "x${have_gcrypt}" != xno ; then
347 [if test "x$have_gcrypt" = xyes ; then
348 AC_MSG_ERROR([*** GCRYPT headers not found.])
351 if test "x$have_gcrypt" = xyes ; then
352 GCRYPT_LIBS="$LIBGCRYPT_LIBS"
353 GCRYPT_CFLAGS="$LIBGCRYPT_CFLAGS"
354 AC_DEFINE(HAVE_GCRYPT, 1, [GCRYPT available])
362 AC_SUBST(GCRYPT_LIBS)
363 AC_SUBST(GCRYPT_CFLAGS)
364 AM_CONDITIONAL([HAVE_GCRYPT], [test "x$have_gcrypt" != xno])
366 # ------------------------------------------------------------------------------
367 AC_ARG_ENABLE([audit],
368 AS_HELP_STRING([--disable-audit],[Disable optional AUDIT support]),
369 [case "${enableval}" in
370 yes) have_audit=yes ;;
372 *) AC_MSG_ERROR(bad value ${enableval} for --disable-audit) ;;
376 if test "x${have_audit}" != xno ; then
380 [if test "x$have_audit" = xyes ; then
381 AC_MSG_ERROR([*** AUDIT headers not found.])
388 [if test "x$have_audit" = xyes ; then
389 AC_MSG_ERROR([*** libaudit not found.])
392 if test "x$have_audit" = xyes ; then
394 AC_DEFINE(HAVE_AUDIT, 1, [AUDIT available])
403 # ------------------------------------------------------------------------------
404 have_libcryptsetup=no
405 AC_ARG_ENABLE(libcryptsetup, AS_HELP_STRING([--disable-libcryptsetup], [disable libcryptsetup tools]))
406 if test "x$enable_libcryptsetup" != "xno"; then
407 PKG_CHECK_MODULES(LIBCRYPTSETUP, [ libcryptsetup >= 1.4.2 ],
408 [AC_DEFINE(HAVE_LIBCRYPTSETUP, 1, [Define if libcryptsetup is available]) have_libcryptsetup=yes], have_libcryptsetup=no)
409 if test "x$have_libcryptsetup" = xno -a "x$enable_libcryptsetup" = xyes; then
410 AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found])
413 AM_CONDITIONAL(HAVE_LIBCRYPTSETUP, [test "$have_libcryptsetup" = "yes"])
415 # ------------------------------------------------------------------------------
417 AC_ARG_ENABLE(qrencode, AS_HELP_STRING([--disable-qrencode], [disable qrencode support]))
418 if test "x$enable_qrencode" != "xno"; then
419 PKG_CHECK_MODULES(QRENCODE, [ libqrencode ],
420 [AC_DEFINE(HAVE_QRENCODE, 1, [Define if qrencode is available]) have_qrencode=yes], have_qrencode=no)
421 if test "x$have_qrencode" = xno -a "x$enable_qrencode" = xyes; then
422 AC_MSG_ERROR([*** qrencode support requested but libraries not found])
425 AM_CONDITIONAL(HAVE_QRENCODE, [test "$have_qrencode" = "yes"])
427 # ------------------------------------------------------------------------------
429 AC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool]))
430 if test "x$enable_binfmt" != "xno"; then
433 AM_CONDITIONAL(ENABLE_BINFMT, [test "$have_binfmt" = "yes"])
435 # ------------------------------------------------------------------------------
437 AC_ARG_ENABLE(vconsole, AS_HELP_STRING([--disable-vconsole], [disable vconsole tool]))
438 if test "x$enable_vconsole" != "xno"; then
441 AM_CONDITIONAL(ENABLE_VCONSOLE, [test "$have_vconsole" = "yes"])
443 # ------------------------------------------------------------------------------
445 AC_ARG_ENABLE(readahead, AS_HELP_STRING([--disable-readahead], [disable readahead tools]))
446 if test "x$enable_readahead" != "xno"; then
449 AM_CONDITIONAL(ENABLE_READAHEAD, [test "$have_readahead" = "yes"])
451 # ------------------------------------------------------------------------------
453 AC_ARG_ENABLE(quotacheck, AS_HELP_STRING([--disable-quotacheck], [disable quotacheck tools]))
454 if test "x$enable_quotacheck" != "xno"; then
457 AM_CONDITIONAL(ENABLE_QUOTACHECK, [test "$have_quotacheck" = "yes"])
459 # ------------------------------------------------------------------------------
461 AC_ARG_ENABLE(randomseed, AS_HELP_STRING([--disable-randomseed], [disable randomseed tools]))
462 if test "x$enable_randomseed" != "xno"; then
465 AM_CONDITIONAL(ENABLE_RANDOMSEED, [test "$have_randomseed" = "yes"])
467 # ------------------------------------------------------------------------------
469 AC_ARG_ENABLE(logind, AS_HELP_STRING([--disable-logind], [disable login daemon]))
470 if test "x$enable_logind" != "xno"; then
473 AM_CONDITIONAL(ENABLE_LOGIND, [test "$have_logind" = "yes"])
474 AS_IF([test "$have_logind" = "yes"], [ AC_DEFINE(HAVE_LOGIND, [1], [Logind support available]) ])
476 # ------------------------------------------------------------------------------
478 AC_ARG_ENABLE(hostnamed, AS_HELP_STRING([--disable-hostnamed], [disable hostname daemon]))
479 if test "x$enable_hostnamed" != "xno"; then
482 AM_CONDITIONAL(ENABLE_HOSTNAMED, [test "$have_hostnamed" = "yes"])
484 # ------------------------------------------------------------------------------
486 AC_ARG_ENABLE(timedated, AS_HELP_STRING([--disable-timedated], [disable timedate daemon]))
487 if test "x$enable_timedated" != "xno"; then
490 AM_CONDITIONAL(ENABLE_TIMEDATED, [test "$have_timedated" = "yes"])
492 # ------------------------------------------------------------------------------
494 AC_ARG_ENABLE(localed, AS_HELP_STRING([--disable-localed], [disable locale daemon]))
495 if test "x$enable_localed" != "xno"; then
498 AM_CONDITIONAL(ENABLE_LOCALED, [test "$have_localed" = "yes"])
500 # ------------------------------------------------------------------------------
502 AC_ARG_ENABLE(coredump, AS_HELP_STRING([--disable-coredump], [disable coredump hook]))
503 if test "x$enable_coredump" != "xno"; then
506 AM_CONDITIONAL(ENABLE_COREDUMP, [test "$have_coredump" = "yes"])
508 # ------------------------------------------------------------------------------
509 AC_ARG_WITH(usb-ids-path,
510 [AS_HELP_STRING([--with-usb-ids-path=DIR], [Path to usb.ids file])],
511 [USB_DATABASE=${withval}],
512 [if test -n "$usbids" ; then
513 USB_DATABASE="$usbids"
515 PKG_CHECK_MODULES(USBUTILS, usbutils >= 0.82)
516 AC_SUBST([USB_DATABASE], [$($PKG_CONFIG --variable=usbids usbutils)])
518 AC_MSG_CHECKING([for USB database location])
519 AC_MSG_RESULT([$USB_DATABASE])
520 AC_SUBST(USB_DATABASE)
522 AC_ARG_WITH(pci-ids-path,
523 [AS_HELP_STRING([--with-pci-ids-path=DIR], [Path to pci.ids file])],
524 [PCI_DATABASE=${withval}],
525 [if test -n "$pciids" ; then
526 PCI_DATABASE="$pciids"
528 PKG_CHECK_MODULES(LIBPCI, libpci >= 3)
529 AC_SUBST([PCI_DATABASE], [$($PKG_CONFIG --variable=idsdir libpci)/pci.ids])
531 AC_MSG_CHECKING([for PCI database location])
532 AC_MSG_RESULT([$PCI_DATABASE])
533 AC_SUBST(PCI_DATABASE)
535 # ------------------------------------------------------------------------------
536 AC_ARG_WITH(firmware-path,
537 AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]],
538 [Firmware search path (default=ROOTPREFIX/lib/firmware/updates:ROOTPREFIX/lib/firmware)]),
539 [], [with_firmware_path="$rootprefix/lib/firmware/updates:$rootprefix/lib/firmware"])
542 for i in $with_firmware_path; do
543 if test "x${FIRMWARE_PATH}" = "x"; then
544 FIRMWARE_PATH="\\\"${i}/\\\""
546 FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\""
550 AC_SUBST([FIRMWARE_PATH], [$FIRMWARE_PATH])
552 # ------------------------------------------------------------------------------
553 AC_ARG_ENABLE([gudev],
554 AS_HELP_STRING([--disable-gudev], [disable Gobject libudev support @<:@default=enabled@:>@]),
555 [], [enable_gudev=yes])
556 AS_IF([test "x$enable_gudev" = "xyes"], [ PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.22.0 gobject-2.0 >= 2.22.0]) ])
557 AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"])
559 # ------------------------------------------------------------------------------
560 AC_ARG_ENABLE([keymap],
561 AS_HELP_STRING([--disable-keymap], [disable keymap fixup support @<:@default=enabled@:>@]),
562 [], [enable_keymap=yes])
563 AS_IF([test "x$enable_keymap" = "xyes"], [
564 AC_PATH_PROG([GPERF], [gperf])
565 if test -z "$GPERF"; then
566 AC_MSG_ERROR([gperf is needed])
569 AC_CHECK_HEADER([linux/input.h], [:], AC_MSG_ERROR([kernel headers not found]))
570 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}')])
572 AM_CONDITIONAL([ENABLE_KEYMAP], [test "x$enable_keymap" = "xyes"])
574 # ------------------------------------------------------------------------------
576 AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages]))
577 AS_IF([test "x$enable_manpages" != xno], [
578 AS_IF([test "x$enable_manpages" = xyes -a "x$XSLTPROC" = x], [
579 AC_MSG_ERROR([*** Manpages requested but xsltproc not found])
581 AS_IF([test "x$XSLTPROC" != x], [have_manpages=yes])
583 AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
585 # ------------------------------------------------------------------------------
587 AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of fedora, suse, debian, ubuntu, arch, gentoo, slackware, altlinux, mandriva, mageia, angstrom or other]))
588 if test "z$with_distro" = "z"; then
589 if test "$cross_compiling" = yes; then
590 AC_MSG_WARN([Target distribution cannot be reliably detected when cross-compiling. You should specify it with --with-distro (see $0 --help for recognized distros)])
592 with_distro=$($GREP '^ID=' /etc/os-release 2>/dev/null | $SED 's/ID=//');
594 if test "z$with_distro" = "z"; then
598 with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' `
599 AC_DEFINE_UNQUOTED(DISTRIBUTION, ["${with_distro}"], [Target Distribution])
601 # Location of the init scripts as mandated by LSB
602 SYSTEM_SYSVINIT_PATH=/etc/init.d
603 SYSTEM_SYSVRCND_PATH=/etc/rc.d
609 SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
610 AC_DEFINE(TARGET_FEDORA, [], [Target is Fedora/RHEL])
611 M4_DEFINES=-DTARGET_FEDORA=1
614 SYSTEM_SYSVRCND_PATH=/etc/init.d
615 AC_DEFINE(TARGET_SUSE, [], [Target is openSUSE/SLE])
616 M4_DEFINES=-DTARGET_SUSE=1
619 SYSTEM_SYSVRCND_PATH=/etc
620 AC_DEFINE(TARGET_DEBIAN, [], [Target is Debian])
621 M4_DEFINES=-DTARGET_DEBIAN=1
624 SYSTEM_SYSVRCND_PATH=/etc
625 AC_DEFINE(TARGET_UBUNTU, [], [Target is Ubuntu])
626 M4_DEFINES=-DTARGET_UBUNTU=1
629 SYSTEM_SYSVINIT_PATH=
630 SYSTEM_SYSVRCND_PATH=
631 AC_DEFINE(TARGET_ARCH, [], [Target is ArchLinux])
632 M4_DEFINES=-DTARGET_ARCH=1
635 SYSTEM_SYSVINIT_PATH=
636 SYSTEM_SYSVRCND_PATH=
637 AC_DEFINE(TARGET_GENTOO, [], [Target is Gentoo])
638 M4_DEFINES=-DTARGET_GENTOO=1
641 SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
642 AC_DEFINE(TARGET_SLACKWARE, [], [Target is Slackware])
643 M4_DEFINES=-DTARGET_SLACKWARE=1
646 SYSTEM_SYSVINIT_PATH=/etc/rc.d
647 AC_DEFINE(TARGET_FRUGALWARE, [], [Target is Frugalware])
648 M4_DEFINES=-DTARGET_FRUGALWARE=1
651 SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
652 AC_DEFINE(TARGET_ALTLINUX, [], [Target is ALTLinux])
653 M4_DEFINES=-DTARGET_ALTLINUX=1
656 SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
657 AC_DEFINE(TARGET_MANDRIVA, [], [Target is Mandriva])
658 M4_DEFINES=-DTARGET_MANDRIVA=1
661 SYSTEM_SYSVRCND_PATH=/etc
662 AC_DEFINE(TARGET_ANGSTROM, [], [Target is Ångström])
663 M4_DEFINES=-DTARGET_ANGSTROM=1
666 SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
667 AC_DEFINE(TARGET_MAGEIA, [], [Target is Mageia])
668 M4_DEFINES=-DTARGET_MAGEIA=1
673 AC_MSG_ERROR([Your distribution (${with_distro}) is not yet supported, SysV init scripts could not be found! (patches welcome); you can specify --with-distro=other to skip this check])
677 AC_ARG_WITH([sysvinit-path],
678 [AS_HELP_STRING([--with-sysvinit-path=PATH],
679 [Specify the path to where the SysV init scripts are located @<:@default=based on distro@:>@])],
680 [SYSTEM_SYSVINIT_PATH="$withval"],
683 AC_ARG_WITH([sysvrcd-path],
684 [AS_HELP_STRING([--with-sysvrcd-path=PATH],
685 [Specify the path to the base directory for the SysV rcN.d directories @<:@default=based on distro@:>@])],
686 [SYSTEM_SYSVRCND_PATH="$withval"],
689 AC_SUBST(SYSTEM_SYSVINIT_PATH)
690 AC_SUBST(SYSTEM_SYSVRCND_PATH)
693 if test "x${SYSTEM_SYSVINIT_PATH}" != "x" -a "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
694 AC_DEFINE(HAVE_SYSV_COMPAT, [], [SysV init scripts and rcN.d links are supported.])
695 SYSTEM_SYSV_COMPAT="yes"
696 M4_DEFINES="$M4_DEFINES -DHAVE_SYSV_COMPAT"
697 elif test "x${SYSTEM_SYSVINIT_PATH}" != "x" -o "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
698 AC_MSG_ERROR([*** You need both --with-sysvinit-path=PATH and --with-sysvrcd-path=PATH to enable SysV compatibility support, or both empty to disable it.])
700 SYSTEM_SYSV_COMPAT="no"
703 AC_ARG_WITH([tty-gid],
704 [AS_HELP_STRING([--with-tty-gid=GID],
705 [Specify the numeric GID of the 'tty' group])],
706 [AC_DEFINE_UNQUOTED(TTY_GID, [$withval], [GID of the 'tty' group])],
709 AM_CONDITIONAL(TARGET_FEDORA, test x"$with_distro" = xfedora)
710 AM_CONDITIONAL(TARGET_SUSE, test x"$with_distro" = xsuse)
711 AM_CONDITIONAL(TARGET_DEBIAN, test x"$with_distro" = xdebian)
712 AM_CONDITIONAL(TARGET_UBUNTU, test x"$with_distro" = xubuntu)
713 AM_CONDITIONAL(TARGET_DEBIAN_OR_UBUNTU, test x"$with_distro" = xdebian -o x"$with_distro" = xubuntu)
714 AM_CONDITIONAL(TARGET_ARCH, test x"$with_distro" = xarch)
715 AM_CONDITIONAL(TARGET_GENTOO, test x"$with_distro" = xgentoo)
716 AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware)
717 AM_CONDITIONAL(TARGET_FRUGALWARE, test x"$with_distro" = xfrugalware)
718 AM_CONDITIONAL(TARGET_ALTLINUX, test x"$with_distro" = xaltlinux)
719 AM_CONDITIONAL(TARGET_MANDRIVA, test x"$with_distro" = xmandriva)
720 AM_CONDITIONAL(TARGET_ANGSTROM, test x"$with_distro" = xangstrom)
721 AM_CONDITIONAL(TARGET_MAGEIA, test x"$with_distro" = xmageia)
723 AM_CONDITIONAL(HAVE_SYSV_COMPAT, test "$SYSTEM_SYSV_COMPAT" = "yes")
725 AC_ARG_WITH([dbuspolicydir],
726 AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
728 [with_dbuspolicydir=`pkg-config --variable=sysconfdir dbus-1`/dbus-1/system.d])
730 AC_ARG_WITH([dbussessionservicedir],
731 AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]),
733 [with_dbussessionservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`])
735 AC_ARG_WITH([dbussystemservicedir],
736 AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]),
738 [with_dbussystemservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../system-services])
740 AC_ARG_WITH([dbusinterfacedir],
741 AS_HELP_STRING([--with-dbusinterfacedir=DIR], [D-Bus interface directory]),
743 [with_dbusinterfacedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../interfaces])
745 AC_ARG_WITH([rootprefix],
746 AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
747 [], [with_rootprefix=${ac_default_prefix}])
749 AC_ARG_WITH([rootlibdir],
750 AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]),
752 [with_rootlibdir=${libdir}])
754 AC_ARG_WITH([pamlibdir],
755 AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
757 [with_pamlibdir=${with_rootlibdir}/security])
759 AC_ARG_ENABLE([split-usr],
760 AS_HELP_STRING([--enable-split-usr], [Assume that /bin, /sbin aren\'t symlinks into /usr]),
762 [AS_IF([test "x${ac_default_prefix}" != "x${with_rootprefix}"], [
768 AS_IF([test "x${enable_split_usr}" = "xyes"], [
769 AC_DEFINE(HAVE_SPLIT_USR, 1, [Define if /bin, /sbin aren't symlinks into /usr])
772 AC_SUBST([dbuspolicydir], [$with_dbuspolicydir])
773 AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir])
774 AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
775 AC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir])
776 AC_SUBST([pamlibdir], [$with_pamlibdir])
777 AC_SUBST([rootprefix], [$with_rootprefix])
778 AC_SUBST([rootlibdir], [$with_rootlibdir])
781 Makefile po/Makefile.in
782 docs/libudev/Makefile
783 docs/libudev/version.xml
785 docs/gudev/version.xml
790 $PACKAGE_NAME $VERSION
792 Distribution: ${with_distro}
793 SysV compatibility: ${SYSTEM_SYSV_COMPAT}
794 SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
795 SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
796 libcryptsetup: ${have_libcryptsetup}
797 tcpwrap: ${have_tcpwrap}
801 SELinux: ${have_selinux}
804 GCRYPT: ${have_gcrypt}
805 QRENCODE: ${have_qrencode}
806 binfmt: ${have_binfmt}
807 vconsole: ${have_vconsole}
808 readahead: ${have_readahead}
809 quotacheck: ${have_quotacheck}
810 randomseed: ${have_randomseed}
811 logind: ${have_logind}
812 hostnamed: ${have_hostnamed}
813 timedated: ${have_timedated}
814 localed: ${have_localed}
815 coredump: ${have_coredump}
816 firmware path: ${FIRMWARE_PATH}
817 usb.ids: ${USB_DATABASE}
818 pci.ids: ${PCI_DATABASE}
819 gudev: ${enable_gudev}
820 gintrospection: ${enable_introspection}
821 keymap: ${enable_keymap}
822 Python: ${have_python}
823 Python Headers: ${have_python_devel}
826 rootprefix: ${with_rootprefix}
827 sysconf dir: ${sysconfdir}
828 datarootdir: ${datarootdir}
829 includedir: ${includedir}
830 include_prefix: ${INCLUDE_PREFIX}
832 rootlib dir: ${with_rootlibdir}
833 PAM modules dir: ${with_pamlibdir}
834 D-Bus policy dir: ${with_dbuspolicydir}
835 D-Bus session dir: ${with_dbussessionservicedir}
836 D-Bus system dir: ${with_dbussystemservicedir}
837 D-Bus interfaces dir: ${with_dbusinterfacedir}
838 Split /usr: ${enable_split_usr}
839 man pages: ${have_manpages}
840 gtk-doc: ${enable_gtk_doc}
842 CFLAGS: ${OUR_CFLAGS} ${CFLAGS}
843 CPPLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS}
844 LDFLAGS: ${OUR_LDFLAGS} ${LDFLAGS}