1 AC_INIT([udev], [143], [linux-hotplug@vger.kernel.org])
3 AM_INIT_AUTOMAKE([check-news foreign 1.9 dist-bzip2])
5 AC_USE_SYSTEM_EXTENSIONS
8 AC_CONFIG_MACRO_DIR([m4])
11 AC_PREFIX_DEFAULT([/usr])
12 AC_PATH_PROG([XSLTPROC], [xsltproc])
14 AC_ARG_WITH([rootlibdir],
15 AS_HELP_STRING([--with-rootlibdir=DIR], [rootfs directory to install shared libraries]),
16 [], [with_rootlibdir=$libdir])
17 AC_SUBST([rootlibdir], [$with_rootlibdir])
19 AC_ARG_WITH([selinux],
20 AS_HELP_STRING([--with-selinux], [enable SELinux support]),
21 [], [with_selinux=no])
22 if test "x$with_selinux" = xyes; then
24 AC_CHECK_LIB(selinux, getprevcon,
26 AC_MSG_ERROR([SELinux selected but libselinux not found]))
28 SELINUX_LIBS="-lselinux -lsepol"
29 AC_DEFINE(WITH_SELINUX, [1] ,[SELinux support.])
31 AC_SUBST([SELINUX_LIBS])
32 AM_CONDITIONAL(WITH_SELINUX, [test "x$with_selinux" = xyes])
34 AC_ARG_ENABLE([debug],
35 AS_HELP_STRING([--enable-debug], [enable debug messages]),
36 [], [enable_debug=no])
37 if test "x$enable_debug" = "xyes"; then
38 AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
41 AC_ARG_ENABLE([logging],
42 AS_HELP_STRING([--disable-logging], [disable system logging]),
43 [], enable_logging=yes)
44 if test "x$enable_logging" = "xyes"; then
45 AC_DEFINE(ENABLE_LOGGING, [1], [System logging.])
48 AC_ARG_ENABLE([extras],
49 AS_HELP_STRING([--disable-extras], [disable extras with external dependencies]),
50 [], [enable_extras=yes])
51 if test "x$enable_extras" = xyes; then
52 PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.7.0 gobject-2.0 >= 2.7.0])
53 AC_SUBST([GLIB_CFLAGS])
56 AC_CHECK_LIB([acl], [acl_init], [:], AC_MSG_ERROR([libacl not found]))
57 AC_CHECK_HEADER([acl/libacl.h], [:], AC_MSG_ERROR([libacl header not found]))
59 PKG_CHECK_MODULES(LIBUSB, libusb >= 0.1.12)
60 AC_SUBST(LIBUSB_CFLAGS)
63 PKG_CHECK_MODULES(USBUTILS, usbutils >= 0.82)
64 AC_SUBST([USB_DATABASE], [$($PKG_CONFIG --variable=usbids usbutils)])
66 AC_CHECK_FILES([/usr/share/pci.ids], [pciids=/usr/share/pci.ids])
67 AC_CHECK_FILES([/usr/share/hwdata/pci.ids], [pciids=/usr/share/hwdata/pci.ids])
68 AC_CHECK_FILES([/usr/share/misc/pci.ids], [pciids=/usr/share/misc/pci.ids])
69 AC_ARG_WITH(pci-ids-path,
70 AS_HELP_STRING([--pci-ids-path=DIR], [Path to pci.ids file]),
71 [PCI_DATABASE=${withval}],
72 [if test -n "$pciids" ; then
73 PCI_DATABASE="$pciids"
75 AC_MSG_ERROR([pci.ids not found, try --with-pci-ids-path=])
77 AC_SUBST(PCI_DATABASE)
79 AM_CONDITIONAL([ENABLE_EXTRAS], [test "x$enable_extras" = xyes])
81 AC_ARG_ENABLE([introspection],
82 AS_HELP_STRING([--enable-introspection], [enable GObject introspection]),
83 [], [enable_introspection=no])
84 if test "x$enable_introspection" = xyes; then
85 PKG_CHECK_MODULES([INTROSPECTION], [gobject-introspection-1.0 >= 0.6.2])
86 AC_DEFINE([ENABLE_INTROSPECTION], [1], [enable GObject introspection support])
87 AC_SUBST([G_IR_SCANNER], [$($PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0)])
88 AC_SUBST([G_IR_COMPILER], [$($PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0)])
89 AC_SUBST([G_IR_GENERATE], [$($PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0)])
90 AC_SUBST([GIRDIR], [$($PKG_CONFIG --variable=girdir gobject-introspection-1.0)])
91 AC_SUBST([GIRTYPELIBDIR], [$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)])
93 AM_CONDITIONAL([ENABLE_INTROSPECTION], [test "x$enable_introspection" = xyes])
95 AC_CONFIG_HEADERS(config.h)
100 libudev/docs/Makefile
101 libudev/docs/version.xml
105 extras/ata_id/Makefile
106 extras/cdrom_id/Makefile
107 extras/edd_id/Makefile
108 extras/path_id/Makefile
109 extras/firmware/Makefile
110 extras/collect/Makefile
111 extras/floppy/Makefile
112 extras/fstab_import/Makefile
113 extras/rule_generator/Makefile
114 extras/scsi_id/Makefile
115 extras/usb_id/Makefile
116 extras/v4l_id/Makefile
117 extras/hid2hci/Makefile
118 extras/udev-acl/Makefile
119 extras/usb-db/Makefile
120 extras/gudev/Makefile
121 extras/gudev/gudev-1.0.pc
122 extras/gudev/docs/Makefile
123 extras/gudev/docs/version.xml
132 sysconfdir: ${sysconfdir}
135 rootlibdir: ${rootlibdir}
136 libexecdir: ${libexecdir}
138 datarootdir: ${datarootdir}
140 includedir: ${includedir}
142 logging: ${enable_logging}
143 debug: ${enable_debug}
144 selinux: ${with_selinux}
150 extras: ${enable_extras}
151 gintrospection: ${enable_introspection}
153 usb.ids: ${USB_DATABASE}
154 pci.ids: ${PCI_DATABASE}
156 xsltproc: ${XSLTPROC}