]>
Commit | Line | Data |
---|---|---|
01618658 | 1 | AC_PREREQ(2.60) |
5671bdef | 2 | AC_INIT([udev], |
3b2e525a | 3 | [181], |
912541b0 KS |
4 | [linux-hotplug@vger.kernel.org], |
5 | [udev], | |
6 | [http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html]) | |
ad29a9f1 | 7 | AC_CONFIG_SRCDIR([src/udevd.c]) |
5671bdef | 8 | AC_CONFIG_AUX_DIR([build-aux]) |
95de03a7 | 9 | AM_INIT_AUTOMAKE([check-news foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects]) |
45a1dbba | 10 | AC_USE_SYSTEM_EXTENSIONS |
01618658 | 11 | AC_SYS_LARGEFILE |
03733b04 | 12 | AC_CONFIG_MACRO_DIR([m4]) |
5671bdef | 13 | AM_SILENT_RULES([yes]) |
6dd19db5 | 14 | LT_INIT([disable-static]) |
2417dc20 | 15 | AC_PROG_AWK |
28e490c9 KS |
16 | AC_PROG_SED |
17 | AC_PROG_MKDIR_P | |
26812f0a | 18 | GTK_DOC_CHECK(1.10) |
109d1145 | 19 | AC_PREFIX_DEFAULT([/usr]) |
9e4e44e5 | 20 | |
01618658 | 21 | AC_PATH_PROG([XSLTPROC], [xsltproc]) |
9e4e44e5 | 22 | AM_CONDITIONAL(HAVE_XSLTPROC, test x"$XSLTPROC" != x) |
01618658 | 23 | |
9c6a11b1 | 24 | AC_SEARCH_LIBS([clock_gettime], [rt], [], [AC_MSG_ERROR([POSIX RT library not found])]) |
3cf5266b | 25 | |
b45ce692 | 26 | PKG_CHECK_MODULES(BLKID, blkid >= 2.20) |
3cf5266b | 27 | |
96b2eef2 | 28 | PKG_CHECK_MODULES(KMOD, libkmod >= 5) |
9c6a11b1 | 29 | |
3cf5266b | 30 | if test "x$cross_compiling" = "xno" ; then |
912541b0 KS |
31 | AC_CHECK_FILES([/usr/share/pci.ids], [pciids=/usr/share/pci.ids]) |
32 | AC_CHECK_FILES([/usr/share/hwdata/pci.ids], [pciids=/usr/share/hwdata/pci.ids]) | |
33 | AC_CHECK_FILES([/usr/share/misc/pci.ids], [pciids=/usr/share/misc/pci.ids]) | |
3cf5266b KS |
34 | fi |
35 | ||
36 | AC_ARG_WITH(usb-ids-path, | |
912541b0 KS |
37 | [AS_HELP_STRING([--with-usb-ids-path=DIR], [Path to usb.ids file])], |
38 | [USB_DATABASE=${withval}], | |
39 | [if test -n "$usbids" ; then | |
40 | USB_DATABASE="$usbids" | |
41 | else | |
42 | PKG_CHECK_MODULES(USBUTILS, usbutils >= 0.82) | |
43 | AC_SUBST([USB_DATABASE], [$($PKG_CONFIG --variable=usbids usbutils)]) | |
44 | fi]) | |
3cf5266b KS |
45 | AC_MSG_CHECKING([for USB database location]) |
46 | AC_MSG_RESULT([$USB_DATABASE]) | |
47 | AC_SUBST(USB_DATABASE) | |
48 | ||
49 | AC_ARG_WITH(pci-ids-path, | |
912541b0 KS |
50 | [AS_HELP_STRING([--with-pci-ids-path=DIR], [Path to pci.ids file])], |
51 | [PCI_DATABASE=${withval}], | |
52 | [if test -n "$pciids" ; then | |
53 | PCI_DATABASE="$pciids" | |
54 | else | |
55 | AC_MSG_ERROR([pci.ids not found, try --with-pci-ids-path=]) | |
56 | fi]) | |
3cf5266b KS |
57 | AC_MSG_CHECKING([for PCI database location]) |
58 | AC_MSG_RESULT([$PCI_DATABASE]) | |
59 | AC_SUBST(PCI_DATABASE) | |
60 | ||
dd8a93e0 | 61 | AC_ARG_WITH([rootprefix], |
912541b0 KS |
62 | AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]), |
63 | [], [with_rootprefix=${ac_default_prefix}]) | |
dd8a93e0 KS |
64 | AC_SUBST([rootprefix], [$with_rootprefix]) |
65 | ||
6133f343 | 66 | AC_ARG_WITH([rootlibdir], |
912541b0 KS |
67 | AS_HELP_STRING([--with-rootlibdir=DIR], [rootfs directory to install shared libraries]), |
68 | [], [with_rootlibdir=$libdir]) | |
182c9b15 | 69 | AC_SUBST([rootlib_execdir], [$with_rootlibdir]) |
01618658 | 70 | |
6133f343 | 71 | AC_ARG_WITH([selinux], |
912541b0 KS |
72 | AS_HELP_STRING([--with-selinux], [enable SELinux support]), |
73 | [], [with_selinux=no]) | |
6a90a512 | 74 | AS_IF([test "x$with_selinux" = "xyes"], [ |
912541b0 KS |
75 | LIBS_save=$LIBS |
76 | AC_CHECK_LIB(selinux, getprevcon, | |
77 | [], | |
78 | AC_MSG_ERROR([SELinux selected but libselinux not found])) | |
79 | LIBS=$LIBS_save | |
80 | SELINUX_LIBS="-lselinux -lsepol" | |
81 | AC_DEFINE(WITH_SELINUX, [1] ,[SELinux support.]) | |
6a90a512 | 82 | ]) |
01618658 | 83 | AC_SUBST([SELINUX_LIBS]) |
6a90a512 | 84 | AM_CONDITIONAL(WITH_SELINUX, [test "x$with_selinux" = "xyes"]) |
01618658 | 85 | |
6133f343 | 86 | AC_ARG_ENABLE([debug], |
912541b0 KS |
87 | AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]), |
88 | [], [enable_debug=no]) | |
6a90a512 | 89 | AS_IF([test "x$enable_debug" = "xyes"], [ AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.]) ]) |
01618658 | 90 | |
6133f343 | 91 | AC_ARG_ENABLE([logging], |
912541b0 KS |
92 | AS_HELP_STRING([--disable-logging], [disable system logging @<:@default=enabled@:>@]), |
93 | [], enable_logging=yes) | |
6a90a512 | 94 | AS_IF([test "x$enable_logging" = "xyes"], [ AC_DEFINE(ENABLE_LOGGING, [1], [System logging.]) ]) |
01618658 | 95 | |
0c6a3f48 | 96 | AC_ARG_WITH(firmware-path, |
912541b0 | 97 | AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]], |
46d4274b | 98 | [Firmware search path (default=ROOTPREFIX/lib/firmware/updates:ROOTPREFIX/lib/firmware)]), |
912541b0 | 99 | [], [with_firmware_path="$rootprefix/lib/firmware/updates:$rootprefix/lib/firmware"]) |
0c6a3f48 RW |
100 | OLD_IFS=$IFS |
101 | IFS=: | |
d5d6a7f3 | 102 | for i in $with_firmware_path; do |
912541b0 KS |
103 | if test "x${FIRMWARE_PATH}" = "x"; then |
104 | FIRMWARE_PATH="\\\"${i}/\\\"" | |
105 | else | |
106 | FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\"" | |
107 | fi | |
0c6a3f48 RW |
108 | done |
109 | IFS=$OLD_IFS | |
110 | AC_SUBST([FIRMWARE_PATH], [$FIRMWARE_PATH]) | |
111 | ||
08b4c883 | 112 | AC_ARG_WITH([systemdsystemunitdir], |
912541b0 KS |
113 | AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]), |
114 | [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]) | |
6a90a512 KS |
115 | AS_IF([test "x$with_systemdsystemunitdir" != "xno"], [ AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) ]) |
116 | AM_CONDITIONAL(WITH_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != "xno" ]) | |
08b4c883 | 117 | |
d5d6a7f3 | 118 | # ------------------------------------------------------------------------------ |
e3c14a7f | 119 | # GUdev - libudev gobject interface |
d5d6a7f3 | 120 | # ------------------------------------------------------------------------------ |
e3c14a7f | 121 | AC_ARG_ENABLE([gudev], |
912541b0 KS |
122 | AS_HELP_STRING([--disable-gudev], [disable Gobject libudev support @<:@default=enabled@:>@]), |
123 | [], [enable_gudev=yes]) | |
6a90a512 | 124 | AS_IF([test "x$enable_gudev" = "xyes"], [ PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.22.0 gobject-2.0 >= 2.22.0]) ]) |
ccba91c7 | 125 | |
e3c14a7f | 126 | AC_ARG_ENABLE([introspection], |
912541b0 KS |
127 | AS_HELP_STRING([--disable-introspection], [disable GObject introspection @<:@default=enabled@:>@]), |
128 | [], [enable_introspection=yes]) | |
6a90a512 | 129 | AS_IF([test "x$enable_introspection" = "xyes"], [ |
912541b0 KS |
130 | PKG_CHECK_MODULES([INTROSPECTION], [gobject-introspection-1.0 >= 0.6.2]) |
131 | AC_DEFINE([ENABLE_INTROSPECTION], [1], [enable GObject introspection support]) | |
132 | AC_SUBST([G_IR_SCANNER], [$($PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0)]) | |
133 | AC_SUBST([G_IR_COMPILER], [$($PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0)]) | |
134 | AC_SUBST([G_IR_GENERATE], [$($PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0)]) | |
135 | AC_SUBST([GIRDIR], [$($PKG_CONFIG --define-variable=datadir=${datadir} --variable=girdir gobject-introspection-1.0)]) | |
136 | AC_SUBST([GIRTYPELIBDIR], [$($PKG_CONFIG --define-variable=libdir=${libdir} --variable=typelibdir gobject-introspection-1.0)]) | |
6a90a512 KS |
137 | ]) |
138 | AM_CONDITIONAL([ENABLE_INTROSPECTION], [test "x$enable_introspection" = "xyes"]) | |
139 | AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"]) | |
4fb27017 | 140 | |
d5d6a7f3 KS |
141 | # ------------------------------------------------------------------------------ |
142 | # keymap - map custom hardware's multimedia keys | |
143 | # ------------------------------------------------------------------------------ | |
144 | AC_ARG_ENABLE([keymap], | |
912541b0 KS |
145 | AS_HELP_STRING([--disable-keymap], [disable keymap fixup support @<:@default=enabled@:>@]), |
146 | [], [enable_keymap=yes]) | |
6a90a512 | 147 | AS_IF([test "x$enable_keymap" = "xyes"], [ |
912541b0 KS |
148 | AC_PATH_PROG([GPERF], [gperf]) |
149 | if test -z "$GPERF"; then | |
150 | AC_MSG_ERROR([gperf is needed]) | |
151 | fi | |
d5d6a7f3 | 152 | |
912541b0 KS |
153 | AC_CHECK_HEADER([linux/input.h], [:], AC_MSG_ERROR([kernel headers not found])) |
154 | 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}')]) | |
6a90a512 KS |
155 | ]) |
156 | AM_CONDITIONAL([ENABLE_KEYMAP], [test "x$enable_keymap" = "xyes"]) | |
d5d6a7f3 | 157 | |
e3c14a7f KS |
158 | # ------------------------------------------------------------------------------ |
159 | # mtd_probe - autoloads FTL module for mtd devices | |
160 | # ------------------------------------------------------------------------------ | |
161 | AC_ARG_ENABLE([mtd_probe], | |
912541b0 KS |
162 | AS_HELP_STRING([--disable-mtd_probe], [disable MTD support @<:@default=enabled@:>@]), |
163 | [], [enable_mtd_probe=yes]) | |
6a90a512 | 164 | AM_CONDITIONAL([ENABLE_MTD_PROBE], [test "x$enable_mtd_probe" = "xyes"]) |
e3c14a7f KS |
165 | |
166 | # ------------------------------------------------------------------------------ | |
167 | # rule_generator - persistent network and optical device rule generator | |
168 | # ------------------------------------------------------------------------------ | |
169 | AC_ARG_ENABLE([rule_generator], | |
912541b0 KS |
170 | AS_HELP_STRING([--enable-rule_generator], [enable persistent network + cdrom links support @<:@default=disabled@:>@]), |
171 | [], [enable_rule_generator=no]) | |
6a90a512 | 172 | AM_CONDITIONAL([ENABLE_RULE_GENERATOR], [test "x$enable_rule_generator" = "xyes"]) |
e3c14a7f | 173 | |
c874e22e KS |
174 | # ------------------------------------------------------------------------------ |
175 | # udev_acl - apply ACLs for users with local forground sessions | |
176 | # ------------------------------------------------------------------------------ | |
177 | AC_ARG_ENABLE([udev_acl], | |
912541b0 KS |
178 | AS_HELP_STRING([--enable-udev_acl], [enable local user acl permissions support @<:@default=disabled@:>@]), |
179 | [], [enable_udev_acl=no]) | |
6a90a512 | 180 | AS_IF([test "x$enable_udev_acl" = "xyes"], [ |
912541b0 KS |
181 | AC_CHECK_LIB([acl], [acl_init], [:], AC_MSG_ERROR([libacl not found])) |
182 | AC_CHECK_HEADER([acl/libacl.h], [:], AC_MSG_ERROR([libacl header not found])) | |
c874e22e | 183 | |
912541b0 | 184 | PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.22.0 gobject-2.0 >= 2.22.0]) |
6a90a512 KS |
185 | ]) |
186 | AM_CONDITIONAL([ENABLE_UDEV_ACL], [test "x$enable_udev_acl" = "xyes"]) | |
c874e22e | 187 | |
d5d6a7f3 KS |
188 | # ------------------------------------------------------------------------------ |
189 | # create_floppy_devices - historical floppy kernel device nodes (/dev/fd0h1440, ...) | |
190 | # ------------------------------------------------------------------------------ | |
191 | AC_ARG_ENABLE([floppy], | |
912541b0 KS |
192 | AS_HELP_STRING([--enable-floppy], [enable legacy floppy support @<:@default=disabled@:>@]), |
193 | [], [enable_floppy=no]) | |
6a90a512 | 194 | AM_CONDITIONAL([ENABLE_FLOPPY], [test "x$enable_floppy" = "xyes"]) |
d5d6a7f3 KS |
195 | |
196 | # ------------------------------------------------------------------------------ | |
197 | # edd_id - create /dev/disk/by-id/edd-* links for BIOS EDD data | |
198 | # ------------------------------------------------------------------------------ | |
199 | AC_ARG_ENABLE([edd], | |
912541b0 KS |
200 | AS_HELP_STRING([--enable-edd], [enable disk edd support @<:@default=disabled@:>@]), |
201 | [], [enable_edd=no]) | |
6a90a512 | 202 | AM_CONDITIONAL([ENABLE_EDD], [test "x$enable_edd" = "xyes"]) |
d5d6a7f3 | 203 | |
f71a5581 KS |
204 | my_CFLAGS="-Wall \ |
205 | -Wmissing-declarations -Wmissing-prototypes \ | |
206 | -Wnested-externs -Wpointer-arith \ | |
207 | -Wpointer-arith -Wsign-compare -Wchar-subscripts \ | |
208 | -Wstrict-prototypes -Wshadow \ | |
209 | -Wformat-security -Wtype-limits" | |
210 | AC_SUBST([my_CFLAGS]) | |
211 | ||
01618658 KS |
212 | AC_CONFIG_HEADERS(config.h) |
213 | AC_CONFIG_FILES([ | |
912541b0 KS |
214 | Makefile |
215 | src/docs/Makefile | |
216 | src/docs/version.xml | |
217 | src/extras/gudev/docs/Makefile | |
218 | src/extras/gudev/docs/version.xml | |
01618658 | 219 | ]) |
01618658 | 220 | |
cb0237d7 KS |
221 | AC_OUTPUT |
222 | AC_MSG_RESULT([ | |
912541b0 KS |
223 | $PACKAGE $VERSION |
224 | ======== | |
01618658 | 225 | |
912541b0 KS |
226 | prefix: ${prefix} |
227 | rootprefix: ${rootprefix} | |
228 | sysconfdir: ${sysconfdir} | |
229 | bindir: ${bindir} | |
230 | libdir: ${libdir} | |
231 | rootlibdir: ${rootlib_execdir} | |
232 | libexecdir: ${libexecdir} | |
233 | datarootdir: ${datarootdir} | |
234 | mandir: ${mandir} | |
235 | includedir: ${includedir} | |
236 | include_prefix: ${INCLUDE_PREFIX} | |
237 | systemdsystemunitdir: ${systemdsystemunitdir} | |
238 | firmware path: ${FIRMWARE_PATH} | |
239 | usb.ids: ${USB_DATABASE} | |
240 | pci.ids: ${PCI_DATABASE} | |
01618658 | 241 | |
912541b0 KS |
242 | compiler: ${CC} |
243 | cflags: ${CFLAGS} | |
244 | ldflags: ${LDFLAGS} | |
245 | xsltproc: ${XSLTPROC} | |
246 | gperf: ${GPERF} | |
e3c14a7f | 247 | |
912541b0 KS |
248 | logging: ${enable_logging} |
249 | debug: ${enable_debug} | |
250 | selinux: ${with_selinux} | |
01618658 | 251 | |
912541b0 KS |
252 | gudev: ${enable_gudev} |
253 | gintrospection: ${enable_introspection} | |
254 | keymap: ${enable_keymap} | |
255 | mtd_probe: ${enable_mtd_probe} | |
256 | rule_generator: ${enable_rule_generator} | |
257 | udev_acl: ${enable_udev_acl} | |
258 | floppy: ${enable_floppy} | |
259 | edd: ${enable_edd} | |
cb0237d7 | 260 | ]) |