4 [linux-hotplug@vger.kernel.org],
6 [http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html])
7 AC_CONFIG_SRCDIR([udev/udevd.c])
8 AC_CONFIG_AUX_DIR([build-aux])
9 AM_INIT_AUTOMAKE([check-news foreign 1.11 -Wall -Wno-portability silent-rules tar-pax dist-bzip2 subdir-objects])
11 AC_USE_SYSTEM_EXTENSIONS
13 AC_CONFIG_MACRO_DIR([m4])
14 AM_SILENT_RULES([yes])
18 AC_PREFIX_DEFAULT([/usr])
19 AC_PATH_PROG([XSLTPROC], [xsltproc])
21 AC_SEARCH_LIBS([clock_gettime], [rt], [], [AC_MSG_ERROR([POSIX RT library not found])])
23 AC_ARG_WITH([rootlibdir],
24 AS_HELP_STRING([--with-rootlibdir=DIR], [rootfs directory to install shared libraries]),
25 [], [with_rootlibdir=$libdir])
26 AC_SUBST([rootlib_execdir], [$with_rootlibdir])
28 AC_ARG_WITH([selinux],
29 AS_HELP_STRING([--with-selinux], [enable SELinux support]),
30 [], [with_selinux=no])
31 if test "x$with_selinux" = xyes; then
33 AC_CHECK_LIB(selinux, getprevcon,
35 AC_MSG_ERROR([SELinux selected but libselinux not found]))
37 SELINUX_LIBS="-lselinux -lsepol"
38 AC_DEFINE(WITH_SELINUX, [1] ,[SELinux support.])
40 AC_SUBST([SELINUX_LIBS])
41 AM_CONDITIONAL(WITH_SELINUX, [test "x$with_selinux" = xyes])
43 AC_ARG_ENABLE([debug],
44 AS_HELP_STRING([--enable-debug], [enable debug messages]),
45 [], [enable_debug=no])
46 if test "x$enable_debug" = "xyes"; then
47 AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
50 AC_ARG_ENABLE([logging],
51 AS_HELP_STRING([--disable-logging], [disable system logging]),
52 [], enable_logging=yes)
53 if test "x$enable_logging" = "xyes"; then
54 AC_DEFINE(ENABLE_LOGGING, [1], [System logging.])
57 AC_ARG_WITH(firmware-path,
58 AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]],
59 [Firmware search path (default=/lib/firmware/updates:/lib/firmware)]),
60 [], [with_firmware_path="/lib/firmware/updates:/lib/firmware"])
63 for i in $with_firmware_path; do
64 if test "x${FIRMWARE_PATH}" = "x"; then
65 FIRMWARE_PATH="\\\"${i}/\\\""
67 FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\""
71 AC_SUBST([FIRMWARE_PATH], [$FIRMWARE_PATH])
73 AC_ARG_WITH([systemdsystemunitdir],
74 AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
75 [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
76 if test "x$with_systemdsystemunitdir" != xno; then
77 AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
79 AM_CONDITIONAL(WITH_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
81 # ------------------------------------------------------------------------------
82 # rule_generator - persistent network and optical device rule generator
83 # ------------------------------------------------------------------------------
84 AC_ARG_ENABLE([rule_generator],
85 AS_HELP_STRING([--disable-rule_generator], [disable persistent network, cdrom support]),
86 [], [enable_rule_generator=yes])
87 AM_CONDITIONAL([ENABLE_RULE_GENERATOR], [test "x$enable_rule_generator" = xyes])
89 # ------------------------------------------------------------------------------
90 # usb/pci-db - read vendor/device string database
91 # ------------------------------------------------------------------------------
93 AS_HELP_STRING([--disable-hwdb], [disable hardware database support]),
94 [], [enable_hwdb=yes])
95 if test "x$enable_hwdb" = xyes; then
96 if test "x$cross_compiling" = "xno" ; then
97 AC_CHECK_FILES([/usr/share/pci.ids], [pciids=/usr/share/pci.ids])
98 AC_CHECK_FILES([/usr/share/hwdata/pci.ids], [pciids=/usr/share/hwdata/pci.ids])
99 AC_CHECK_FILES([/usr/share/misc/pci.ids], [pciids=/usr/share/misc/pci.ids])
102 AC_ARG_WITH(usb-ids-path,
103 [AS_HELP_STRING([--with-usb-ids-path=DIR], [Path to usb.ids file])],
104 [USB_DATABASE=${withval}],
105 [if test -n "$usbids" ; then
106 USB_DATABASE="$usbids"
108 PKG_CHECK_MODULES(USBUTILS, usbutils >= 0.82)
109 AC_SUBST([USB_DATABASE], [$($PKG_CONFIG --variable=usbids usbutils)])
111 AC_MSG_CHECKING([for USB database location])
112 AC_MSG_RESULT([$USB_DATABASE])
113 AC_SUBST(USB_DATABASE)
115 AC_ARG_WITH(pci-ids-path,
116 [AS_HELP_STRING([--with-pci-ids-path=DIR], [Path to pci.ids file])],
117 [PCI_DATABASE=${withval}],
118 [if test -n "$pciids" ; then
119 PCI_DATABASE="$pciids"
121 AC_MSG_ERROR([pci.ids not found, try --with-pci-ids-path=])
123 AC_MSG_CHECKING([for PCI database location])
124 AC_MSG_RESULT([$PCI_DATABASE])
125 AC_SUBST(PCI_DATABASE)
127 AM_CONDITIONAL([ENABLE_HWDB], [test "x$enable_hwdb" = xyes])
129 # ------------------------------------------------------------------------------
130 # udev_acl - apply ACLs for users with local forground sessions
131 # ------------------------------------------------------------------------------
132 AC_ARG_ENABLE([udev_acl],
133 AS_HELP_STRING([--disable-udev_acl], [disable local user acl permissions support]),
134 [], [enable_udev_acl=yes])
135 if test "x$enable_udev_acl" = xyes; then
136 AC_CHECK_LIB([acl], [acl_init], [:], AC_MSG_ERROR([libacl not found]))
137 AC_CHECK_HEADER([acl/libacl.h], [:], AC_MSG_ERROR([libacl header not found]))
139 PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.22.0 gobject-2.0 >= 2.22.0])
141 AM_CONDITIONAL([ENABLE_UDEV_ACL], [test "x$enable_udev_acl" = xyes])
143 # ------------------------------------------------------------------------------
144 # GUdev - libudev gobject interface
145 # ------------------------------------------------------------------------------
146 AC_ARG_ENABLE([gudev],
147 AS_HELP_STRING([--disable-gudev], [disable Gobject libudev support]),
148 [], [enable_gudev=yes])
149 if test "x$enable_gudev" = xyes; then
150 PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.22.0 gobject-2.0 >= 2.22.0])
153 AC_ARG_ENABLE([introspection],
154 AS_HELP_STRING([--disable-introspection], [disable GObject introspection]),
155 [], [enable_introspection=yes])
156 if test "x$enable_introspection" = xyes; then
157 PKG_CHECK_MODULES([INTROSPECTION], [gobject-introspection-1.0 >= 0.6.2])
158 AC_DEFINE([ENABLE_INTROSPECTION], [1], [enable GObject introspection support])
159 AC_SUBST([G_IR_SCANNER], [$($PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0)])
160 AC_SUBST([G_IR_COMPILER], [$($PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0)])
161 AC_SUBST([G_IR_GENERATE], [$($PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0)])
162 AC_SUBST([GIRDIR], [$($PKG_CONFIG --define-variable=datadir=${datadir} --variable=girdir gobject-introspection-1.0)])
163 AC_SUBST([GIRTYPELIBDIR], [$($PKG_CONFIG --define-variable=libdir=${libdir} --variable=typelibdir gobject-introspection-1.0)])
165 AM_CONDITIONAL([ENABLE_INTROSPECTION], [test "x$enable_introspection" = xyes])
167 AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = xyes])
169 # ------------------------------------------------------------------------------
170 # keymap - map custom hardware's multimedia keys
171 # ------------------------------------------------------------------------------
172 AC_ARG_ENABLE([keymap],
173 AS_HELP_STRING([--disable-keymap], [disable keymap fixup support]),
174 [], [enable_keymap=yes])
175 if test "x$enable_keymap" = xyes; then
176 AC_PATH_PROG([GPERF], [gperf])
177 if test -z "$GPERF"; then
178 AC_MSG_ERROR([gperf is needed])
181 AC_CHECK_HEADER([linux/input.h], [:], AC_MSG_ERROR([kernel headers not found]))
182 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}')])
184 AM_CONDITIONAL([ENABLE_KEYMAP], [test "x$enable_keymap" = xyes])
186 # ------------------------------------------------------------------------------
187 # create_floppy_devices - historical floppy kernel device nodes (/dev/fd0h1440, ...)
188 # ------------------------------------------------------------------------------
189 AC_ARG_ENABLE([floppy],
190 AS_HELP_STRING([--enable-floppy], [enable legacy floppy support]),
191 [], [enable_floppy=no])
192 AM_CONDITIONAL([ENABLE_FLOPPY], [test "x$enable_floppy" = xyes])
194 # ------------------------------------------------------------------------------
195 # edd_id - create /dev/disk/by-id/edd-* links for BIOS EDD data
196 # ------------------------------------------------------------------------------
198 AS_HELP_STRING([--enable-edd], [enable disk edd support]),
200 AM_CONDITIONAL([ENABLE_EDD], [test "x$enable_edd" = xyes])
202 AC_CONFIG_HEADERS(config.h)
207 init/udev-trigger.service
208 init/udev-settle.service
210 libudev/docs/Makefile
211 libudev/docs/version.xml
212 extras/gudev/gudev-1.0.pc
213 extras/gudev/docs/Makefile
214 extras/gudev/docs/version.xml
223 sysconfdir: ${sysconfdir}
226 rootlibdir: ${rootlib_execdir}
227 libexecdir: ${libexecdir}
229 datarootdir: ${datarootdir}
231 includedir: ${includedir}
233 include_prefix: ${INCLUDE_PREFIX}
235 systemdsystemunitdir: ${systemdsystemunitdir}
237 logging: ${enable_logging}
238 debug: ${enable_debug}
239 selinux: ${with_selinux}
245 rule_generator: ${enable_rule_generator}
247 udev_acl: ${enable_udev_acl}
248 gudev: ${enable_gudev}
249 gintrospection: ${enable_introspection}
250 keymap: ${enable_keymap}
251 floppy: ${enable_floppy}
254 usb.ids: ${USB_DATABASE}
255 pci.ids: ${PCI_DATABASE}
256 firmware path: ${FIRMWARE_PATH}
258 xsltproc: ${XSLTPROC}