]>
Commit | Line | Data |
---|---|---|
ecd40ee4 | 1 | AC_PREREQ(2.60) |
cb48c9b2 | 2 | AC_INIT([kmod], |
b53b7e32 | 3 | [4], |
e17cc3af | 4 | [linux-modules@vger.kernel.org], |
cb48c9b2 LDM |
5 | [kmod], |
6 | [http://git.profusion.mobi/cgit.cgi/kmod.git/]) | |
586fc304 LDM |
7 | |
8 | AC_CONFIG_SRCDIR([libkmod/libkmod.c]) | |
ecd40ee4 | 9 | AC_CONFIG_AUX_DIR([build-aux]) |
a597c8bb JE |
10 | AM_INIT_AUTOMAKE([check-news foreign 1.11 silent-rules |
11 | tar-pax no-dist-gzip dist-xz subdir-objects]) | |
ecd40ee4 LDM |
12 | AC_PROG_CC_STDC |
13 | AC_USE_SYSTEM_EXTENSIONS | |
14 | AC_SYS_LARGEFILE | |
15 | AC_CONFIG_MACRO_DIR([m4]) | |
fe8bf3b0 | 16 | m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])]) |
ecd40ee4 LDM |
17 | AM_SILENT_RULES([yes]) |
18 | LT_INIT([disable-static pic-only]) | |
19 | AC_PREFIX_DEFAULT([/usr]) | |
20 | ||
648a842b LDM |
21 | AC_PROG_CC |
22 | AC_PROG_CC_C99 | |
23 | AC_C_TYPEOF | |
24 | AM_PROG_CC_C_O | |
25 | AC_PROG_GCC_TRADITIONAL | |
708624a4 | 26 | AC_C_BIGENDIAN |
648a842b | 27 | |
9faa7b37 KS |
28 | AC_PROG_SED |
29 | AC_PROG_MKDIR_P | |
904b57d0 | 30 | AC_PATH_PROG([XSLTPROC], [xsltproc]) |
7b3a74fc | 31 | PKG_PROG_PKG_CONFIG |
3d8226ed | 32 | |
a308abec KS |
33 | AC_ARG_WITH([rootprefix], |
34 | AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]), | |
0c5fad93 | 35 | [], [with_rootprefix=""]) |
a308abec KS |
36 | AC_SUBST([rootprefix], [$with_rootprefix]) |
37 | ||
e79bf83b KS |
38 | AC_ARG_WITH([rootlibdir], |
39 | AS_HELP_STRING([--with-rootlibdir=DIR], [rootfs directory to install shared libraries]), | |
40 | [], [with_rootlibdir=$libdir]) | |
41 | AC_SUBST([rootlibdir], [$with_rootlibdir]) | |
42 | ||
72c51a9e GSB |
43 | AC_ARG_ENABLE([tools], |
44 | AS_HELP_STRING([--disable-tools], [disable building tools that provide same functionality as module-init-tools @<:@default=enabled@:>@]), | |
45 | [], enable_tools=yes) | |
46 | AM_CONDITIONAL([BUILD_TOOLS], [test "x$enable_tools" = "xyes"]) | |
47 | ||
ecd40ee4 LDM |
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.]) | |
53 | ]) | |
54 | ||
b182f8fb JE |
55 | AC_ARG_WITH([xz], |
56 | AS_HELP_STRING([--with-xz], [handle Xz-compressed modules @<:@default=disabled@:>@]), | |
57 | [], [with_xz=no]) | |
58 | AS_IF([test "x$with_xz" != "xno"], [ | |
59 | PKG_CHECK_MODULES([liblzma], [liblzma >= 4.99]) | |
60 | AC_DEFINE([ENABLE_XZ], [1], [Enable Xz for modules.]) | |
61 | ], [ | |
62 | AC_MSG_NOTICE([Xz support not requested]) | |
63 | ]) | |
64 | ||
5a51a357 JE |
65 | AC_ARG_WITH([zlib], |
66 | AS_HELP_STRING([--with-zlib], [handle gzipped modules @<:@default=disabled@:>@]), | |
67 | [], [with_zlib=no]) | |
68 | AS_IF([test "x$with_zlib" != "xno"], [ | |
7b3a74fc JE |
69 | PKG_CHECK_MODULES([zlib], [zlib]) |
70 | AC_DEFINE([ENABLE_ZLIB], [1], [Enable zlib for modules.]) | |
cfb908bf LDM |
71 | ], [ |
72 | AC_MSG_NOTICE([zlib support not requested]) | |
cfb908bf | 73 | ]) |
3d8226ed | 74 | |
ecd40ee4 LDM |
75 | AC_ARG_ENABLE([debug], |
76 | AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]), | |
77 | [], [enable_debug=no]) | |
78 | AS_IF([test "x$enable_debug" = "xyes"], [ | |
79 | AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.]) | |
80 | ]) | |
81 | ||
822ce234 | 82 | CC_CHECK_CFLAGS_APPEND([ \ |
7c41c2dd | 83 | -pipe \ |
769becb5 | 84 | -DANOTHER_BRICK_IN_THE \ |
7c41c2dd LDM |
85 | -Wall \ |
86 | -W \ | |
87 | -Wextra \ | |
88 | -Wno-inline \ | |
89 | -Wvla \ | |
90 | -Wundef \ | |
91 | -Wformat=2 \ | |
92 | -Wlogical-op \ | |
93 | -Wsign-compare \ | |
94 | -Wformat-security \ | |
95 | -Wmissing-include-dirs \ | |
96 | -Wformat-nonliteral \ | |
97 | -Wold-style-definition \ | |
98 | -Wpointer-arith \ | |
99 | -Winit-self \ | |
100 | -Wdeclaration-after-statement \ | |
101 | -Wfloat-equal \ | |
102 | -Wmissing-prototypes \ | |
103 | -Wstrict-prototypes \ | |
104 | -Wredundant-decls \ | |
105 | -Wmissing-declarations \ | |
106 | -Wmissing-noreturn \ | |
107 | -Wshadow \ | |
108 | -Wendif-labels \ | |
7c41c2dd LDM |
109 | -Wstrict-aliasing=2 \ |
110 | -Wwrite-strings \ | |
111 | -Wno-long-long \ | |
112 | -Wno-overlength-strings \ | |
113 | -Wno-unused-parameter \ | |
114 | -Wno-missing-field-initializers \ | |
115 | -Wno-unused-result \ | |
116 | -Wnested-externs \ | |
117 | -Wchar-subscripts \ | |
118 | -Wtype-limits \ | |
119 | -Wuninitialized \ | |
7c41c2dd LDM |
120 | -fno-common \ |
121 | -fdiagnostics-show-option \ | |
7c41c2dd LDM |
122 | -fvisibility=hidden \ |
123 | -ffunction-sections \ | |
124 | -fdata-sections \ | |
125 | -Wl,--as-needed \ | |
126 | -Wl,--gc-sections]) | |
822ce234 GSB |
127 | |
128 | ||
ecd40ee4 LDM |
129 | AC_CONFIG_HEADERS(config.h) |
130 | AC_CONFIG_FILES([ | |
131 | Makefile | |
904b57d0 | 132 | man/Makefile |
646b83b8 LDM |
133 | libkmod/docs/Makefile |
134 | libkmod/docs/version.xml | |
ecd40ee4 LDM |
135 | ]) |
136 | ||
4fb900c0 | 137 | m4_ifdef([GTK_DOC_CHECK], [ |
646b83b8 | 138 | GTK_DOC_CHECK([1.14],[--flavour no-tmpl-flat]) |
4fb900c0 LDM |
139 | ], [ |
140 | AM_CONDITIONAL([ENABLE_GTK_DOC], false)]) | |
646b83b8 | 141 | |
ecd40ee4 LDM |
142 | AC_OUTPUT |
143 | AC_MSG_RESULT([ | |
144 | $PACKAGE $VERSION | |
63dc8329 | 145 | ====== |
ecd40ee4 LDM |
146 | |
147 | prefix: ${prefix} | |
a308abec | 148 | rootprefix: ${rootprefix} |
ecd40ee4 LDM |
149 | sysconfdir: ${sysconfdir} |
150 | libdir: ${libdir} | |
e79bf83b | 151 | rootlibdir: ${rootlibdir} |
ecd40ee4 | 152 | includedir: ${includedir} |
7c41c2dd | 153 | bindir: ${bindir} |
ecd40ee4 LDM |
154 | |
155 | compiler: ${CC} | |
156 | cflags: ${CFLAGS} | |
157 | ldflags: ${LDFLAGS} | |
158 | ||
7c41c2dd | 159 | tools: ${enable_tools} |
ecd40ee4 | 160 | logging: ${enable_logging} |
b182f8fb | 161 | compression: xz=${with_xz} zlib=${with_zlib} |
ecd40ee4 | 162 | debug: ${enable_debug} |
646b83b8 | 163 | doc: ${enable_gtk_doc} |
ecd40ee4 | 164 | ]) |