chiark / gitweb /
gudev: fix typo in configure option
[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 GTK_DOC_CHECK(1.10)
13
14 dnl /* prefix is /usr, exec_prefix is /, if overridden exec_prefix follows prefix */
15 AC_PREFIX_DEFAULT([/usr])
16 test "$prefix" = NONE && test "$exec_prefix" = NONE && exec_prefix=
17
18 AC_PATH_PROG([XSLTPROC], [xsltproc])
19
20 AC_ARG_WITH(udev-prefix,
21         AS_HELP_STRING([--with-udev-prefix=DIR], [add prefix to internal udev path names]),
22         [], [with_udev_prefix='${exec_prefix}'])
23 udev_prefix=$with_udev_prefix
24 AC_SUBST(udev_prefix)
25
26 AC_ARG_WITH(libdir-name,
27         AS_HELP_STRING([--with-libdir-name=DIR], [name of the arch lib directory]),
28         [], [with_libdir_name=lib])
29 libdir_name=$with_libdir_name
30 AC_SUBST(libdir_name)
31
32 AC_ARG_WITH(selinux,
33         AS_HELP_STRING([--with-selinux], [enable SELinux support]),
34         [], with_selinux=no)
35 if test "x$with_selinux" = xyes; then
36         LIBS_save=$LIBS
37         AC_CHECK_LIB(selinux, getprevcon,
38                 [],
39                 AC_MSG_ERROR([SELinux selected but libselinux not found]))
40         LIBS=$LIBS_save
41         SELINUX_LIBS="-lselinux -lsepol"
42         AC_DEFINE(WITH_SELINUX, [1] ,[SELinux support.])
43 fi
44 AC_SUBST([SELINUX_LIBS])
45 AM_CONDITIONAL(WITH_SELINUX, [test "x$with_selinux" = xyes])
46
47 AC_ARG_ENABLE(debug,
48         AS_HELP_STRING([--enable-debug], [enable debug messages]),
49         [], enable_debug=no)
50 if test "x$enable_debug" = "xyes"; then
51         AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
52 fi
53
54 AC_ARG_ENABLE(logging,
55         AS_HELP_STRING([--disable-logging], [disable system logging]),
56         [], enable_logging=yes)
57 if test "x$enable_logging" = "xyes"; then
58         AC_DEFINE(ENABLE_LOGGING, [1], [System logging.])
59 fi
60
61 AC_ARG_ENABLE([extras],
62         AS_HELP_STRING([--enable-extras], [enable extras with external dependencies]),
63         [], [enable_extras=no])
64 if test "x$enable_extras" = xyes; then
65         PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.7.0 gobject-2.0 >= 2.7.0])
66         AC_SUBST([GLIB_CFLAGS])
67         AC_SUBST([GLIB_LIBS])
68
69         AC_CHECK_LIB([acl], [acl_init], [:], AC_MSG_ERROR([libacl not found]))
70         AC_CHECK_HEADER([acl/libacl.h], [:], AC_MSG_ERROR([libacl header not found]))
71
72         PKG_CHECK_MODULES(LIBUSB, libusb >= 0.1.12)
73         AC_SUBST(LIBUSB_CFLAGS)
74         AC_SUBST(LIBUSB_LIBS)
75 fi
76 AM_CONDITIONAL([ENABLE_EXTRAS], [test "x$enable_extras" = xyes])
77
78 AC_ARG_ENABLE([introspection],
79         AS_HELP_STRING([--enable-introspection], [enable GObject introspection]),
80         [], [enable_introspection=no])
81 if test "x$enable_introspection" = xyes; then
82         PKG_CHECK_MODULES([INTROSPECTION], [gobject-introspection-1.0 >= 0.6.2])
83         AC_DEFINE([ENABLE_INTROSPECTION], [1], [enable GObject introspection support])
84         AC_SUBST([G_IR_SCANNER], [$($PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0)])
85         AC_SUBST([G_IR_COMPILER], [$($PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0)])
86         AC_SUBST([G_IR_GENERATE], [$($PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0)])
87         AC_SUBST([GIRDIR], [$($PKG_CONFIG --variable=girdir gobject-introspection-1.0)])
88         AC_SUBST([GIRTYPELIBDIR], [$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)])
89 fi
90 AM_CONDITIONAL([ENABLE_INTROSPECTION], [test "x$enable_introspection" = xyes])
91
92 AC_CONFIG_HEADERS(config.h)
93 AC_CONFIG_FILES([
94         Makefile
95         libudev/Makefile
96         libudev/libudev.pc
97         libudev/docs/Makefile
98         libudev/docs/version.xml
99         udev/Makefile
100         rules/Makefile
101         extras/Makefile
102         extras/ata_id/Makefile
103         extras/cdrom_id/Makefile
104         extras/edd_id/Makefile
105         extras/path_id/Makefile
106         extras/firmware/Makefile
107         extras/collect/Makefile
108         extras/floppy/Makefile
109         extras/fstab_import/Makefile
110         extras/rule_generator/Makefile
111         extras/scsi_id/Makefile
112         extras/usb_id/Makefile
113         extras/v4l_id/Makefile
114         extras/hid2hci/Makefile
115         extras/udev-acl/Makefile
116         extras/gudev/Makefile
117         extras/gudev/gudev-1.0.pc
118         extras/gudev/docs/Makefile
119         extras/gudev/docs/version.xml
120 ])
121
122 AC_OUTPUT
123 AC_MSG_RESULT([
124         udev $VERSION
125         ========
126
127         prefix:                 ${prefix}
128         exec_prefix:            ${exec_prefix}
129         udev_prefix:            ${udev_prefix}
130         libdir:                 ${libdir}
131         libdir_name:            ${libdir_name}
132         datarootdir:            ${datarootdir}
133         mandir:                 ${mandir}
134         includedir:             ${includedir}
135
136         logging:                ${enable_logging}
137         debug:                  ${enable_debug}
138         selinux:                ${with_selinux}
139
140         compiler:               ${CC}
141         cflags:                 ${CFLAGS}
142         ldflags:                ${LDFLAGS}
143
144         extras:                 ${enable_extras}
145         gintrospection:         ${enable_introspection}
146
147         xsltproc:               ${XSLTPROC}
148 ])