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