4
4
[linux-modules@vger.kernel.org],
6
[http://git.profusion.mobi/cgit.cgi/kmod.git/])
6
[http://git.kernel.org/?p=utils/kernel/kmod/kmod.git])
8
8
AC_CONFIG_SRCDIR([libkmod/libkmod.c])
9
9
AC_CONFIG_AUX_DIR([build-aux])
18
18
LT_INIT([disable-static pic-only])
19
19
AC_PREFIX_DEFAULT([/usr])
21
#####################################################################
22
# Program checks and configurations
23
#####################################################################
30
34
AC_PATH_PROG([XSLTPROC], [xsltproc])
31
35
PKG_PROG_PKG_CONFIG
38
#####################################################################
39
# Function and structure checks
40
#####################################################################
42
AC_CHECK_FUNCS_ONCE(__xstat)
44
# dietlibc doesn't have st.st_mtim struct member
45
AC_CHECK_MEMBERS([struct stat.st_mtim], [], [], [#include <sys/stat.h>])
48
#####################################################################
50
#####################################################################
33
52
AC_ARG_WITH([rootprefix],
34
53
AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
35
54
[], [with_rootprefix=""])
40
59
[], [with_rootlibdir=$libdir])
41
60
AC_SUBST([rootlibdir], [$with_rootlibdir])
43
AC_ARG_ENABLE([tools],
44
AS_HELP_STRING([--disable-tools], [disable building tools that provide same functionality as module-init-tools @<:@default=enabled@:>@]),
46
AM_CONDITIONAL([BUILD_TOOLS], [test "x$enable_tools" = "xyes"])
48
AC_ARG_ENABLE([logging],
49
AS_HELP_STRING([--disable-logging], [disable system logging @<:@default=enabled@:>@]),
50
[], enable_logging=yes)
51
AS_IF([test "x$enable_logging" = "xyes"], [
52
AC_DEFINE(ENABLE_LOGGING, [1], [System logging.])
56
63
AS_HELP_STRING([--with-xz], [handle Xz-compressed modules @<:@default=disabled@:>@]),
72
79
AC_MSG_NOTICE([zlib support not requested])
83
#####################################################################
85
#####################################################################
87
AC_ARG_ENABLE([tools],
88
AS_HELP_STRING([--disable-tools], [disable building tools that provide same functionality as module-init-tools @<:@default=enabled@:>@]),
90
AM_CONDITIONAL([BUILD_TOOLS], [test "x$enable_tools" = "xyes"])
92
AC_ARG_ENABLE([logging],
93
AS_HELP_STRING([--disable-logging], [disable system logging @<:@default=enabled@:>@]),
94
[], enable_logging=yes)
95
AS_IF([test "x$enable_logging" = "xyes"], [
96
AC_DEFINE(ENABLE_LOGGING, [1], [System logging.])
75
99
AC_ARG_ENABLE([debug],
76
100
AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]),
77
101
[], [enable_debug=no])
79
103
AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
82
# dietlibc doesn't have st.st_mtim struct member
83
AC_CHECK_MEMBERS([struct stat.st_mtim], [], [], [#include <sys/stat.h>])
85
CC_CHECK_CFLAGS_APPEND([ \
87
-DANOTHER_BRICK_IN_THE \
98
-Wmissing-include-dirs \
100
-Wold-style-definition \
103
-Wdeclaration-after-statement \
105
-Wmissing-prototypes \
106
-Wstrict-prototypes \
108
-Wmissing-declarations \
112
-Wstrict-aliasing=2 \
115
-Wno-overlength-strings \
116
-Wno-unused-parameter \
117
-Wno-missing-field-initializers \
124
-fdiagnostics-show-option \
125
-fvisibility=hidden \
126
-ffunction-sections \
106
m4_ifdef([GTK_DOC_CHECK], [
107
GTK_DOC_CHECK([1.14],[--flavour no-tmpl-flat])
109
AM_CONDITIONAL([ENABLE_GTK_DOC], false)])
112
#####################################################################
113
# Default CFLAGS and LDFLAGS
114
#####################################################################
116
CC_CHECK_FLAGS_APPEND(with_cflags, [CFLAGS], [\
118
-DANOTHER_BRICK_IN_THE \
129
-Wmissing-include-dirs \
130
-Wformat-nonliteral \
131
-Wold-style-definition \
134
-Wdeclaration-after-statement \
136
-Wmissing-prototypes \
137
-Wstrict-prototypes \
139
-Wmissing-declarations \
143
-Wstrict-aliasing=2 \
146
-Wno-overlength-strings \
147
-Wno-unused-parameter \
148
-Wno-missing-field-initializers \
155
-fdiagnostics-show-option \
156
-fvisibility=hidden \
157
-ffunction-sections \
159
AC_SUBST([WARNINGFLAGS], $with_cflags)
162
CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [ \
165
AC_SUBST([GCLDFLAGS], $with_ldflags)
167
#####################################################################
168
# Generate files from *.in
169
#####################################################################
131
171
AC_CONFIG_HEADERS(config.h)
132
172
AC_CONFIG_FILES([
136
176
libkmod/docs/version.xml
139
m4_ifdef([GTK_DOC_CHECK], [
140
GTK_DOC_CHECK([1.14],[--flavour no-tmpl-flat])
142
AM_CONDITIONAL([ENABLE_GTK_DOC], false)])
180
#####################################################################