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
31 required_private_libs=""
33 AC_ARG_WITH([rootprefix],
34 AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
35 [], [with_rootprefix=""])
36 AC_SUBST([rootprefix], [$with_rootprefix])
38 AC_ARG_ENABLE([tools],
39 AS_HELP_STRING([--disable-tools], [disable building tools that provide same functionality as module-init-tools @<:@default=enabled@:>@]),
41 AM_CONDITIONAL([BUILD_TOOLS], [test "x$enable_tools" = "xyes"])
43 AC_ARG_ENABLE([logging],
44 AS_HELP_STRING([--disable-logging], [disable system logging @<:@default=enabled@:>@]),
45 [], enable_logging=yes)
46 AS_IF([test "x$enable_logging" = "xyes"], [
47 AC_DEFINE(ENABLE_LOGGING, [1], [System logging.])
51 AS_HELP_STRING([--enable-zlib], [handle gzipped modules @<:@default=disabled@:>@]),
53 if test "x$enable_zlib" != "xno"; then
54 AC_CHECK_LIB([z], [gzopen],
57 required_private_libs="${required_private_libs} ${zlib_libs}"
59 [AC_MSG_ERROR([zlib is not present])])
61 AC_MSG_NOTICE([zlib support not requested])
64 if test "x$zlib_libs" != "x"; then
65 AC_DEFINE(ENABLE_ZLIB, [1], [Enable zlib for modules.])
69 AC_ARG_ENABLE([debug],
70 AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]),
71 [], [enable_debug=no])
72 AS_IF([test "x$enable_debug" = "xyes"], [
73 AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
76 CC_CHECK_CFLAGS_APPEND([ \
88 -Wmissing-include-dirs \
90 -Wold-style-definition \
93 -Wdeclaration-after-statement \
95 -Wmissing-prototypes \
98 -Wmissing-declarations \
103 -Wstrict-aliasing=2 \
106 -Wno-overlength-strings \
107 -Wno-unused-parameter \
108 -Wno-missing-field-initializers \
115 -fdiagnostics-show-option \
116 -fvisibility=hidden \
117 -ffunction-sections \
123 AC_SUBST(required_private_libs)
125 AC_CONFIG_HEADERS(config.h)
136 rootprefix: ${rootprefix}
137 sysconfdir: ${sysconfdir}
139 includedir: ${includedir}
146 tools: ${enable_tools}
147 logging: ${enable_logging}
149 debug: ${enable_debug}