1 AC_INIT([udev], [170], [linux-hotplug@vger.kernel.org])
3 AM_INIT_AUTOMAKE([check-news foreign 1.10 dist-bzip2 subdir-objects])
4 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
6 AC_USE_SYSTEM_EXTENSIONS
8 AC_CONFIG_MACRO_DIR([m4])
12 AC_PREFIX_DEFAULT([/usr])
13 AC_PATH_PROG([XSLTPROC], [xsltproc])
15 AC_SEARCH_LIBS([clock_gettime], [rt], [], [AC_MSG_ERROR([POSIX RT library not found])])
17 AC_ARG_WITH([rootlibdir],
18 AS_HELP_STRING([--with-rootlibdir=DIR], [rootfs directory to install shared libraries]),
19 [], [with_rootlibdir=$libdir])
20 AC_SUBST([rootlib_execdir], [$with_rootlibdir])
22 AC_ARG_WITH([selinux],
23 AS_HELP_STRING([--with-selinux], [enable SELinux support]),
24 [], [with_selinux=no])
25 if test "x$with_selinux" = xyes; then
27 AC_CHECK_LIB(selinux, getprevcon,
29 AC_MSG_ERROR([SELinux selected but libselinux not found]))
31 SELINUX_LIBS="-lselinux -lsepol"
32 AC_DEFINE(WITH_SELINUX, [1] ,[SELinux support.])
34 AC_SUBST([SELINUX_LIBS])
35 AM_CONDITIONAL(WITH_SELINUX, [test "x$with_selinux" = xyes])
37 AC_ARG_ENABLE([debug],
38 AS_HELP_STRING([--enable-debug], [enable debug messages]),
39 [], [enable_debug=no])
40 if test "x$enable_debug" = "xyes"; then
41 AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
44 AC_ARG_ENABLE([logging],
45 AS_HELP_STRING([--disable-logging], [disable system logging]),
46 [], enable_logging=yes)
47 if test "x$enable_logging" = "xyes"; then
48 AC_DEFINE(ENABLE_LOGGING, [1], [System logging.])
51 AC_ARG_WITH(firmware-path,
52 AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]],
53 [Firmware search path (default=/lib/firmware/updates:/lib/firmware)]),
54 [], [with_firmware_path="/lib/firmware/updates:/lib/firmware"])
57 for i in $with_firmware_path; do
58 if test "x${FIRMWARE_PATH}" = "x"; then
59 FIRMWARE_PATH="\\\"${i}/\\\""
61 FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\""
65 AC_SUBST([FIRMWARE_PATH], [$FIRMWARE_PATH])
67 AC_ARG_WITH([systemdsystemunitdir],
68 AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
69 [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
70 if test "x$with_systemdsystemunitdir" != xno; then
71 AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
73 AM_CONDITIONAL(WITH_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
75 # ------------------------------------------------------------------------------
76 # rule_generator - persistent network and optical device rule generator
77 # ------------------------------------------------------------------------------
78 AC_ARG_ENABLE([rule_generator],
79 AS_HELP_STRING([--disable-rule_generator], [disable persistent network, cdrom support]),
80 [], [enable_rule_generator=yes])
81 AM_CONDITIONAL([ENABLE_RULE_GENERATOR], [test "x$enable_rule_generator" = xyes])
83 # ------------------------------------------------------------------------------
84 # usb/pci-db - read vendor/device string database
85 # ------------------------------------------------------------------------------
87 AS_HELP_STRING([--disable-hwdb], [disable hardware database support]),
88 [], [enable_hwdb=yes])
89 if test "x$enable_hwdb" = xyes; then
90 if test "x$cross_compiling" = "xno" ; then
91 AC_CHECK_FILES([/usr/share/pci.ids], [pciids=/usr/share/pci.ids])
92 AC_CHECK_FILES([/usr/share/hwdata/pci.ids], [pciids=/usr/share/hwdata/pci.ids])
93 AC_CHECK_FILES([/usr/share/misc/pci.ids], [pciids=/usr/share/misc/pci.ids])
96 AC_ARG_WITH(usb-ids-path,
97 [AS_HELP_STRING([--with-usb-ids-path=DIR], [Path to usb.ids file])],
98 [USB_DATABASE=${withval}],
99 [if test -n "$usbids" ; then
100 USB_DATABASE="$usbids"
102 PKG_CHECK_MODULES(USBUTILS, usbutils >= 0.82)
103 AC_SUBST([USB_DATABASE], [$($PKG_CONFIG --variable=usbids usbutils)])
105 AC_MSG_CHECKING([for USB database location])
106 AC_MSG_RESULT([$USB_DATABASE])
107 AC_SUBST(USB_DATABASE)
109 AC_ARG_WITH(pci-ids-path,
110 [AS_HELP_STRING([--with-pci-ids-path=DIR], [Path to pci.ids file])],
111 [PCI_DATABASE=${withval}],
112 [if test -n "$pciids" ; then
113 PCI_DATABASE="$pciids"
115 AC_MSG_ERROR([pci.ids not found, try --with-pci-ids-path=])
117 AC_MSG_CHECKING([for PCI database location])
118 AC_MSG_RESULT([$PCI_DATABASE])
119 AC_SUBST(PCI_DATABASE)
121 AM_CONDITIONAL([ENABLE_HWDB], [test "x$enable_hwdb" = xyes])
123 # ------------------------------------------------------------------------------
124 # udev_acl - apply ACLs for users with local forground sessions
125 # ------------------------------------------------------------------------------
126 AC_ARG_ENABLE([udev_acl],
127 AS_HELP_STRING([--disable-udev_acl], [disable local user acl permissions support]),
128 [], [enable_udev_acl=yes])
129 if test "x$enable_udev_acl" = xyes; then
130 AC_CHECK_LIB([acl], [acl_init], [:], AC_MSG_ERROR([libacl not found]))
131 AC_CHECK_HEADER([acl/libacl.h], [:], AC_MSG_ERROR([libacl header not found]))
133 PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.22.0 gobject-2.0 >= 2.22.0])
134 AC_SUBST([GLIB_CFLAGS])
135 AC_SUBST([GLIB_LIBS])
137 AM_CONDITIONAL([ENABLE_UDEV_ACL], [test "x$enable_udev_acl" = xyes])
139 # ------------------------------------------------------------------------------
140 # GUdev - libudev gobject interface
141 # ------------------------------------------------------------------------------
142 AC_ARG_ENABLE([gudev],
143 AS_HELP_STRING([--disable-gudev], [disable Gobject libudev support]),
144 [], [enable_gudev=yes])
145 if test "x$enable_gudev" = xyes; then
146 PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.22.0 gobject-2.0 >= 2.22.0])
147 AC_SUBST([GLIB_CFLAGS])
148 AC_SUBST([GLIB_LIBS])
151 AC_ARG_ENABLE([introspection],
152 AS_HELP_STRING([--disable-introspection], [disable GObject introspection]),
153 [], [enable_introspection=yes])
154 if test "x$enable_introspection" = xyes; then
155 PKG_CHECK_MODULES([INTROSPECTION], [gobject-introspection-1.0 >= 0.6.2])
156 AC_DEFINE([ENABLE_INTROSPECTION], [1], [enable GObject introspection support])
157 AC_SUBST([G_IR_SCANNER], [$($PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0)])
158 AC_SUBST([G_IR_COMPILER], [$($PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0)])
159 AC_SUBST([G_IR_GENERATE], [$($PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0)])
160 AC_SUBST([GIRDIR], [$($PKG_CONFIG --define-variable=datadir=${datadir} --variable=girdir gobject-introspection-1.0)])
161 AC_SUBST([GIRTYPELIBDIR], [$($PKG_CONFIG --define-variable=libdir=${libdir} --variable=typelibdir gobject-introspection-1.0)])
163 AM_CONDITIONAL([ENABLE_INTROSPECTION], [test "x$enable_introspection" = xyes])
165 AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = xyes])
167 # ------------------------------------------------------------------------------
168 # keymap - map custom hardware's multimedia keys
169 # ------------------------------------------------------------------------------
170 AC_ARG_ENABLE([keymap],
171 AS_HELP_STRING([--disable-keymap], [disable keymap fixup support]),
172 [], [enable_keymap=yes])
173 if test "x$enable_keymap" = xyes; then
174 AC_PATH_PROG([GPERF], [gperf])
175 if test -z "$GPERF"; then
176 AC_MSG_ERROR([gperf is needed])
179 AC_CHECK_HEADER([linux/input.h], [:], AC_MSG_ERROR([kernel headers not found]))
180 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}')])
182 AM_CONDITIONAL([ENABLE_KEYMAP], [test "x$enable_keymap" = xyes])
184 # ------------------------------------------------------------------------------
185 # create_floppy_devices - historical floppy kernel device nodes (/dev/fd0h1440, ...)
186 # ------------------------------------------------------------------------------
187 AC_ARG_ENABLE([floppy],
188 AS_HELP_STRING([--enable-floppy], [enable legacy floppy support]),
189 [], [enable_floppy=no])
190 AM_CONDITIONAL([ENABLE_FLOPPY], [test "x$enable_floppy" = xyes])
192 # ------------------------------------------------------------------------------
193 # edd_id - create /dev/disk/by-id/edd-* links for BIOS EDD data
194 # ------------------------------------------------------------------------------
196 AS_HELP_STRING([--enable-edd], [enable disk edd support]),
198 AM_CONDITIONAL([ENABLE_EDD], [test "x$enable_edd" = xyes])
200 # ------------------------------------------------------------------------------
201 # mobile-action-modeswitch - switch Mobile Action cables into serial mode
202 # ------------------------------------------------------------------------------
203 AC_ARG_ENABLE([action_modeswitch],
204 AS_HELP_STRING([--enable-action_modeswitch], [enable action modeswitch support]),
205 [], [enable_action_modeswitch=no])
206 if test "x$enable_action_modeswitch" = xyes; then
207 PKG_CHECK_MODULES(LIBUSB, libusb >= 0.1.12)
208 AC_SUBST(LIBUSB_CFLAGS)
209 AC_SUBST(LIBUSB_LIBS)
211 AM_CONDITIONAL([ENABLE_ACTION_MODESWITCH], [test "x$enable_action_modeswitch" = xyes])
213 AC_CONFIG_HEADERS(config.h)
218 init/udev-trigger.service
219 init/udev-settle.service
221 libudev/docs/Makefile
222 libudev/docs/version.xml
223 extras/gudev/gudev-1.0.pc
224 extras/gudev/docs/Makefile
225 extras/gudev/docs/version.xml
234 sysconfdir: ${sysconfdir}
237 rootlibdir: ${rootlib_execdir}
238 libexecdir: ${libexecdir}
240 datarootdir: ${datarootdir}
242 includedir: ${includedir}
244 include_prefix: ${INCLUDE_PREFIX}
246 systemdsystemunitdir: ${systemdsystemunitdir}
248 logging: ${enable_logging}
249 debug: ${enable_debug}
250 selinux: ${with_selinux}
256 rule_generator: ${enable_rule_generator}
258 udev_acl: ${enable_udev_acl}
259 gudev: ${enable_gudev}
260 gintrospection: ${enable_introspection}
261 keymap: ${enable_keymap}
262 floppy: ${enable_floppy}
264 action_modeswitch: ${enable_action_modeswitch}
266 usb.ids: ${USB_DATABASE}
267 pci.ids: ${PCI_DATABASE}
268 firmware path: ${FIRMWARE_PATH}
270 xsltproc: ${XSLTPROC}