chiark / gitweb /
Clear existing inotify watch before processing.
[elogind.git] / configure.ac
1 AC_INIT([udev],
2         [138],
3         [linux-hotplug@vger.kernel.org])
4 AC_PREREQ(2.60)
5 AC_CONFIG_SRCDIR([udev/udevd.c])
6 AM_INIT_AUTOMAKE([check-news foreign 1.9 dist-bzip2])
7 AC_GNU_SOURCE
8 AC_DISABLE_STATIC
9 AC_SYS_LARGEFILE
10 AC_PROG_LIBTOOL
11
12 dnl /* prefix is /usr, exec_prefix is /, if overridden exec_prefix follows prefix */
13 AC_PREFIX_DEFAULT([/usr])
14 test "$prefix" = NONE && test "$exec_prefix" = NONE && exec_prefix=
15
16 dnl /* libudev version */
17 LIBUDEV_LT_CURRENT=0
18 LIBUDEV_LT_REVISION=8
19 LIBUDEV_LT_AGE=0
20 AC_SUBST(LIBUDEV_LT_CURRENT)
21 AC_SUBST(LIBUDEV_LT_REVISION)
22 AC_SUBST(LIBUDEV_LT_AGE)
23
24 dnl /* libvolume_id version */
25 VOLID_LT_CURRENT=1
26 VOLID_LT_REVISION=9
27 VOLID_LT_AGE=0
28 AC_SUBST(VOLID_LT_CURRENT)
29 AC_SUBST(VOLID_LT_REVISION)
30 AC_SUBST(VOLID_LT_AGE)
31
32 AC_PATH_PROG([XSLTPROC], [xsltproc])
33
34 AC_CHECK_LIB(c, inotify_init,
35         [AC_DEFINE([HAVE_INOTIFY], 1, [inotify available])],
36         [AC_MSG_WARN([inotify support disabled])])
37
38 AC_ARG_WITH(udev-prefix,
39         AS_HELP_STRING([--with-udev-prefix=DIR], [add prefix to internal udev path names]),
40         [], [with_udev_prefix='${exec_prefix}'])
41 udev_prefix=$with_udev_prefix
42 AC_SUBST(udev_prefix)
43
44 AC_ARG_WITH(libdir-name,
45         AS_HELP_STRING([--with-libdir-name=DIR], [name of the arch lib directory]),
46         [], [with_libdir_name=lib])
47 libdir_name=$with_libdir_name
48 AC_SUBST(libdir_name)
49
50 AC_ARG_WITH(selinux,
51         AS_HELP_STRING([--with-selinux], [compile with SELinux support]),
52         [], with_selinux=no)
53 if test "x$with_selinux" = xyes; then
54         LIBS_save=$LIBS
55         AC_CHECK_LIB(selinux, getprevcon,
56                 [],
57                 AC_MSG_ERROR([SELinux selected but libselinux not found]))
58         LIBS=$LIBS_save
59         AC_DEFINE(USE_SELINUX, [1] ,[compile with SELinux support])
60         SELINUX_LIBS="-lselinux -lsepol"
61 fi
62 AC_SUBST([SELINUX_LIBS])
63 AM_CONDITIONAL(USE_SELINUX, [test "x$with_selinux" = xyes], [compile with SELinux support])
64
65 AC_ARG_ENABLE(debug,
66         AS_HELP_STRING([--enable-debug], [turn on debugging]),
67         [], enable_debug=no)
68 if test "x$enable_debug" = "xyes"; then
69         AC_DEFINE(DEBUG, [1] ,[Compile in debug messages])
70         DEBUG_CFLAGS="-DDEBUG"
71 fi
72 AC_SUBST(DEBUG_CFLAGS)
73
74 AC_ARG_ENABLE(logging,
75         AS_HELP_STRING([--disable-logging], [turn off logging/syslog]),
76         [], enable_logging=yes)
77 if test "x$enable_logging" != "xno"; then
78         AC_DEFINE(USE_LOG, [1] ,[Use logging/syslog])
79 fi
80
81 AC_CONFIG_HEADERS(config.h)
82 AC_CONFIG_FILES([
83         Makefile
84         udev/Makefile
85         udev/lib/Makefile
86         udev/lib/libudev.pc
87         rules/Makefile
88         extras/Makefile
89         extras/ata_id/Makefile
90         extras/cdrom_id/Makefile
91         extras/edd_id/Makefile
92         extras/path_id/Makefile
93         extras/firmware/Makefile
94         extras/collect/Makefile
95         extras/floppy/Makefile
96         extras/fstab_import/Makefile
97         extras/rule_generator/Makefile
98         extras/scsi_id/Makefile
99         extras/usb_id/Makefile
100         extras/volume_id/Makefile
101         extras/volume_id/lib/Makefile
102         extras/volume_id/lib/libvolume_id.pc
103 ])
104 AC_OUTPUT
105
106 echo "
107         udev $VERSION
108         ========
109
110         prefix:                 ${prefix}
111         exec_prefix:            ${exec_prefix}
112         udev_prefix:            ${udev_prefix}
113         libdir_name:            ${libdir_name}
114         datarootdir:            ${datarootdir}
115         mandir:                 ${mandir}
116         includedir:             ${includedir}
117
118         logging:                ${enable_logging}
119         debug:                  ${enable_debug}
120         selinux:                ${with_selinux}
121
122         compiler:               ${CC}
123         cflags:                 ${CFLAGS}
124         ldflags:                ${LDFLAGS}
125
126         xsltproc:               ${XSLTPROC}
127 "