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 # gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line
68 m4_ifdef([GTK_DOC_CHECK], [
69 GTK_DOC_CHECK([1.18],[--flavour no-tmpl])
70 ], [AM_CONDITIONAL([ENABLE_GTK_DOC], [false])])
72 AS_IF([test "x$enable_gtk_doc" = "xyes" -a "x$XSLTPROC" = x], [
73 AC_MSG_ERROR([*** GTK doc requested but xsltproc not found])
76 m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [
77 GOBJECT_INTROSPECTION_CHECK([1.31.1])
78 ], [AM_CONDITIONAL([HAVE_INTROSPECTION], [false])])
80 AC_CHECK_TOOL(OBJCOPY, objcopy)
81 AC_CHECK_TOOL(STRINGS, strings)
82 AC_CHECK_TOOL(GPERF, gperf)
83 if test -z "$GPERF" ; then
84 AC_MSG_ERROR([*** gperf not found])
87 # we use python only to build the man page index
88 AM_PATH_PYTHON(,, [:])
89 AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
91 CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
101 -Wmissing-include-dirs \
102 -Wformat-nonliteral \
103 -Wold-style-definition \
106 -Wdeclaration-after-statement \
108 -Wmissing-prototypes \
109 -Wstrict-prototypes \
111 -Wmissing-declarations \
116 -Wstrict-aliasing=2 \
119 -Wno-overlength-strings \
120 -Wno-unused-parameter \
121 -Wno-missing-field-initializers \
126 -fdiagnostics-show-option \
127 -fno-strict-aliasing \
128 -fvisibility=hidden \
129 -ffunction-sections \
132 --param=ssp-buffer-size=4])
133 AC_SUBST([OUR_CFLAGS], $with_cflags)
135 CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
136 -Wp,-D_FORTIFY_SOURCE=2])
137 AC_SUBST([OUR_CPPFLAGS], $with_cppflags)
139 CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
144 AC_SUBST([OUR_LDFLAGS], $with_ldflags)
146 AC_SEARCH_LIBS([clock_gettime], [rt], [], [AC_MSG_ERROR([*** POSIX RT library not found])])
147 AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
151 AC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])])
152 AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
157 AC_CHECK_FUNCS([fanotify_init fanotify_mark name_to_handle_at])
158 AC_CHECK_DECLS([gettid, pivot_root], [], [], [[#include <sys/types.h>
160 #include <sys/mount.h>]])
162 # This makes sure pkg.m4 is available.
163 m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
165 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2])
166 PKG_CHECK_MODULES(KMOD, [libkmod >= 5])
167 PKG_CHECK_MODULES(BLKID,[blkid >= 2.20])
169 # ------------------------------------------------------------------------------
171 AC_ARG_ENABLE([ima], AS_HELP_STRING([--disable-ima],[Disable optional IMA support]),
172 [case "${enableval}" in
175 *) AC_MSG_ERROR(bad value ${enableval} for --disable-ima) ;;
179 if test "x${have_ima}" != xno ; then
180 AC_DEFINE(HAVE_IMA, 1, [Define if IMA is available])
183 # ------------------------------------------------------------------------------
185 AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
186 if test "x$enable_selinux" != "xno"; then
187 PKG_CHECK_MODULES(SELINUX, [ libselinux ],
188 [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available]) have_selinux=yes], have_selinux=no)
189 if test "x$have_selinux" = xno -a "x$enable_selinux" = xyes; then
190 AC_MSG_ERROR([*** SELinux support requested but libraries not found])
193 AM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"])
194 if test "x${have_selinux}" != xno ; then
195 sushell=/sbin/sushell
201 # ------------------------------------------------------------------------------
203 AC_ARG_ENABLE(xz, AS_HELP_STRING([--disable-xz], [Disable optional XZ support]))
204 if test "x$enable_xz" != "xno"; then
205 PKG_CHECK_MODULES(XZ, [ liblzma ],
206 [AC_DEFINE(HAVE_XZ, 1, [Define if XZ is available]) have_xz=yes], have_xz=no)
207 if test "x$have_xz" = xno -a "x$enable_xz" = xyes; then
208 AC_MSG_ERROR([*** Xz support requested but libraries not found])
211 AM_CONDITIONAL(HAVE_XZ, [test "$have_xz" = "yes"])
213 # ------------------------------------------------------------------------------
214 AC_ARG_ENABLE([tcpwrap],
215 AS_HELP_STRING([--disable-tcpwrap],[Disable optional TCP wrappers support]),
216 [case "${enableval}" in
217 yes) have_tcpwrap=yes ;;
218 no) have_tcpwrap=no ;;
219 *) AC_MSG_ERROR(bad value ${enableval} for --disable-tcpwrap) ;;
223 if test "x${have_tcpwrap}" != xno ; then
225 if test "x${LIBWRAP_LIBS}" = x ; then
226 if test "x$have_tcpwrap" = xyes ; then
227 AC_MSG_ERROR([*** TCP wrappers support not found.])
236 AC_SUBST(LIBWRAP_LIBS)
238 # ------------------------------------------------------------------------------
240 AS_HELP_STRING([--disable-pam],[Disable optional PAM support]),
241 [case "${enableval}" in
244 *) AC_MSG_ERROR(bad value ${enableval} for --disable-pam) ;;
248 if test "x${have_pam}" != xno ; then
250 [security/pam_modules.h security/pam_modutil.h security/pam_ext.h],
252 [if test "x$have_pam" = xyes ; then
253 AC_MSG_ERROR([*** PAM headers not found.])
260 [if test "x$have_pam" = xyes ; then
261 AC_MSG_ERROR([*** libpam not found.])
264 if test "x$have_pam" = xyes ; then
265 PAM_LIBS="-lpam -lpam_misc"
266 AC_DEFINE(HAVE_PAM, 1, [PAM available])
274 AM_CONDITIONAL([HAVE_PAM], [test "x$have_pam" != xno])
276 # ------------------------------------------------------------------------------
278 AS_HELP_STRING([--disable-acl],[Disable optional ACL support]),
279 [case "${enableval}" in
282 *) AC_MSG_ERROR(bad value ${enableval} for --disable-acl) ;;
286 if test "x${have_acl}" != xno ; then
288 [sys/acl.h acl/libacl.h],
290 [if test "x$have_acl" = xyes ; then
291 AC_MSG_ERROR([*** ACL headers not found.])
298 [if test "x$have_acl" = xyes ; then
299 AC_MSG_ERROR([*** libacl not found.])
302 if test "x$have_acl" = xyes ; then
304 AC_DEFINE(HAVE_ACL, 1, [ACL available])
312 AM_CONDITIONAL([HAVE_ACL], [test "x$have_acl" != xno])
314 # ------------------------------------------------------------------------------
315 AC_ARG_ENABLE([gcrypt],
316 AS_HELP_STRING([--disable-gcrypt],[Disable optional GCRYPT support]),
317 [case "${enableval}" in
318 yes) have_gcrypt=yes ;;
319 no) have_gcrypt=no ;;
320 *) AC_MSG_ERROR(bad value ${enableval} for --disable-gcrypt) ;;
324 if test "x${have_gcrypt}" != xno ; then
328 [if test "x$have_gcrypt" = xyes ; then
329 AC_MSG_ERROR([*** GCRYPT headers not found.])
332 if test "x$have_gcrypt" = xyes ; then
333 GCRYPT_LIBS="$LIBGCRYPT_LIBS"
334 GCRYPT_CFLAGS="$LIBGCRYPT_CFLAGS"
335 AC_DEFINE(HAVE_GCRYPT, 1, [GCRYPT available])
343 AC_SUBST(GCRYPT_LIBS)
344 AC_SUBST(GCRYPT_CFLAGS)
345 AM_CONDITIONAL([HAVE_GCRYPT], [test "x$have_gcrypt" != xno])
347 # ------------------------------------------------------------------------------
348 AC_ARG_ENABLE([audit],
349 AS_HELP_STRING([--disable-audit],[Disable optional AUDIT support]),
350 [case "${enableval}" in
351 yes) have_audit=yes ;;
353 *) AC_MSG_ERROR(bad value ${enableval} for --disable-audit) ;;
357 if test "x${have_audit}" != xno ; then
361 [if test "x$have_audit" = xyes ; then
362 AC_MSG_ERROR([*** AUDIT headers not found.])
369 [if test "x$have_audit" = xyes ; then
370 AC_MSG_ERROR([*** libaudit not found.])
373 if test "x$have_audit" = xyes ; then
375 AC_DEFINE(HAVE_AUDIT, 1, [AUDIT available])
384 # ------------------------------------------------------------------------------
385 have_libcryptsetup=no
386 AC_ARG_ENABLE(libcryptsetup, AS_HELP_STRING([--disable-libcryptsetup], [disable libcryptsetup tools]))
387 if test "x$enable_libcryptsetup" != "xno"; then
388 PKG_CHECK_MODULES(LIBCRYPTSETUP, [ libcryptsetup >= 1.4.2 ],
389 [AC_DEFINE(HAVE_LIBCRYPTSETUP, 1, [Define if libcryptsetup is available]) have_libcryptsetup=yes], have_libcryptsetup=no)
390 if test "x$have_libcryptsetup" = xno -a "x$enable_libcryptsetup" = xyes; then
391 AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found])
394 AM_CONDITIONAL(HAVE_LIBCRYPTSETUP, [test "$have_libcryptsetup" = "yes"])
396 # ------------------------------------------------------------------------------
398 AC_ARG_ENABLE(qrencode, AS_HELP_STRING([--disable-qrencode], [disable qrencode support]))
399 if test "x$enable_qrencode" != "xno"; then
400 PKG_CHECK_MODULES(QRENCODE, [ libqrencode ],
401 [AC_DEFINE(HAVE_QRENCODE, 1, [Define if qrencode is available]) have_qrencode=yes], have_qrencode=no)
402 if test "x$have_qrencode" = xno -a "x$enable_qrencode" = xyes; then
403 AC_MSG_ERROR([*** qrencode support requested but libraries not found])
406 AM_CONDITIONAL(HAVE_QRENCODE, [test "$have_qrencode" = "yes"])
408 # ------------------------------------------------------------------------------
410 AC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool]))
411 if test "x$enable_binfmt" != "xno"; then
414 AM_CONDITIONAL(ENABLE_BINFMT, [test "$have_binfmt" = "yes"])
416 # ------------------------------------------------------------------------------
418 AC_ARG_ENABLE(vconsole, AS_HELP_STRING([--disable-vconsole], [disable vconsole tool]))
419 if test "x$enable_vconsole" != "xno"; then
422 AM_CONDITIONAL(ENABLE_VCONSOLE, [test "$have_vconsole" = "yes"])
424 # ------------------------------------------------------------------------------
426 AC_ARG_ENABLE(readahead, AS_HELP_STRING([--disable-readahead], [disable readahead tools]))
427 if test "x$enable_readahead" != "xno"; then
430 AM_CONDITIONAL(ENABLE_READAHEAD, [test "$have_readahead" = "yes"])
432 # ------------------------------------------------------------------------------
434 AC_ARG_ENABLE(quotacheck, AS_HELP_STRING([--disable-quotacheck], [disable quotacheck tools]))
435 if test "x$enable_quotacheck" != "xno"; then
438 AM_CONDITIONAL(ENABLE_QUOTACHECK, [test "$have_quotacheck" = "yes"])
440 # ------------------------------------------------------------------------------
442 AC_ARG_ENABLE(randomseed, AS_HELP_STRING([--disable-randomseed], [disable randomseed tools]))
443 if test "x$enable_randomseed" != "xno"; then
446 AM_CONDITIONAL(ENABLE_RANDOMSEED, [test "$have_randomseed" = "yes"])
448 # ------------------------------------------------------------------------------
450 AC_ARG_ENABLE(logind, AS_HELP_STRING([--disable-logind], [disable login daemon]))
451 if test "x$enable_logind" != "xno"; then
454 AM_CONDITIONAL(ENABLE_LOGIND, [test "$have_logind" = "yes"])
455 AS_IF([test "$have_logind" = "yes"], [ AC_DEFINE(HAVE_LOGIND, [1], [Logind support available]) ])
457 # ------------------------------------------------------------------------------
459 AC_ARG_ENABLE(hostnamed, AS_HELP_STRING([--disable-hostnamed], [disable hostname daemon]))
460 if test "x$enable_hostnamed" != "xno"; then
463 AM_CONDITIONAL(ENABLE_HOSTNAMED, [test "$have_hostnamed" = "yes"])
465 # ------------------------------------------------------------------------------
467 AC_ARG_ENABLE(timedated, AS_HELP_STRING([--disable-timedated], [disable timedate daemon]))
468 if test "x$enable_timedated" != "xno"; then
471 AM_CONDITIONAL(ENABLE_TIMEDATED, [test "$have_timedated" = "yes"])
473 # ------------------------------------------------------------------------------
475 AC_ARG_ENABLE(localed, AS_HELP_STRING([--disable-localed], [disable locale daemon]))
476 if test "x$enable_localed" != "xno"; then
479 AM_CONDITIONAL(ENABLE_LOCALED, [test "$have_localed" = "yes"])
481 # ------------------------------------------------------------------------------
483 AC_ARG_ENABLE(coredump, AS_HELP_STRING([--disable-coredump], [disable coredump hook]))
484 if test "x$enable_coredump" != "xno"; then
487 AM_CONDITIONAL(ENABLE_COREDUMP, [test "$have_coredump" = "yes"])
489 # ------------------------------------------------------------------------------
490 AC_ARG_WITH(usb-ids-path,
491 [AS_HELP_STRING([--with-usb-ids-path=DIR], [Path to usb.ids file])],
492 [USB_DATABASE=${withval}],
493 [if test -n "$usbids" ; then
494 USB_DATABASE="$usbids"
496 PKG_CHECK_MODULES(USBUTILS, usbutils >= 0.82)
497 AC_SUBST([USB_DATABASE], [$($PKG_CONFIG --variable=usbids usbutils)])
499 AC_MSG_CHECKING([for USB database location])
500 AC_MSG_RESULT([$USB_DATABASE])
501 AC_SUBST(USB_DATABASE)
503 AC_ARG_WITH(pci-ids-path,
504 [AS_HELP_STRING([--with-pci-ids-path=DIR], [Path to pci.ids file])],
505 [PCI_DATABASE=${withval}],
506 [if test -n "$pciids" ; then
507 PCI_DATABASE="$pciids"
509 PKG_CHECK_MODULES(LIBPCI, libpci >= 3)
510 AC_SUBST([PCI_DATABASE], [$($PKG_CONFIG --variable=idsdir libpci)/pci.ids])
512 AC_MSG_CHECKING([for PCI database location])
513 AC_MSG_RESULT([$PCI_DATABASE])
514 AC_SUBST(PCI_DATABASE)
516 # ------------------------------------------------------------------------------
517 AC_ARG_WITH(firmware-path,
518 AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]],
519 [Firmware search path (default=ROOTPREFIX/lib/firmware/updates:ROOTPREFIX/lib/firmware)]),
520 [], [with_firmware_path="$rootprefix/lib/firmware/updates:$rootprefix/lib/firmware"])
523 for i in $with_firmware_path; do
524 if test "x${FIRMWARE_PATH}" = "x"; then
525 FIRMWARE_PATH="\\\"${i}/\\\""
527 FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\""
531 AC_SUBST([FIRMWARE_PATH], [$FIRMWARE_PATH])
533 # ------------------------------------------------------------------------------
534 AC_ARG_ENABLE([gudev],
535 AS_HELP_STRING([--disable-gudev], [disable Gobject libudev support @<:@default=enabled@:>@]),
536 [], [enable_gudev=yes])
537 AS_IF([test "x$enable_gudev" = "xyes"], [ PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.22.0 gobject-2.0 >= 2.22.0]) ])
538 AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"])
540 # ------------------------------------------------------------------------------
541 AC_ARG_ENABLE([keymap],
542 AS_HELP_STRING([--disable-keymap], [disable keymap fixup support @<:@default=enabled@:>@]),
543 [], [enable_keymap=yes])
544 AS_IF([test "x$enable_keymap" = "xyes"], [
545 AC_PATH_PROG([GPERF], [gperf])
546 if test -z "$GPERF"; then
547 AC_MSG_ERROR([gperf is needed])
550 AC_CHECK_HEADER([linux/input.h], [:], AC_MSG_ERROR([kernel headers not found]))
551 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}')])
553 AM_CONDITIONAL([ENABLE_KEYMAP], [test "x$enable_keymap" = "xyes"])
555 # ------------------------------------------------------------------------------
557 AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages]))
558 AS_IF([test "x$enable_manpages" != xno], [
559 AS_IF([test "x$enable_manpages" = xyes -a "x$XSLTPROC" = x], [
560 AC_MSG_ERROR([*** Manpages requested but xsltproc not found])
562 AS_IF([test "x$XSLTPROC" != x], [have_manpages=yes])
564 AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
566 # ------------------------------------------------------------------------------
568 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]))
569 if test "z$with_distro" = "z"; then
570 if test "$cross_compiling" = yes; then
571 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)])
573 with_distro=$($GREP '^ID=' /etc/os-release 2>/dev/null | $SED 's/ID=//');
575 if test "z$with_distro" = "z"; then
579 with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' `
580 AC_DEFINE_UNQUOTED(DISTRIBUTION, ["${with_distro}"], [Target Distribution])
582 # Location of the init scripts as mandated by LSB
583 SYSTEM_SYSVINIT_PATH=/etc/init.d
584 SYSTEM_SYSVRCND_PATH=/etc/rc.d
590 SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
591 AC_DEFINE(TARGET_FEDORA, [], [Target is Fedora/RHEL])
592 M4_DEFINES=-DTARGET_FEDORA=1
595 SYSTEM_SYSVRCND_PATH=/etc/init.d
596 AC_DEFINE(TARGET_SUSE, [], [Target is openSUSE/SLE])
597 M4_DEFINES=-DTARGET_SUSE=1
600 SYSTEM_SYSVRCND_PATH=/etc
601 AC_DEFINE(TARGET_DEBIAN, [], [Target is Debian])
602 M4_DEFINES=-DTARGET_DEBIAN=1
605 SYSTEM_SYSVRCND_PATH=/etc
606 AC_DEFINE(TARGET_UBUNTU, [], [Target is Ubuntu])
607 M4_DEFINES=-DTARGET_UBUNTU=1
610 SYSTEM_SYSVINIT_PATH=
611 SYSTEM_SYSVRCND_PATH=
612 AC_DEFINE(TARGET_ARCH, [], [Target is ArchLinux])
613 M4_DEFINES=-DTARGET_ARCH=1
616 SYSTEM_SYSVINIT_PATH=
617 SYSTEM_SYSVRCND_PATH=
618 AC_DEFINE(TARGET_GENTOO, [], [Target is Gentoo])
619 M4_DEFINES=-DTARGET_GENTOO=1
622 SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
623 AC_DEFINE(TARGET_SLACKWARE, [], [Target is Slackware])
624 M4_DEFINES=-DTARGET_SLACKWARE=1
627 SYSTEM_SYSVINIT_PATH=/etc/rc.d
628 AC_DEFINE(TARGET_FRUGALWARE, [], [Target is Frugalware])
629 M4_DEFINES=-DTARGET_FRUGALWARE=1
632 SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
633 AC_DEFINE(TARGET_ALTLINUX, [], [Target is ALTLinux])
634 M4_DEFINES=-DTARGET_ALTLINUX=1
637 SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
638 AC_DEFINE(TARGET_MANDRIVA, [], [Target is Mandriva])
639 M4_DEFINES=-DTARGET_MANDRIVA=1
642 SYSTEM_SYSVRCND_PATH=/etc
643 AC_DEFINE(TARGET_ANGSTROM, [], [Target is Ångström])
644 M4_DEFINES=-DTARGET_ANGSTROM=1
647 SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
648 AC_DEFINE(TARGET_MAGEIA, [], [Target is Mageia])
649 M4_DEFINES=-DTARGET_MAGEIA=1
654 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])
658 AC_ARG_WITH([sysvinit-path],
659 [AS_HELP_STRING([--with-sysvinit-path=PATH],
660 [Specify the path to where the SysV init scripts are located @<:@default=based on distro@:>@])],
661 [SYSTEM_SYSVINIT_PATH="$withval"],
664 AC_ARG_WITH([sysvrcd-path],
665 [AS_HELP_STRING([--with-sysvrcd-path=PATH],
666 [Specify the path to the base directory for the SysV rcN.d directories @<:@default=based on distro@:>@])],
667 [SYSTEM_SYSVRCND_PATH="$withval"],
670 AC_SUBST(SYSTEM_SYSVINIT_PATH)
671 AC_SUBST(SYSTEM_SYSVRCND_PATH)
674 if test "x${SYSTEM_SYSVINIT_PATH}" != "x" -a "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
675 AC_DEFINE(HAVE_SYSV_COMPAT, [], [SysV init scripts and rcN.d links are supported.])
676 SYSTEM_SYSV_COMPAT="yes"
677 M4_DEFINES="$M4_DEFINES -DHAVE_SYSV_COMPAT"
678 elif test "x${SYSTEM_SYSVINIT_PATH}" != "x" -o "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
679 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.])
681 SYSTEM_SYSV_COMPAT="no"
684 AC_ARG_WITH([tty-gid],
685 [AS_HELP_STRING([--with-tty-gid=GID],
686 [Specify the numeric GID of the 'tty' group])],
687 [AC_DEFINE_UNQUOTED(TTY_GID, [$withval], [GID of the 'tty' group])],
690 AM_CONDITIONAL(TARGET_FEDORA, test x"$with_distro" = xfedora)
691 AM_CONDITIONAL(TARGET_SUSE, test x"$with_distro" = xsuse)
692 AM_CONDITIONAL(TARGET_DEBIAN, test x"$with_distro" = xdebian)
693 AM_CONDITIONAL(TARGET_UBUNTU, test x"$with_distro" = xubuntu)
694 AM_CONDITIONAL(TARGET_DEBIAN_OR_UBUNTU, test x"$with_distro" = xdebian -o x"$with_distro" = xubuntu)
695 AM_CONDITIONAL(TARGET_ARCH, test x"$with_distro" = xarch)
696 AM_CONDITIONAL(TARGET_GENTOO, test x"$with_distro" = xgentoo)
697 AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware)
698 AM_CONDITIONAL(TARGET_FRUGALWARE, test x"$with_distro" = xfrugalware)
699 AM_CONDITIONAL(TARGET_ALTLINUX, test x"$with_distro" = xaltlinux)
700 AM_CONDITIONAL(TARGET_MANDRIVA, test x"$with_distro" = xmandriva)
701 AM_CONDITIONAL(TARGET_ANGSTROM, test x"$with_distro" = xangstrom)
702 AM_CONDITIONAL(TARGET_MAGEIA, test x"$with_distro" = xmageia)
704 AM_CONDITIONAL(HAVE_SYSV_COMPAT, test "$SYSTEM_SYSV_COMPAT" = "yes")
706 AC_ARG_WITH([dbuspolicydir],
707 AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
709 [with_dbuspolicydir=`pkg-config --variable=sysconfdir dbus-1`/dbus-1/system.d])
711 AC_ARG_WITH([dbussessionservicedir],
712 AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]),
714 [with_dbussessionservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`])
716 AC_ARG_WITH([dbussystemservicedir],
717 AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]),
719 [with_dbussystemservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../system-services])
721 AC_ARG_WITH([dbusinterfacedir],
722 AS_HELP_STRING([--with-dbusinterfacedir=DIR], [D-Bus interface directory]),
724 [with_dbusinterfacedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../interfaces])
726 AC_ARG_WITH([rootprefix],
727 AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
728 [], [with_rootprefix=${ac_default_prefix}])
730 AC_ARG_WITH([rootlibdir],
731 AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]),
733 [with_rootlibdir=${libdir}])
735 AC_ARG_WITH([pamlibdir],
736 AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
738 [with_pamlibdir=${with_rootlibdir}/security])
740 AC_ARG_ENABLE([split-usr],
741 AS_HELP_STRING([--enable-split-usr], [Assume that /bin, /sbin aren\'t symlinks into /usr]),
743 [AS_IF([test "x${ac_default_prefix}" != "x${with_rootprefix}"], [
749 AS_IF([test "x${enable_split_usr}" = "xyes"], [
750 AC_DEFINE(HAVE_SPLIT_USR, 1, [Define if /bin, /sbin aren't symlinks into /usr])
753 AC_SUBST([dbuspolicydir], [$with_dbuspolicydir])
754 AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir])
755 AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
756 AC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir])
757 AC_SUBST([pamlibdir], [$with_pamlibdir])
758 AC_SUBST([rootprefix], [$with_rootprefix])
759 AC_SUBST([rootlibdir], [$with_rootlibdir])
762 Makefile po/Makefile.in
763 docs/libudev/Makefile
764 docs/libudev/version.xml
766 docs/gudev/version.xml
771 $PACKAGE_NAME $VERSION
773 Distribution: ${with_distro}
774 SysV compatibility: ${SYSTEM_SYSV_COMPAT}
775 SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
776 SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
777 libcryptsetup: ${have_libcryptsetup}
778 tcpwrap: ${have_tcpwrap}
782 SELinux: ${have_selinux}
785 GCRYPT: ${have_gcrypt}
786 QRENCODE: ${have_qrencode}
787 binfmt: ${have_binfmt}
788 vconsole: ${have_vconsole}
789 readahead: ${have_readahead}
790 quotacheck: ${have_quotacheck}
791 randomseed: ${have_randomseed}
792 logind: ${have_logind}
793 hostnamed: ${have_hostnamed}
794 timedated: ${have_timedated}
795 localed: ${have_localed}
796 coredump: ${have_coredump}
797 firmware path: ${FIRMWARE_PATH}
798 usb.ids: ${USB_DATABASE}
799 pci.ids: ${PCI_DATABASE}
800 gudev: ${enable_gudev}
801 gintrospection: ${enable_introspection}
802 keymap: ${enable_keymap}
805 rootprefix: ${with_rootprefix}
806 sysconf dir: ${sysconfdir}
807 datarootdir: ${datarootdir}
808 includedir: ${includedir}
809 include_prefix: ${INCLUDE_PREFIX}
811 rootlib dir: ${with_rootlibdir}
812 PAM modules dir: ${with_pamlibdir}
813 D-Bus policy dir: ${with_dbuspolicydir}
814 D-Bus session dir: ${with_dbussessionservicedir}
815 D-Bus system dir: ${with_dbussystemservicedir}
816 D-Bus interfaces dir: ${with_dbusinterfacedir}
817 Split /usr: ${enable_split_usr}
818 man pages: ${have_manpages}
819 gtk-doc: ${enable_gtk_doc}
821 CFLAGS: ${OUR_CFLAGS} ${CFLAGS}
822 CPPLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS}
823 LDFLAGS: ${OUR_LDFLAGS} ${LDFLAGS}