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
28 required_private_libs=""
30 AC_ARG_WITH([rootprefix],
31 AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
32 [], [with_rootprefix=""])
33 AC_SUBST([rootprefix], [$with_rootprefix])
35 AC_ARG_ENABLE([tools],
36 AS_HELP_STRING([--disable-tools], [disable building tools that provide same functionality as module-init-tools @<:@default=enabled@:>@]),
38 AM_CONDITIONAL([BUILD_TOOLS], [test "x$enable_tools" = "xyes"])
40 AC_ARG_ENABLE([logging],
41 AS_HELP_STRING([--disable-logging], [disable system logging @<:@default=enabled@:>@]),
42 [], enable_logging=yes)
43 AS_IF([test "x$enable_logging" = "xyes"], [
44 AC_DEFINE(ENABLE_LOGGING, [1], [System logging.])
48 AS_HELP_STRING([--enable-zlib], [handle gzipped modules @<:@default=disabled@:>@]),
50 if test "x$enable_zlib" != "xno"; then
51 AC_CHECK_LIB([z], [gzopen],
54 required_private_libs="${required_private_libs} ${zlib_libs}"
56 [AC_MSG_ERROR([zlib is not present])])
58 AC_MSG_NOTICE([zlib support not requested])
61 if test "x$zlib_libs" != "x"; then
62 AC_DEFINE(ENABLE_ZLIB, [1], [Enable zlib for modules.])
66 AC_ARG_ENABLE([debug],
67 AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]),
68 [], [enable_debug=no])
69 AS_IF([test "x$enable_debug" = "xyes"], [
70 AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
73 CC_CHECK_CFLAGS_APPEND([ \
85 -Wmissing-include-dirs \
87 -Wold-style-definition \
90 -Wdeclaration-after-statement \
92 -Wmissing-prototypes \
95 -Wmissing-declarations \
100 -Wstrict-aliasing=2 \
103 -Wno-overlength-strings \
104 -Wno-unused-parameter \
105 -Wno-missing-field-initializers \
112 -fdiagnostics-show-option \
113 -fvisibility=hidden \
114 -ffunction-sections \
120 AC_SUBST(required_private_libs)
122 AC_CONFIG_HEADERS(config.h)
134 rootprefix: ${rootprefix}
135 sysconfdir: ${sysconfdir}
137 includedir: ${includedir}
144 tools: ${enable_tools}
145 logging: ${enable_logging}
147 debug: ${enable_debug}