4 [linux-modules@vger.kernel.org],
6 [http://git.kernel.org/?p=utils/kernel/kmod/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 color-tests])
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
30 AC_PATH_PROG([XSLTPROC], [xsltproc])
33 AC_CHECK_FUNCS_ONCE(__xstat)
35 AC_ARG_WITH([rootprefix],
36 AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
37 [], [with_rootprefix=""])
38 AC_SUBST([rootprefix], [$with_rootprefix])
40 AC_ARG_WITH([rootlibdir],
41 AS_HELP_STRING([--with-rootlibdir=DIR], [rootfs directory to install shared libraries]),
42 [], [with_rootlibdir=$libdir])
43 AC_SUBST([rootlibdir], [$with_rootlibdir])
45 AC_ARG_ENABLE([tools],
46 AS_HELP_STRING([--disable-tools], [disable building tools that provide same functionality as module-init-tools @<:@default=enabled@:>@]),
48 AM_CONDITIONAL([BUILD_TOOLS], [test "x$enable_tools" = "xyes"])
50 AC_ARG_ENABLE([logging],
51 AS_HELP_STRING([--disable-logging], [disable system logging @<:@default=enabled@:>@]),
52 [], enable_logging=yes)
53 AS_IF([test "x$enable_logging" = "xyes"], [
54 AC_DEFINE(ENABLE_LOGGING, [1], [System logging.])
58 AS_HELP_STRING([--with-xz], [handle Xz-compressed modules @<:@default=disabled@:>@]),
60 AS_IF([test "x$with_xz" != "xno"], [
61 PKG_CHECK_MODULES([liblzma], [liblzma >= 4.99])
62 AC_DEFINE([ENABLE_XZ], [1], [Enable Xz for modules.])
64 AC_MSG_NOTICE([Xz support not requested])
68 AS_HELP_STRING([--with-zlib], [handle gzipped modules @<:@default=disabled@:>@]),
70 AS_IF([test "x$with_zlib" != "xno"], [
71 PKG_CHECK_MODULES([zlib], [zlib])
72 AC_DEFINE([ENABLE_ZLIB], [1], [Enable zlib for modules.])
74 AC_MSG_NOTICE([zlib support not requested])
77 AC_ARG_ENABLE([debug],
78 AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]),
79 [], [enable_debug=no])
80 AS_IF([test "x$enable_debug" = "xyes"], [
81 AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
84 # dietlibc doesn't have st.st_mtim struct member
85 AC_CHECK_MEMBERS([struct stat.st_mtim], [], [], [#include <sys/stat.h>])
87 CC_CHECK_CFLAGS_APPEND([ \
89 -DANOTHER_BRICK_IN_THE \
100 -Wmissing-include-dirs \
101 -Wformat-nonliteral \
102 -Wold-style-definition \
105 -Wdeclaration-after-statement \
107 -Wmissing-prototypes \
108 -Wstrict-prototypes \
110 -Wmissing-declarations \
114 -Wstrict-aliasing=2 \
117 -Wno-overlength-strings \
118 -Wno-unused-parameter \
119 -Wno-missing-field-initializers \
126 -fdiagnostics-show-option \
127 -fvisibility=hidden \
128 -ffunction-sections \
131 CC_CHECK_LDFLAGS_APPEND([ \
135 AC_CONFIG_HEADERS(config.h)
139 libkmod/docs/Makefile
140 libkmod/docs/version.xml
143 m4_ifdef([GTK_DOC_CHECK], [
144 GTK_DOC_CHECK([1.14],[--flavour no-tmpl-flat])
146 AM_CONDITIONAL([ENABLE_GTK_DOC], false)])
154 rootprefix: ${rootprefix}
155 sysconfdir: ${sysconfdir}
157 rootlibdir: ${rootlibdir}
158 includedir: ${includedir}
165 tools: ${enable_tools}
166 logging: ${enable_logging}
167 compression: xz=${with_xz} zlib=${with_zlib}
168 debug: ${enable_debug}
169 doc: ${enable_gtk_doc}