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