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-zlib], [handle gzipped modules @<:@default=disabled@:>@]),
57 AS_IF([test "x$with_zlib" != "xno"], [
58 PKG_CHECK_MODULES([zlib], [zlib])
59 AC_DEFINE([ENABLE_ZLIB], [1], [Enable zlib for modules.])
61 AC_MSG_NOTICE([zlib support not requested])
64 AC_ARG_ENABLE([debug],
65 AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]),
66 [], [enable_debug=no])
67 AS_IF([test "x$enable_debug" = "xyes"], [
68 AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
71 CC_CHECK_CFLAGS_APPEND([ \
73 -DANOTHER_BRICK_IN_THE \
84 -Wmissing-include-dirs \
86 -Wold-style-definition \
89 -Wdeclaration-after-statement \
91 -Wmissing-prototypes \
94 -Wmissing-declarations \
101 -Wno-overlength-strings \
102 -Wno-unused-parameter \
103 -Wno-missing-field-initializers \
110 -fdiagnostics-show-option \
111 -fvisibility=hidden \
112 -ffunction-sections \
118 AC_CONFIG_HEADERS(config.h)
129 rootprefix: ${rootprefix}
130 sysconfdir: ${sysconfdir}
132 rootlibdir: ${rootlibdir}
133 includedir: ${includedir}
140 tools: ${enable_tools}
141 logging: ${enable_logging}
143 debug: ${enable_debug}