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