]> git.ipfire.org Git - thirdparty/systemd.git/blame - configure.ac
release 181
[thirdparty/systemd.git] / configure.ac
CommitLineData
01618658 1AC_PREREQ(2.60)
5671bdef 2AC_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 7AC_CONFIG_SRCDIR([src/udevd.c])
5671bdef 8AC_CONFIG_AUX_DIR([build-aux])
95de03a7 9AM_INIT_AUTOMAKE([check-news foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects])
45a1dbba 10AC_USE_SYSTEM_EXTENSIONS
01618658 11AC_SYS_LARGEFILE
03733b04 12AC_CONFIG_MACRO_DIR([m4])
5671bdef 13AM_SILENT_RULES([yes])
6dd19db5 14LT_INIT([disable-static])
2417dc20 15AC_PROG_AWK
28e490c9
KS
16AC_PROG_SED
17AC_PROG_MKDIR_P
26812f0a 18GTK_DOC_CHECK(1.10)
109d1145 19AC_PREFIX_DEFAULT([/usr])
9e4e44e5 20
01618658 21AC_PATH_PROG([XSLTPROC], [xsltproc])
9e4e44e5 22AM_CONDITIONAL(HAVE_XSLTPROC, test x"$XSLTPROC" != x)
01618658 23
9c6a11b1 24AC_SEARCH_LIBS([clock_gettime], [rt], [], [AC_MSG_ERROR([POSIX RT library not found])])
3cf5266b 25
b45ce692 26PKG_CHECK_MODULES(BLKID, blkid >= 2.20)
3cf5266b 27
96b2eef2 28PKG_CHECK_MODULES(KMOD, libkmod >= 5)
9c6a11b1 29
3cf5266b 30if 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
34fi
35
36AC_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
45AC_MSG_CHECKING([for USB database location])
46AC_MSG_RESULT([$USB_DATABASE])
47AC_SUBST(USB_DATABASE)
48
49AC_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
57AC_MSG_CHECKING([for PCI database location])
58AC_MSG_RESULT([$PCI_DATABASE])
59AC_SUBST(PCI_DATABASE)
60
dd8a93e0 61AC_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
64AC_SUBST([rootprefix], [$with_rootprefix])
65
6133f343 66AC_ARG_WITH([rootlibdir],
912541b0
KS
67 AS_HELP_STRING([--with-rootlibdir=DIR], [rootfs directory to install shared libraries]),
68 [], [with_rootlibdir=$libdir])
182c9b15 69AC_SUBST([rootlib_execdir], [$with_rootlibdir])
01618658 70
6133f343 71AC_ARG_WITH([selinux],
912541b0
KS
72 AS_HELP_STRING([--with-selinux], [enable SELinux support]),
73 [], [with_selinux=no])
6a90a512 74AS_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 83AC_SUBST([SELINUX_LIBS])
6a90a512 84AM_CONDITIONAL(WITH_SELINUX, [test "x$with_selinux" = "xyes"])
01618658 85
6133f343 86AC_ARG_ENABLE([debug],
912541b0
KS
87 AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]),
88 [], [enable_debug=no])
6a90a512 89AS_IF([test "x$enable_debug" = "xyes"], [ AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.]) ])
01618658 90
6133f343 91AC_ARG_ENABLE([logging],
912541b0
KS
92 AS_HELP_STRING([--disable-logging], [disable system logging @<:@default=enabled@:>@]),
93 [], enable_logging=yes)
6a90a512 94AS_IF([test "x$enable_logging" = "xyes"], [ AC_DEFINE(ENABLE_LOGGING, [1], [System logging.]) ])
01618658 95
0c6a3f48 96AC_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
100OLD_IFS=$IFS
101IFS=:
d5d6a7f3 102for 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
108done
109IFS=$OLD_IFS
110AC_SUBST([FIRMWARE_PATH], [$FIRMWARE_PATH])
111
08b4c883 112AC_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
115AS_IF([test "x$with_systemdsystemunitdir" != "xno"], [ AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) ])
116AM_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 121AC_ARG_ENABLE([gudev],
912541b0
KS
122 AS_HELP_STRING([--disable-gudev], [disable Gobject libudev support @<:@default=enabled@:>@]),
123 [], [enable_gudev=yes])
6a90a512 124AS_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 126AC_ARG_ENABLE([introspection],
912541b0
KS
127 AS_HELP_STRING([--disable-introspection], [disable GObject introspection @<:@default=enabled@:>@]),
128 [], [enable_introspection=yes])
6a90a512 129AS_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])
138AM_CONDITIONAL([ENABLE_INTROSPECTION], [test "x$enable_introspection" = "xyes"])
139AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"])
4fb27017 140
d5d6a7f3
KS
141# ------------------------------------------------------------------------------
142# keymap - map custom hardware's multimedia keys
143# ------------------------------------------------------------------------------
144AC_ARG_ENABLE([keymap],
912541b0
KS
145 AS_HELP_STRING([--disable-keymap], [disable keymap fixup support @<:@default=enabled@:>@]),
146 [], [enable_keymap=yes])
6a90a512 147AS_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])
156AM_CONDITIONAL([ENABLE_KEYMAP], [test "x$enable_keymap" = "xyes"])
d5d6a7f3 157
e3c14a7f
KS
158# ------------------------------------------------------------------------------
159# mtd_probe - autoloads FTL module for mtd devices
160# ------------------------------------------------------------------------------
161AC_ARG_ENABLE([mtd_probe],
912541b0
KS
162 AS_HELP_STRING([--disable-mtd_probe], [disable MTD support @<:@default=enabled@:>@]),
163 [], [enable_mtd_probe=yes])
6a90a512 164AM_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# ------------------------------------------------------------------------------
169AC_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 172AM_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# ------------------------------------------------------------------------------
177AC_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 180AS_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])
186AM_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# ------------------------------------------------------------------------------
191AC_ARG_ENABLE([floppy],
912541b0
KS
192 AS_HELP_STRING([--enable-floppy], [enable legacy floppy support @<:@default=disabled@:>@]),
193 [], [enable_floppy=no])
6a90a512 194AM_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# ------------------------------------------------------------------------------
199AC_ARG_ENABLE([edd],
912541b0
KS
200 AS_HELP_STRING([--enable-edd], [enable disk edd support @<:@default=disabled@:>@]),
201 [], [enable_edd=no])
6a90a512 202AM_CONDITIONAL([ENABLE_EDD], [test "x$enable_edd" = "xyes"])
d5d6a7f3 203
f71a5581
KS
204my_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"
210AC_SUBST([my_CFLAGS])
211
01618658
KS
212AC_CONFIG_HEADERS(config.h)
213AC_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
221AC_OUTPUT
222AC_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])