4 [linux-modules@vger.kernel.org],
6 [http://git.profusion.mobi/cgit.cgi/kmod.git/])
8 AC_CONFIG_SRCDIR([libkmod/libkmod.c])
9 AC_CONFIG_AUX_DIR([build-aux])
10 AM_INIT_AUTOMAKE([check-news foreign 1.11 silent-rules
11 tar-pax no-dist-gzip dist-xz subdir-objects])
13 AC_USE_SYSTEM_EXTENSIONS
15 AC_CONFIG_MACRO_DIR([m4])
16 m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
17 AM_SILENT_RULES([yes])
18 LT_INIT([disable-static pic-only])
19 AC_PREFIX_DEFAULT([/usr])
25 AC_PROG_GCC_TRADITIONAL
32 AC_ARG_WITH([rootprefix],
33 AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
34 [], [with_rootprefix=""])
35 AC_SUBST([rootprefix], [$with_rootprefix])
37 AC_ARG_WITH([rootlibdir],
38 AS_HELP_STRING([--with-rootlibdir=DIR], [rootfs directory to install shared libraries]),
39 [], [with_rootlibdir=$libdir])
40 AC_SUBST([rootlibdir], [$with_rootlibdir])
42 AC_ARG_ENABLE([tools],
43 AS_HELP_STRING([--disable-tools], [disable building tools that provide same functionality as module-init-tools @<:@default=enabled@:>@]),
45 AM_CONDITIONAL([BUILD_TOOLS], [test "x$enable_tools" = "xyes"])
47 AC_ARG_ENABLE([logging],
48 AS_HELP_STRING([--disable-logging], [disable system logging @<:@default=enabled@:>@]),
49 [], enable_logging=yes)
50 AS_IF([test "x$enable_logging" = "xyes"], [
51 AC_DEFINE(ENABLE_LOGGING, [1], [System logging.])
55 AS_HELP_STRING([--with-xz], [handle Xz-compressed modules @<:@default=disabled@:>@]),
57 AS_IF([test "x$with_xz" != "xno"], [
58 PKG_CHECK_MODULES([liblzma], [liblzma >= 4.99])
59 AC_DEFINE([ENABLE_XZ], [1], [Enable Xz for modules.])
61 AC_MSG_NOTICE([Xz support not requested])
65 AS_HELP_STRING([--with-zlib], [handle gzipped modules @<:@default=disabled@:>@]),
67 AS_IF([test "x$with_zlib" != "xno"], [
68 PKG_CHECK_MODULES([zlib], [zlib])
69 AC_DEFINE([ENABLE_ZLIB], [1], [Enable zlib for modules.])
71 AC_MSG_NOTICE([zlib support not requested])
74 AC_ARG_ENABLE([debug],
75 AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]),
76 [], [enable_debug=no])
77 AS_IF([test "x$enable_debug" = "xyes"], [
78 AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
81 CC_CHECK_CFLAGS_APPEND([ \
83 -DANOTHER_BRICK_IN_THE \
94 -Wmissing-include-dirs \
96 -Wold-style-definition \
99 -Wdeclaration-after-statement \
101 -Wmissing-prototypes \
102 -Wstrict-prototypes \
104 -Wmissing-declarations \
108 -Wstrict-aliasing=2 \
111 -Wno-overlength-strings \
112 -Wno-unused-parameter \
113 -Wno-missing-field-initializers \
120 -fdiagnostics-show-option \
121 -fvisibility=hidden \
122 -ffunction-sections \
128 AC_CONFIG_HEADERS(config.h)
139 rootprefix: ${rootprefix}
140 sysconfdir: ${sysconfdir}
142 rootlibdir: ${rootlibdir}
143 includedir: ${includedir}
150 tools: ${enable_tools}
151 logging: ${enable_logging}
152 compression: xz=${with_xz} zlib=${with_zlib}
153 debug: ${enable_debug}